Hacker News new | past | comments | ask | show | jobs | submit login
FFmpeg Patches for a 20% speedup of Apple ProRes decoding (ffmpeg.org)
222 points by mfiguiere on Sept 9, 2023 | hide | past | favorite | 39 comments



It's my understanding that TV series are delivered to Netflix and other streamers in ProRes these days.

Then they convert to h.264/265/etc. as desired to produce the consumer streams.

I'm curious... does anyone know, do they use ffmpeg for that? Or a commercial tool?


They do use ffmpeg (maybe not for everything). They've published quite a bit about their encoding:

https://netflixtechblog.com/high-quality-video-encoding-at-s...

https://research.netflix.com/research-area/video-encoding-an...


They might have several possible formats but for example netflix branded content specs are in the net [1]. It’s IMF package with jpeg2000 content. Prores files are sent as helper files. Sometimes ffmpeg can be used but often grading / mastering tool is used for export (resolve, baselight etc). In my experience FFMPEG is very easy to keep consistent once you get the parameters right (which is always pretty painful), but pretty slow compared to most other tools.

[1] https://partnerhelp.netflixstudios.com/hc/en-us/articles/726...


"helper" files. is that the accepted term now instead of the master?


I mean files that are called officially Servicing turnovers https://partnerhelp.netflixstudios.com/hc/en-us/articles/360...


what MBA came up with that term?


One who doesn't like Master/Slave terms probably.


FFMPEG and Elemental are the two which I've seen at scale.

Source is not always the same, but does often go through a Mac. Not an Apple employee, but I've heard the reason they make the 5k display is to account for 4k fullscreen + toolbar.


Ffmpeg is used frequently, but not for masters. The finishing part is done under softwares like Baselight/Resolve/Nucoda, and that's when the color is baked. If a ProRes is required, usually it comes out from them. src: I work in a pipeline of a large VFX studio.


I kind of thought the big orgs were mostly using hardware encoders now.

AMD Xilinx's Alveo lineup is basically just for this and I think the energy efficiency is way higher, incredibly parallelizable workloads. ASICs would be even better.

YouTube transcodes from their reference copy on ASICs, "Argos" (maybe onto a new thing by now). There's a paper on this too. https://blog.youtube/inside-youtube/new-era-video-infrastruc...


I don't think efficiency and speed matter for Netflix like it does for YouTube since there's only a fraction of the content. Software encoding will always be better and more flexible.


The AMD Alveo ASIC isn't actually available to buy yet. Their older Alveo FPGA (formerly NGCodec) is available but is not competitive by any metric apart from marketing noise.


everyone uses ffmpeg whether they admit to it or not. the internal prores codec(s), i believe there is more than one, is not Apple certified, so there are some potential pitfalls if you're not aware of that. so depending on your intended purpose of the file, it might be good enough. if you are planning on sending the output to Apple iTunes, then nope.


I've delivered to Apple with ffmpeg flavor prores files (as well as Netflix). Both pass QC just fine.


Interesting, would you be able say what it was? An indie movie?


I’m slightly confused by the title of this submission. Doesn’t this post suggest a 20% speed up on Windows devices? I don’t see Apple mentioned.


"Apple Prores" is a codec.


For more context, it's extremely popular for use in film and TV post-production, and is designed specifically for that role (as opposed to the needs of consumer-facing codecs used for disc storage or streaming).


If I remember rightly it was “Elvis Presley” who contributed the ProRes codec in the first place. Or maybe I’m thinking of a similar closed codec.

There are only a handful of people that really contribute to ffmpeg, yet its codebase runs pretty much the entire video based internet. It’s a marvel of the modern world.


I genuinely feel like ffmpeg is kind of like a "secret weapon".

Occasionally my dad will need some help with video or audio, and he'll see me hack together an ffmpeg command (even on Android with termux in a pinch!) and be utterly astounded. Being able to quickly slice up the video without re-encoding, or being able to stitch video together without a re-encode, or being able to arbitrarily glue a bunch of videos together all of different formats and it will work flawlessly.

It's a piece of software I would gladly pay hundreds of dollars for, and yet it manages to be free. I think I'll visit their donate page right now.


It’s amazing how many companies are literally just ffmpeg-as-a-service. It wasn’t a ton of money but I saved my last company a few hundred bucks a month they were paying a service to convert .gif files to .mp4


ImageMagick as well! At a big social media company I used to work at [1], they were spending a not-insignificant amount of money (in the millions) to their CDN/caching provider just to have images resized and converted to PNG and WebP. I am pretty sure all this CDN was doing was running the image through ImageMagick or GraphicsMagick and calling it a day, and charging absurd quantities of money to do it.

[1] it's not hard to find my employment history but I ask you not to say it publicly here



I am always impressed by the collective memory of HN commenters.


Was this an Apple employee working covertly to cement ProRes as an open codec?


Though if you used a normal codec but only output I-frames at very high quality you'd end up pretty close.


Why would only I-frames make a (positive) difference? Sure it makes decoding for seeking easier/faster but it should end up being lower quality at equivalent bitrate?


Because it's meant for editing, to be able to cut anywhere without re-encoding. So it needs to be all I-frames.

And you're going to use a very high bitrate.

This is way more space than consumer codecs use. But still way less than uncompressed video.


I’m struggling to imagine a use case for removing bits of a video and then saving that intermediate back out without editing or reencoding but if that’s what a video editing workflow calls for then fair play!


you just described pretty much every single modern day video capture. pretty much all of the dslr/mirrorless cameras are capturing a higher bitrate h.264 as source.


How would you edit a sports highlights package?


shudder, uncompressed. i have nightmares of v210


H.265/h.265 make use of IPB frames. The P and B frames refer back to the I-frame so that each P/B frame has much less information than the I. So if you use only I-frames, that's the best that codec can offer, at a decent bit rate. there's much better descriptions on the web.


That doesn’t make sense, at the same bitrate encoding frames with no dependency on previous frames can’t possibly look better or be the best the codec can offer, or there would be no reason for other frame types to exist


They didn't say "same" bitrate but rather "decent" which I take to mean "sufficient" -- and obviously much larger than what you get with lossy(er?) params


by close you mean proxy files?


No, by close I mean you'd hit the same use case and have similar attributes.

Probably not as fast but it would scrub well.


Thanks for the clarification!


The patch notes a significant speedup in performance on both Win64 and Win32 platforms, with approximately a 20% speedup on Win64 and a 14% speedup on Win32.

Doesn't seem to be something which will improve performance on Linux based OSs?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: