Most active commenters

    ←back to thread

    1113 points Bluestein | 17 comments | | HN request time: 0.002s | source | bottom
    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 #
    mannyv ◴[] No.41278542[source]
    To do this well you need to keep the old frames around...or go back to the previous keyframe and re-render. That might be hard if your design is playback-optimized.
    replies(3): >>41278621 #>>41279096 #>>41281533 #
    1. Dylan16807 ◴[] No.41278621[source]
    Re-rendering shouldn't be hard, it's just a specialized version of seeking. VLC has seeking.

    The claim that you would have to decode all previous frames in the entire video is... completely baffling to see coming from the dev. He's arguing a stupid technicality that a video might not have keyframes. That's not a reason to omit the feature entirely.

    replies(3): >>41278876 #>>41279208 #>>41279260 #
    2. weaksauce ◴[] No.41278876[source]
    yeah that's a weird edge case that's not really worth considering. it's obviously something that can be done technically even if some edge cases are not performant.
    3. mannyv ◴[] No.41279208[source]
    You misunderstand. The point is you have to go backwards to find a keyframe, then render forwards from that.

    Going backwards might be hard because if you structured your code in certain ways you may not be able to go backwards efficiently. You can "seek", but how far back to you want to seek? A second? Two seconds? current-X frames?

    key frames may be in a standard cadence, but they may not be. So again, how far back do you seek to go back one frame? And keyframes may be abstracted away from the player itself, since really, the codecs are the ones that deal with that stuff. For example, I believe mjpeg doesn't do frame differencing (I'm probably wrong about that).

    The ideal implementation would save the last X frames then re-render once you go back like X/2 frames. But again, it depends.

    replies(2): >>41279318 #>>41279407 #
    4. throwaway22032 ◴[] No.41279260[source]
    The strange thing is that the same argument is true for seeking in general.

    Going back from frame 500000 to frame 499999 is in the limiting case as complex as seeking from 1 to 499999, and in most cases far better.

    I think the forum thread would be better answered "you do it, I don't need this feature" which is basically the gist of it and is a completely fair answer.

    replies(1): >>41279434 #
    5. Aeolun ◴[] No.41279318[source]
    Since I can drag the bar backwards in VLC and have it resume playback apparently this is already implemented? This would be a very narrow use of that.
    6. Dylan16807 ◴[] No.41279407[source]
    I don't misunderstand. The program already has seeking code, and if it needs to aim back slightly so that it can be more precise that's not a massive change to how it already works.

    Efficiency is not as important as having the feature at all. "Go back 5 seconds and then run forward to the right frame" is a sufficient algorithm, as long as it can track and combine multiple presses of the previous-frame key. Improvements can come later. Maybe buffering, maybe tracking keyframes, maybe other things. But this is a big case of letting the perfect be the enemy of the good.

    If it fails to find a keyframe, that sucks, but 99% of the time it'll work.

    7. a1o ◴[] No.41279434[source]
    It's not even about doing it, once added you have to maintain it, and then tomorrow a new format arises that makes this more a hassle, or some memory issue in an existing format is fixed in a way that changes it's memory profile and now VLC will crash with an out of memory.

    Seriously, I don't get these people that have infinite demands from open source developers and contribute zero.

    replies(2): >>41279445 #>>41280375 #
    8. armada651 ◴[] No.41279445{3}[source]
    You already have to maintain seeking code, stepping back one frame is just a specialized case for your seeking code.
    replies(1): >>41280779 #
    9. KingMob ◴[] No.41280375{3}[source]
    It's because the developer is misconstruing a non-technical decision they made as a technical limitation.

    The commenters are trying to point this out, which misses the reality that the developer probably isn't going to budge from their requirement of universal support.

    That dev's rationalization also sends a signal to any commenter with the technical chops to submit a PR, that it will probably be rejected for not supporting 100% of the codecs. I have no doubt people who could do it, over the years looked at that thread and concluded it would be a waste of their time.

    replies(1): >>41281735 #
    10. mrob ◴[] No.41280779{4}[source]
    You already have to maintain code for seeking by time. There's not necessarily any easy way to convert between time and frame count.
    replies(1): >>41281111 #
    11. _flux ◴[] No.41281111{5}[source]
    VLC knows the timestamp of the current frame. From that information it can seek to a frame that is before the current frame, possibly by just subtracting the inverse of frame rate from the current frame's timestamp and if seeking to that time results in seeking to the same frame, try again a bit older.

    I'm relatively sure this can be implemented in terms of timestamp-based seeking. Quite possibly the metadata of the frames is already in the memory, further simplifying the process.

    replies(1): >>41281803 #
    12. a1o ◴[] No.41281735{4}[source]
    If someone really wanted to do it they will be contributing already continually and at some point start working on this with the expectation that they are the one maintaining it. And it would be fine because by then developers would already trust that person since they've been reliable.

    It's not about "technical chops", it's about being constantly available, reliable person that shows to contribute day after day. If you don't do that why should a dev make the scope of their work bigger if they won't be able to keep putting the same quality of work?

    replies(1): >>41288304 #
    13. lupusreal ◴[] No.41281803{6}[source]
    > just subtracting the inverse of frame rate from the current frame's timestamp

    Variable frame rate (VFR) videos break this approach. It might seem like an esoteric edge case, TV and movies aren't VFR after all, but VFR is extremely common in videos from smartphones.

    replies(2): >>41288866 #>>41290396 #
    14. KingMob ◴[] No.41288304{5}[source]
    > why should a dev make the scope of their work bigger if they won't be able to keep putting the same quality of work?

    They shouldn't...but that's not at all what the primary developer said.

    The issue is the primary dev seems to require reverse seek functionality to work with all codecs, and since some obscure codecs can't efficiently support it, they're not interested. Their challenge to others to submit a PR is counteracted by all the signs that they might provide a high-to-impossible barrier to approval.

    It's not clear that even a trusted contributor would be able to sway this person's mind. Most likely, contributors either agree, or keep quiet on the issue if they disagree.

    replies(1): >>41290352 #
    15. _flux ◴[] No.41288866{7}[source]
    This is why I also suggested a fallback in case it lands up in the same frame, but yes, it also needs checking that the next frame is indeed the original frame.

    I expect it to work unless the frame rate is wildly varying, e.g. 60 fps and 60 spf in the same video. I guess one reasonable use case would be video that's triggered by motion, though. It would still work for almost every video.

    16. account42 ◴[] No.41290352{6}[source]
    It's telling that there is no other VLC developer commenting in that thread - neither to support the decision and calm things down nor to go agains Remi's decree.
    17. account42 ◴[] No.41290396{7}[source]
    > TV and movies aren't VFR after all

    There are TV shows that have telecined film segments and also interlaced VFX sections. While this wasn't broadcast as VFR the best way (as in highest quality result) to convert to a fully progressive frame sequence for display on modern displays would end up recombining the two fields for telecined segments (keeping the framerate) while doubling the framerate during deinterlacing for the VFX segments.

    But VFR is also irrelevant to the problem at hand since it doesn't make it harder to find the next keyframe before the current frame - you need an index for that anyway.