What is it that determines the speed of reading a file?

Started by rado84, May 17, 2022, 12:43:27 PM

Previous topic - Next topic

rado84

I use Avidemux mostly for capturing screenshots when the conventional way is too slow and I miss the frame. In that case I load the video file in Avidemux and jump to the frame I wanna capture. And I've noticed that for whatever reason some files are being read much slower than others. At first I thought it was the file size but that's not either bc some full length movies (like "Lord of the Rings", for example) are being read much faster than a 42 minute episode of any tv show. For instance, until last night I was watching "Glee" which was downloaded from rutracker and avidemux needed about 30 seconds to read each episode, whereas for "Supergirl" (also downloaded from there but converted by me after that) it needs 10 seconds tops. Both "Glee" and "Supergirl" have the same file size and yet "Glee" is much slower to be read by avidemux.
I tried making it read faster by changing priorities to "high" in avidemux settings, even enabled multi-threading but these settings didn't change anything.
Why is that? What is it that determines how fast the file will be read?

Blues

You can take screenshots with players if you wish. MPV, MPlayer, VLC, many others.
Avidemux needs to prepare the file for editing, this is more than plain reading it. You can use 'mediainfo' utility to see what video encoding is used with what settings and options. Some crappy encoders produce video streams which are not fully standards compliant.

eumagga0x2a

Quote from: rado84 on May 17, 2022, 12:43:27 PMWhat is it that determines how fast the file will be read?

Container type and properties as well as the video codec. Avidemux needs to create an index of file contents and often also to determine frame type of all frames in the video it tries to load. Depending on file type and video properties, this can take a lot of time as you see.

rado84

Quote from: Blues on May 17, 2022, 05:46:38 PMYou can take screenshots with players if you wish.
I know that but that doesn't work for me. I mean, the method is of no use to me. I prefer using scrot to make a screenshot of what I see the way I see it on the screen. However, sometimes I can't react fast enough to press "Pause" at the exact frame I wanna capture because it changes too fast. When that happens, I run the video file through avidemux and manually jump to the frame I wanna capture.

Quote from: eumagga0x2a on May 17, 2022, 06:38:45 PM
Quote from: rado84 on May 17, 2022, 12:43:27 PMWhat is it that determines how fast the file will be read?

Container type and properties as well as the video codec.
Then it seems H265 (my conversion) is a lot faster than H264. The above mentioned episodes of "Glee" were all H264, whereas my files of "Supergirl" were all converted to H265 using NVENC.

Blues

Does not work for you ... what kind of attitude is this. Then make it work for you. For instance you can re-configure your arrow buttons to move by a fraction of a second. In MPV, when at desired frame hit Ctrl+s and your frame is in a file. Again, configure MPV screenshots properly to get desired compression and file type.

Help yourself: https://mpv.io/manual/master/

eumagga0x2a

Quote from: rado84 on May 18, 2022, 07:47:26 PMThen it seems H265 (my conversion) is a lot faster than H264. The above mentioned episodes of "Glee" were all H264, whereas my files of "Supergirl" were all converted to H265 using NVENC.

How old is your Avidemux version? Prior to 2.8.0 (prior to May 23, 2021 for MP4 and prior to Sept. 20, 2021 for MKV), frame type (P- vs B-frames) in HEVC video streams was not decoded during indexing, posing a problem for copy mode. Please make sure you use the latest 2.8.1 nightly, it might cancel out the current speed advantage of HEVC you experience.

By the way, at least for MP4, you can cancel decoding of frame type. This is reasonably safe as long as you don't use copy mode, just all B-frames in the not yet indexed part of video will remain incorrectly marked as P-frames.