
using Chrome > F12 > Network > Filter: m3u8 Download "Transport Stream" video streams Use -vf "transpose=2,transpose=2" for 180 degrees. Rotate 90 clockwise: ffmpeg -i in.mov -vf "transpose=1" out.movįor the transpose parameter you can pass: 0 = 90CounterCLockwise and Vertical Flip (default) To extract one frame per second only: ffmpeg -i in.mp4 -fps=1 -vsync 0 out%d.png To extract all frames from between 1 and 5 seconds, and also between 11 and 15 seconds: ffmpeg -i in.mp4 -vf select='between(t,1,5)+between(t,11,15)' -vsync 0 out%d.png Then add them using a video filter: ffmpeg -i in.mp4 -vf ass=sub.ass out.mp4 Use the libass library (make sure your ffmpeg install has the library in the configuration -enable-libass).įirst convert the subtitles to. Then, run ffmpeg: ffmpeg -f concat -i list.txt -c copy out.mp4ĭelay video by 3.84 seconds: ffmpeg -i in.mp4 -itsoffset 3.84 -i in.mp4 -map 1:v -map 0:a -vcodec copy -acodec copy out.mp4ĭelay audio by 3.84 seconds: ffmpeg -i in.mp4 -itsoffset 3.84 -i in.mp4 -map 0:v -map 1:a -vcodec copy -acodec copy out.mp4 See the -map option documentation for more info.The -shortest option will cause the output duration to match the duration of the shortest input stream.If you want to re-encode, see FFmpeg Wiki: H.264 Encoding Guide. With -c copy the streams will be stream copied, not re-encoded, so there will be no quality loss.To copy the video from in0.mp4 and audio from in1.mp4: ffmpeg -i in0.mp4 -i in1.mp4 -c copy -map 0:0 -map 1:1 -shortest out.mp4 For high quality video and audio, read the x264 Encoding Guide and the AAC Encoding Guide, respectively.įor example: ffmpeg -ss -i in.mp4 -t -c:v libx264 -c:a aac -strict experimental -b:a 128k out.mp4

If you leave out the -c copy option, ffmpeg will automatically re-encode the output video and audio according to the format you chose. This won't harm the quality and make the command run within seconds.
