Video into ProRes
Problem
Transcode a video file into an Apple ProRes 422 HQ file for post-production purposes.
Solution
ffmpeg \
-i input_file \
-c:v prores_ks \
-profile:v 3 \
-c:a copy \
output_file
General command
ffmpeg \
-i input_file \
-c:v prores_ks \
-profile:v profile_number \
-c:a copy \
output_file
Command syntax
ffmpeg
- starts the command
-i input_file
- path, name and extension of the input file
-c:v prores_ks
- sets the video codec ProRes
-profile:v profile_number
- chooses the variant of ProRes
-c:a copy
- re-encodes the audio stream using the same audio codec
output_file
- path, name and extension of the output file
Discussion
The command line works for every input video format. Yet it works best for “YUV” video file with 4:2:2 chroma subsampling or “YUV” video with 4:4:4 chroma subsampling, regardless of the container in which the input data are actually wrapped. And, as usual in the computer world, “YUV” stands for the colour space Y′CBCR, not for Y′UV as used by PAL video.
The video codec is specified by -codec:video , which is usually abbreviated as -c:v (-codec:v or -c:video are also possible). We advise to avoid the alias -vcodec .
The possible video profile values for the ProRes codec prores_ks are:1
- 5 = 4444 XQ
- 4 = 4444
- 3 = HQ (high quality)
- 2 = standard (rarely called ST)
- 1 = LT (light)
- 0 = proxy (sometimes called PR)
The audio codec is specified by -codec:audio , which is usually abbreviated as -c:a (-codec:a or -c:audio are also possible). We advise to avoid the alias -acodec . For silent videos you can replace -c:a copy by -an ; for video with sound you may choose to re-encode with another audio codec (for example -c:a pcm_s16le is often chosen).
The extension of the output files must be one of .mov , .mkv or .mxf , because the containers QuickTime, Matroska and Material eXchange Format are allowed for the various flavours of the ProRes 422 and 4444 codec.
Note that transcoding from another format than a video file with Y′CBCR colour space and 4:4:4 or 4:2:2 chroma subsampling to ProRes does diminish the image quality.
A Bash script allowing to perform this transcoding is included in our collection Bash Script for Audiovisual Preservation.
Note
- 1
- The
codec_tag_string for the different ProRes 4444 flavours are:
- ap4x = 4444 XQ
- ap4h = 4444
The codec_tag_string for the different ProRes 422 flavours are:
- apch = HQ (high quality)
- apcn = standard (rarely called ST)
- apcs = LT (light)
- apco = proxy (sometimes called PR)
2024-11-29
|