Extract H.264 bitstream from MP4:
ffmpeg -i source.mp4 -map 0:v -vcodec copy -bsf:v h264_mp4toannexb source-video.h264Extract H.265 (HEVC) bitstream from MP4:
ffmpeg -i source.mp4 -map 0:v -vcodec copy -bsf:v hevc_mp4toannexb source-video.h265Regenerate presentation time stamps for raw bitstream (-r 60 is the frame rate)
ffmpeg -fflags +genpts -r 60 -i source-video.h26x -vcodec copy output.mp4Change container from MP4 to MKV without re-encoding:
ffmpeg -i input.mp4 -c copy output.mkvInstall MKV tools in MacOS (mkvmerge, etc):
brew install mkvtoolnixDump file info with ffprobe:
ffprobe -i input.ts -show_frames -select_streams v:0 -print_format flatCombine multiple MP4 videos into one
Video terminology:
- MPEG-4 part 14 / MP4 - container format
- Reference list
atom/atoms- all “structures” in an MP4 stream are referred to as atomsbox/boxes- an alternative toatombut means the same thing