Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ffmpeg concat when inputs of DIFF sizes the FAQ docs for concat do not work for me
- # INPUT yuv420p, 500x868
- # INPUT yuv420p, 1222x780
- # prep audio
- ./ffmpeg -i _seg1.mp4 -vn -f u16le -acodec pcm_s16le -ac 1 -ar 44100 - > temp1.a < /dev/null
- ./ffmpeg -i _seg2.mp4 -vn -f u16le -acodec pcm_s16le -ac 1 -ar 44100 - > temp2.a < /dev/null
- cat temp1.a temp2.a > all.a
- # drop audio and create streams (mp2) that can input to /cat/, balance the size using crop/pad
- ./ffmpeg -i _seg1.mp4 -r:v 10 -c:v libx264 -bsf:v h264_mp4toannexb -an out1.h264
- ./ffmpeg -i clipperDemo_p2-4-6-2012.mp4 -r:v 10 -c:v libx264 -bsf:v h264_mp4toannexb -vf crop=500:780 -an out2.h264
- ./ffmpeg -i out2.h264 -c:v copy -vf pad=1220:780:360:0:violet -an out3.h264
- #mp2 to mp4
- cat out1.h264 out3.h264 | ./ffmpeg -i pipe:0 -vcodec copy -an out_all.mp4
- #mux audio cat & vid
- ./ffmpeg -f u16le -acodec pcm_s16le -ac 1 -ar 44100 -i all.a -i out_all.mp4 -vcodec copy final.mp4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement