Apple ProRes is a particular standard (different from H.264/AVC) developed by Apple to replace M-JPEG. ProRes is tailored to support 4:2:2 and 4:4:4 video with 8,10 and 12 bits per sample.
The ProRes codec (both encoder and decoder) is supported by ffmpeg (by default).
ffmpeg -codecs | findstr prores
DEVIL. prores Apple ProRes (iCodec Pro) (encoders: prores prores_aw prores_ks)
It’s easy also to extract the ProRes codec as a standalone program.
There are several realizations of ProRes in ffmpeg: Anatoliy’s variant ( ‘-vcodec prores’ ) , Kostia’s variant (‘-vcodec prores_ks’).
ProRes supports the following profiles:
Profile Num Profile Name
———————————————————–
0 ………… ……………………ProRes 422, Proxy
1 ………… ……………………ProRes 422, LT
2 ……………………………… ProRes 422, Standard
3 ……….. …………………….ProRes 422, HQ
Generating ProRes Stream with ffmpeg
All ProRes files names must end with ‘mov’ extension. As far as i know VLC, PotPlayer and QuickTime players support ProRes streams.
The following ffmpeg example reveals how to encode an input 4:2:0 yuv-file (yuv420p) to ProRes mov-file (4:2:2):
ffmpeg -s 3840×1744 -y -pix_fmt yuv420p -i a.yuv -vcodec prores a_prores.mov
Note: because ProRes does not support 4:2:0, the input yuv420p is converted by default to 4:2:2, 10bps (yuv422p10le)
If we want to generate ProRes Proxy profile with a predefined frame rate say 24fps and profile 0 (ProRes 422, Proxy) then use -r 24 and -profile:v 0 :
ffmpeg -s 3840×1744 -y -pix_fmt yuv420p -i a.yuv -r 24 -vcodec prores -profile:v 0 proxy.mov
If we wish select ProRes 422, LT profile we should use ‘-profile:v 1’ (because ProRes 422, LT profile has the number 1 in the above table)
How Keep BitRate
For BitRate control you need use Kostia’s realization of ProRes (specified by ‘-vcodec prores_ks’). The bitrate is controlled by bits_per_mb parameter which specifies how many bits to supply for coding single MB.
Thus the expected bitrate is capped by: (frame_width/16) * (frame_height/16) * fps * bits_per_mb
Usage:
ffmpeg -s 3840×1744 -y -pix_fmt yuv420p -i a.yuv -bits_per_mb 300 -r 24 -vcodec prores_ks -profile:v 0 a_prores_proxy_300.mov
It’s recommended to allocate 250 bits per mb for Proxy profile, 525 bits per mb for LT profile, 875 bits per mb for Standard profile and 1350 bits per mb for HQ profile.
How Set Aspect Ratio
Aspect ratio is signaled in meta-data (in pasp-atom, moov/trak/mdia/minf/stbl/stsd/ ) and set by ffmpeg key ‘-vf setdar=K:M’.
The following example reveals how to set 16:9 aspect ratio:
ffmpeg -s 3840×1744 -y -pix_fmt yuv420p -i a.yuv -bits_per_mb 300 -r 24 -vcodec prores_ks -profile:v 0 -vf setdar=16:9 test.mov
How ProRes Profile Signaled in Mov-Metadata
According to ProRes profile the following atom is signaled in moov/trak/mdia/minf/stbl/stsd/ :
apch – ProRes 422 High Quality
apcn – ProRes 422 Standard Definition
apcs – ProRes 422 LT
apco – ProRes 422 Proxy
ap4h – ProRes 4444
23+ years’ programming and theoretical experience in the computer science fields such as video compression, media streaming and artificial intelligence (co-author of several papers and patents).
the author is looking for new job, my resume
you have got a terrific blog right here! would you wish to make some invite posts on my blog?
I believe you have mentioned some very interesting details , thankyou for the post.
I think this is one of the most important info for me. And i am glad reading your article. But should remark on some general things, The site style is wonderful, the articles is really nice : D. Good job, cheers
Currently it seems like BlogEngine is the preferred blogging platform available right now. (from what I’ve read) Is that what you are using on your blog?
you are welcome to ask our web-designer Ivan Lukin (vanyalukin007@gmail.com), i am responsible for the content only.
I have learn some just right stuff here. Certainly worth bookmarking for revisiting. I surprise how a lot attempt you place to make such a great informative website.
I love the efforts you have put in this, thankyou for all the great articles.
Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! By the way, how can we communicate?
Thanks for “auspicious”, my email is slavah264@gmail.com and you are welcome to correspond with me. i am corresponding with many specialists, beginners and practitioners in video compression and media streaming fields.
Hiya, I am really glad I’ve found this info. Today bloggers publish just about gossips and internet and this is really irritating. A good site with exciting content, this is what I need. Thank you for keeping this web site, I will be visiting it. Do you do newsletters? Cant find it.
Newsletter subscription you can find in the main page https://videonerd.website/
Awsome article and right to the point. I am not sure if this is really the best place to ask but do you folks have any ideea where to employ some professional writers? Thanks 🙂
i have not money, this site is non-profitable in virtue.
I really like your writing style, excellent information, thanks for posting : D.
Would love to incessantly get updated outstanding web site! .
It’s appropriate time to make a few plans for the long run and it’s time to be happy. I have learn this post and if I may I desire to counsel you few fascinating things or suggestions. Perhaps you could write next articles relating to this article. I want to read more issues about it!
Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how can we communicate?
Thank you for the sensible critique. Me & my neighbor were just preparing to do some research on this. We got a grab a book from our area library but I think I learned more clear from this post. I’m very glad to see such fantastic info being shared freely out there.
This is a topic close to my heart cheers, where are your contact details though?
slavah264@gmail.com
F*ckin’ amazing things here. I am very glad to see your article. Thanks a lot and i am looking forward to contact you. Will you please drop me a e-mail?
Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate?
slavah264@gmail.com
Some really interesting points you have written.Assisted me a lot, just what I was searching for : D.