[FFmpeg-user] Problem with a YT video

Moritz Barsnick barsnick at gmx.net
Thu Apr 28 11:42:58 CEST 2016


On Thu, Apr 28, 2016 at 02:01:08 +0000, Xen wrote:
> I am no expert but this thing works:
> 
> ffmpeg -i input.mp4 -f lavfi -i 
> "movie=input.mp4,crop=w=iw/2:h=ih:x=0:y=0,scale=w=2*iw:h=ih,setdar=2*dar" 
> -map 1:0 -map 0:1 out.mp4

Wow, that's complicated and convoluted. I only used "movie=" so I could
use it in a filter in ffplay. The original poster had only said
something about "playing" the video, and never answers when I ask
"please specify what you are trying to achieve", so I gave him ffplay
instead of ffmpeg. :-)

Of course ffmpeg can filter fine as well, but you don't have to feed
the file twice, as you (Xen) do in your example. Just do
ffmpeg -i input.mp4 -map 0:v -map 0:a -vf "movie=input.mp4,crop=w=iw/2:h=ih:x=0:y=0,scale=w=2*iw:h=ih,setdar=2*dar" out.mp4
(I chose ":v" and ":a" instead of ":0" and ":1", in the youtube-dl case
it shouldn't make a difference.)

> Will take a while to transcode > 1G though ;-).

It depends. Good hardware and good choice of transcode settings, and it
could be really really fast. :-)

Moritz


More information about the ffmpeg-user mailing list