I've always wondered if better multi-core performance can come from processing different keyframe segments separately. IIUC all current encoders that support parallelism work by multiple threads working on the same frame at the same time. Often times the frame is split into regions and each thread focuses on a specific region of the frame. This approach can have a (usually small) quality/efficiency cost and requires…
FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
121–130 of 186 posts
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#122Earlier quoted context omitted.
https://www.youtube.com/watch?v=9kaIXkImCAM
I'm glad we've reached a point where there is quality parody content online for our industry.
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#123Earlier quoted context omitted.
Like what do you do?
One can use it instead of cat to display text files. Easy syntax to remember. ffmpeg -v quiet -f data -i file.txt -map 0:0 -c text -f data -
ffmpeg -v quiet -f data -i file.txt -map 0:0 -c copy -f data -
does.[1] “Encoder 'text' specified, but only '-codec copy' supported for data streams”
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#124Earlier quoted context omitted.
Why bring up assumptions/suppositions about Netflix's encoding process? Their tech blog and tech presentations discuss many of the requirements and steps involved for encoding source media to stream to all the devices that Netflix supports. The Netflix tech blog: https://netflixtechblog.com/ or https://netflixtechblog.medium.com/ Netflix seems to use AWS CPU+GPU for encoding, whereas YouTube has gone to the expense o…
> Their dynamic optimization encoding framework - allocating more bits for complex scenes and fewer bits for simpler, quieter scenes: https://netflixtechblog.com/dynamic-optimizer-a-perceptual-v ... and https://netflixtechblog.com/optimized-shot-based-encodes-now ... This is overrated - of course that's how you do it, what else would you do? > Mean-squared-error (MSE), typically used for encoder decisions, is a numbe…
That's not what has been done previously for adaptive streaming. I guess you are referring to what encoding modes like CRF do for an individual, entire file? Or where else has this kind of approach been shown before?
In the early days of streaming you would've done constant bitrate for MPEG-TS, even adding zero bytes to pad "easy" scenes. Later you'd have selected 2-pass ABR with some VBV bitrate constraints to not mess up the decoding buffer. At the time, YouTube did something where they tried to predict the CRF they'd need to achieve a certain (average) bitrate target (can't find the reference anymore). With per-title encoding (which was also popularized by Netflix) you could change the target bitrates for an entire title based on a previous complexity analysis. It took quite some time for other players in the field to also hop on the per-title encoding train.
Going to a per-scene/per-shot level is the novely here, and exhaustively finding the best possible combination of QP/resolution pairs for an entire encoding ladder that also optimizes subjective quality – and not just MSE.
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#125I've always wondered if better multi-core performance can come from processing different keyframe segments separately. IIUC all current encoders that support parallelism work by multiple threads working on the same frame at the same time. Often times the frame is split into regions and each thread focuses on a specific region of the frame. This approach can have a (usually small) quality/efficiency cost and requires…
There's already software that does this: https://github.com/master-of-zen/Av1an Encoding this way should indeed improve quality slightly. Whether that is actually noticeable/measurable... I'm not sure.
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#126Earlier quoted context omitted.
One can use it instead of cat to display text files. Easy syntax to remember. ffmpeg -v quiet -f data -i file.txt -map 0:0 -c text -f data -
I use dd for that. dd if=./file.txt Can you also format your drive with ffmpeg? I'm looking for a more versatile dd replacement..
ffmpeg -f data -i /dev/zero -map 0:0 -c copy -f data - > /dev/sda
is roughly equivalent to to dd status=progress if=/dev/zero of=/dev/sdaRe: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#127Earlier quoted context omitted.
> Their dynamic optimization encoding framework - allocating more bits for complex scenes and fewer bits for simpler, quieter scenes: https://netflixtechblog.com/dynamic-optimizer-a-perceptual-v ... and https://netflixtechblog.com/optimized-shot-based-encodes-now ... This is overrated - of course that's how you do it, what else would you do? > Mean-squared-error (MSE), typically used for encoder decisions, is a numbe…
> This is overrated - of course that's how you do it, what else would you do? That's not what has been done previously for adaptive streaming. I guess you are referring to what encoding modes like CRF do for an individual, entire file? Or where else has this kind of approach been shown before? In the early days of streaming you would've done constant bitrate for MPEG-TS, even adding zero bytes to pad "easy" scenes. L…
This is unnecessary if the encoder is well-written. It's like how some people used to run multipass encoders 3 or 4 times just in case the result got better. You only need one analysis pass to find the optimal quality at a bitrate.
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#128Earlier quoted context omitted.
> This is overrated - of course that's how you do it, what else would you do? That's not what has been done previously for adaptive streaming. I guess you are referring to what encoding modes like CRF do for an individual, entire file? Or where else has this kind of approach been shown before? In the early days of streaming you would've done constant bitrate for MPEG-TS, even adding zero bytes to pad "easy" scenes. L…
> exhaustively finding the best possible combination of QP/resolution pairs for an entire encoding ladder that also optimizes subjective quality – and not just MSE. This is unnecessary if the encoder is well-written. It's like how some people used to run multipass encoders 3 or 4 times just in case the result got better. You only need one analysis pass to find the optimal quality at a bitrate.
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#129Earlier quoted context omitted.
One can use it instead of cat to display text files. Easy syntax to remember. ffmpeg -v quiet -f data -i file.txt -map 0:0 -c text -f data -
can I use ffmpeg to embed a gif in a Hacker News comment, because I want that so much right now
$ ffmpeg -v quiet -codecs | egrep -i 'gif|ascii'
D.V.L. ansi ASCII/ANSI art
DEV..S gif CompuServe GIF (Graphics Interchange Format)
(“D” and “E” in the first field indicate support for decoding and encoding)Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#130Shameless plug. I teach the FFmpeg C api here : https://www.udemy.com/course/part-1-video-coding-with-ffmpeg...