Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

trailing options found on command line ffmpeg

Tags:

ffmpeg

ffmpeg complains about trailing options. What parameters are out of the order. I am unable to find any. Please point out some.

 /home/ec2-user/bin/ffmpeg -thread_queue_size 1024 -probesize 18M 
    -re -f rawvideo -framerate 1 -pixel_format rgb32 -video_size 1920x1080 
    -i pipe:0 -i /home/ec2-user/logo.png 
    -i /home/ec2-user/testdata/audio.m4a -ss 0 -t 20 
    -filter_complex "[0:v]vflip[main];[1:v]scale=1920/10:-1[si], [main][si]overlay=5:5:format=rgb,format=yuv420p" 
    -c:v libx264 /home/ec2-user/output.mp4 
    -c:v copy -shortest
like image 341
asad Avatar asked Jul 01 '16 04:07

asad


1 Answers

Basic FFmpeg syntax structure is

ffmpeg -<options for input 1> -i input 1 -<options for input 2> -i input 2 -<options for output 1> output1 -<options for output 2> output2

(Global options can go anywhere)

So,

 /home/ec2-user/bin/ffmpeg -thread_queue_size 1024 -probesize 18M 
    -re -f rawvideo -framerate 1 -pixel_format rgb32 -video_size 1920x1080 
    -i pipe:0 -i /home/ec2-user/logo.png 
    -i /home/ec2-user/testdata/audio.m4a -ss 0 -t 20 
    -filter_complex "[0:v]vflip[main];[1:v]scale=1920/10:-1[si], [main][si]overlay=5:5:format=rgb,format=yuv420p" 
    -c:v libx264 -shortest /home/ec2-user/output.mp4 

Shortest goes before the output filename. The -c:v copy overrides the libx264 specified just before and does not make sense for output to MP4, so I've removed it.

like image 197
Gyan Avatar answered Sep 30 '22 06:09

Gyan