3 ms·
About 2x faster on my 4-cores ARM server, without any significant parallelism overhead: $ time ffmpeg_threading/ffmpeg -i input.mp4 -ar 1000 -vn -acodec fl
by raphaelj 3y ago
About 2x faster on my 4-cores ARM server, without any significant parallelism overhead:
$ time ffmpeg_threading/ffmpeg -i input.mp4 -ar 1000 -vn -acodec flac -f flac -y /dev/null -hide_banner -loglevel quiet
14.90s user 2.08s system 218% cpu 7.771 total
$ time ffmpeg -i input.mp4 -ar 1000 -vn -acodec flac -f flac -y /dev/null -hide_banner -loglevel quiet
14.05s user 1.80s system 114% cpu 13.841 total
- cm2187 3y agoBut what part gets multi threading? Because the video compression is already multithreaded. Video decompression I am not sure. And I think anything else is fairly small in comparison in term of performance cost. All improvements are welcome but I would expect the impact to be fairly immaterial in practice.
- jamal-kumar 3y agoFrom what I understand the more you increase multithreading with ffmpeg the more you get quality issues... If they have started to solve that problem then I will be a much happier camper
- jbk 3y ago> From what I understand the more you increase multithreading with ffmpeg the more you get quality issues... No. If you don't max out your CPU, you will not have quality issues.
- raphaelj 3y agoWell, that's the very specific command I'm using in one of my webapps (https://datethis.app https://datethis.app), and it's one of the main performance hotspots, so it's very *not* immaterial.
- timvdalen 3y agoWow, I learned something today, did not know this was a thing!
- j1elo 3y agoVery interesting! I had seen the "learn more" video already, but it stayed in a corner of my mind. To compare any given piece of sound with reference sounds for ENF analysis, the references must have been recorded to start with. The fact that a webapp like yours can exist... does it mean that we, indeed, have recordings of electrical hum spanning years and years? Are they freely available, or are they commercial products? It seems so crazy to me that someone decided to put a recorder next to a humming line just to be able to later in the future match the sound with some other recordings...
- raphaelj 3y agoFor Europe, there are academic and public organizations that publish these ENF backlog since about 2017. For US, I couldn't find any open dataset. For these regions, I'm basically recording the sound of an A/C motor to get the reference data, but I only have a few months of backlog. See here for the coverage of the webapp: https://datethis.app/coverage https://datethis.app/coverage
- garblegarble 3y agoI notice in your coverage plot, the UK National Grid data appears to end mid-2023... have they stopped providing this data?
- raphaelj 3y agoNo, but they do not provide the data in real time.
- deleted 3y ago[deleted]
- drewtato 3y agoThis is removing the video stream (-vn) so that's not involved. Not sure which parts are in parallel here, but I'm guessing decoding and encoding the audio.
- izacus 3y agoThreading depends on implementation of each encoder/decoder - most video encoders and decoders are multithreaded, audio ones not so much. At least that was the state of the world the last time I've looked into ffmpeg internals.
- pjc50 3y agoMultithreading the filter graph itself at the top level, so "decode", "sample rate convert", and "encode" can be in separate threads.
- account42 3y agoVideo compression (at least x264/x265) has a maximum number of threads it can use depending on the video resolution. This means that e.g. for 1080p ffmpeg cannot fully utilize a 64-thread CPU.
- CrendKing 3y agoYou are not using hardware acceleration on the decoding side, and removing video output here. I wonder what happens if we use both hardware acceleration on video decoding and encoding, i.e. something like this on NVIDIA card ffmpeg -hwaccel cuda -i $inputFile -codec:a copy -codec:v hevc_nvenc $output
- TD-Linux 3y agoNo video is being transcoded in the parent's command (-vn).
- jamal-kumar 3y agoWhat's to note about hardware acceleration on the transcoding with NVENC is that it actually has a resolution limit, so if you're trying to transcode something like 8K VR video using that it'll choke
- m00x 3y agoOn all hardware? Wouldn't that be a buffer size limit?