←back to thread

1113 points Bluestein | 4 comments | | HN request time: 0s | source
Show context
lairv ◴[] No.41278203[source]
I use it to inspect video frames by frames, particularly being able to go back one frame. VLC doesn't support it, this thread about the feature is hilarious https://forum.videolan.org/viewtopic.php?t=120627
replies(19): >>41278382 #>>41278499 #>>41278639 #>>41278719 #>>41279342 #>>41279364 #>>41279561 #>>41279827 #>>41279842 #>>41279920 #>>41280125 #>>41281214 #>>41281733 #>>41282953 #>>41283275 #>>41284169 #>>41287180 #>>41289348 #>>41289743 #
sergiotapia ◴[] No.41278382[source]
i wonder why he's such an ass about it, and totally adamant that it's impossible when multiple players already do this fast. ego?
replies(4): >>41278485 #>>41278542 #>>41278658 #>>41278802 #
variadix ◴[] No.41278658[source]
I think technically he’s correct (I haven’t worked on media decoding code, but I understand how common video encoding formats work). If you have a long video with only a single key frame at the beginning then to step back you would need to, starting from the beginning of the video, decode every frame up to the previous frame you wanted to jump to in order to apply frame deltas, also assuming you have some sort of frame counter to determine when you’ve reached the target frame. In the worst case this does require a lot of compute, but this is an edge case if you primarily care about common video formats with normal encoding settings. I assume seeking backwards is also painfully slow on videos encoded in this manner, so why stepping back 1 frame is out of the question when compared to seeking backwards, I don’t fully understand, it must have something to do with precise frame counts being unavailable on some hardware decoders for some formats (and there being no good workaround) so you _may_ not actually go back 1 frame.

I don’t see any reason it couldn’t be supported for a set of formats with reasonable encoding/decoding settings, and provide some error message for other formats if a user attempts to step back, e.g. reverse frame stepping unavailable for current video due to format/encoding/decoding settings.

replies(7): >>41279035 #>>41279159 #>>41279175 #>>41279309 #>>41281273 #>>41281805 #>>41283553 #
1. NavinF ◴[] No.41279159[source]
> video with only a single key frame at the beginning

I've literally never seen a video like that in my life, but I'd still expect it to work. Just decode everything starting from frame 1. My desktop can decode H265 at 1,666 fps. I can wait.

https://docs.nvidia.com/video-technologies/video-codec-sdk/1...

replies(1): >>41279690 #
2. Panzer04 ◴[] No.41279690[source]
That blows up pretty quickly though? Even a 10 minute video will take in the worst case ~20 seconds to decode at that rate.

Not really an excuse not to have it (since most video wont be encoded in such an insane way), but the developers owe no obligation to users to implement it.

replies(2): >>41281124 #>>41281395 #
3. Hendrikto ◴[] No.41281124[source]
Theoretically. Practically, 10+ minute videos with just a single i frame at the beginning do not exist.
4. ◴[] No.41281395[source]