Skip to content

The generated snapshot is a blank image. #105

Closed

Description

@ijuniorfu

What happened?

Video HDR10

[Demuxer] Opened: 3 streams, duration=76640000 us
[Demuxer]   stream[0] type=video codec=hevc 3840x2160
[Demuxer]   stream[1] type=video codec=hevc 1920x1080
[Demuxer]   stream[2] type=audio codec=ac3 0x0
[FrameDecode] Opened 3840x2160 codec=hevc threads=2
[HLSSegmentProducer] seg-36.m4s captured (25851513 B)
[LagDiag] clk=11.38 dclk=0.00 tcs=paused rate=0.00 wait=- fwd=4.5 keepUp=y empty=n drop=0+0 stall=0 ready=y thermal=nominal net=0.0 restarts=0
[in @ 0x9dce06dc0] [warning] Changing video frame properties on the fly is not supported by all filters.
[in @ 0x9dce06dc0] [warning] filter context - w: 3840 h: 2160 fmt: 62 csp: unknown range: unknown alpha: unspecified, incoming frame - w: 3840 h: 2160 fmt: 62 csp: bt2020nc range: tv alpha: unspecified pts_time: 4200
[FrameExtractor] miss mode=snapshot t=611.25s took=2419ms bytes=0 reopened=y image=ok cancelled=n

Steps to reproduce

No response

AetherEngine version or commit SHA

52b6ade

Host app

AetherPlayer

Platform

macOS

OS version

macOS 26.5.1

Device / chip

Mac mini m4

Playback path

Native AVPlayer

Source media (for playback bugs)

No response

Error codes / log lines


Anything else

No response

Activity

  1. added
    bug
    on Jul 6, 2026
  2. superuser404notfound commented on Jul 6, 2026

    @superuser404notfound
    Owner

    Thanks for the report. I dug into this and the tone-map/HDR path is almost certainly not the cause here, the still extractor renders normal HDR10 content correctly in isolation. The blank frame traces to a seek/duration mismatch, and one line in your log points right at it:

    [Demuxer] Opened: 3 streams, duration=76640000 us   <- extractor demuxer sees 76.64s
    [FrameExtractor] miss mode=snapshot t=611.25s ...    <- but the still is requested at 611.25s
    

    The still extractor opens its own independent FFmpeg demuxer against the source, separate from playback. That demuxer only knows a duration of 76.64s, yet the requested position is 611.25s, roughly 8x past the end it can see. Seeking that far past the demuxer's EOF lands on a garbage/empty frame, which is why the decode "succeeds" (image=ok) but the image is blank. The pts_time: 4200 and bytes=0 in the same log line fit a partial or truncated view of the source rather than a full one.

    To pin down whether this is on the engine side (extractor demuxer getting a short/partial duration) or upstream (a position past the real end), a few questions:

    1. What is the actual full duration of this video (the real runtime, e.g. what playback shows as the total)? If it is genuinely around 76 seconds, that changes the diagnosis entirely.
    2. What is the source? A local file, SMB, a Jellyfin/Emby stream, or a single-connection HTTP link (debrid resolve / torrent-cache token)? Single-connection sources are the ones where a second, independent demuxer cannot fully read the file.
    3. Is the snapshot blank at every scrub position, or only past a certain point / only for this title?
    4. If you can, an unfiltered FrameExtractor log for one blank capture (log stream --predicate 'eventMessage CONTAINS "FrameExtractor" OR eventMessage CONTAINS "FrameDecode" OR eventMessage CONTAINS "Demuxer"') would confirm which layer reports the short duration.

    If it turns out to be a single-connection source, this is the same root class as #106, and the fix direction (decode the still from already-produced cache bytes instead of a second demuxer) applies here too.

  3. ijuniorfu commented on Jul 6, 2026

    @ijuniorfu
    Author

    Thanks for the report. I dug into this and the tone-map/HDR path is almost certainly not the cause here, the still extractor renders normal HDR10 content correctly in isolation. The blank frame traces to a seek/duration mismatch, and one line in your log points right at it:

    [Demuxer] Opened: 3 streams, duration=76640000 us   <- extractor demuxer sees 76.64s
    [FrameExtractor] miss mode=snapshot t=611.25s ...    <- but the still is requested at 611.25s
    

    The still extractor opens its own independent FFmpeg demuxer against the source, separate from playback. That demuxer only knows a duration of 76.64s, yet the requested position is 611.25s, roughly 8x past the end it can see. Seeking that far past the demuxer's EOF lands on a garbage/empty frame, which is why the decode "succeeds" (image=ok) but the image is blank. The pts_time: 4200 and bytes=0 in the same log line fit a partial or truncated view of the source rather than a full one.

    To pin down whether this is on the engine side (extractor demuxer getting a short/partial duration) or upstream (a position past the real end), a few questions:

    1. What is the actual full duration of this video (the real runtime, e.g. what playback shows as the total)? If it is genuinely around 76 seconds, that changes the diagnosis entirely.
    2. What is the source? A local file, SMB, a Jellyfin/Emby stream, or a single-connection HTTP link (debrid resolve / torrent-cache token)? Single-connection sources are the ones where a second, independent demuxer cannot fully read the file.
    3. Is the snapshot blank at every scrub position, or only past a certain point / only for this title?
    4. If you can, an unfiltered FrameExtractor log for one blank capture (log stream --predicate 'eventMessage CONTAINS "FrameExtractor" OR eventMessage CONTAINS "FrameDecode" OR eventMessage CONTAINS "Demuxer"') would confirm which layer reports the short duration.

    If it turns out to be a single-connection source, this is the same root class as #106, and the fix direction (decode the still from already-produced cache bytes instead of a second demuxer) applies here too.

    1. I see—it must be the ISO remote video; I've changed the title, Not the default title. The snapshot generated from the default title is fine.
  4. ijuniorfu commented on Jul 6, 2026

    @ijuniorfu
    Author
    Image title 1 Image title 2

    Why is the position of "title 1" greater than its duration?

    There is a 1-second difference between the duration(2:05:09) in the TitleInfo for "title 2" and engine.$duration(2:05:08).

  5. added a commit that references this issue on Jul 6, 2026
  6. superuser404notfound commented on Jul 6, 2026

    @superuser404notfound
    Owner

    Thanks, the log and the two screenshots pin it down completely. This is a multi-title Blu-ray with anti-rip playlist obfuscation, and it is neither the tone-map path nor the single-connection case from #106.

    Your disc has decoy playlists. The one your UI shows as "Title 1" (5:23:17) is not a real 5-hour feature: its playlist references a single ~76 second menu/loop clip 252 times, which inflates its declared duration to 5+ hours. The decoder, however, only ever sees that one clip's ~76 seconds of timeline (that is the duration=76640000 us in the log, and the 1:16 total on your scrubber). The title picker ranked titles purely by declared duration, so this decoy outranked the real feature and became the default/main title. Any snapshot past 76 seconds then seeked past the end of what the decoder actually had and decoded a blank frame that still reported success, which is the blank image you saw.

    That also answers your two questions:

    1. "Why is the position of Title 1 greater than its duration?" Because Title 1 is the decoy. The engine's duration is the ~76 seconds the decoder can see, but playback loops through all 252 repeats of the clip, so the playhead keeps advancing past 76 seconds while the reported duration stays at 76. That mismatch is the bug, not something on your side.
    2. The 1 second difference between TitleInfo (2:05:09) and engine.$duration (2:05:08) is just rounding between the Blu-ray playlist time base (45 kHz ticks) and the container duration. Cosmetic, not a fault.

    Your "Title 2" (2:05:09) is the real feature: a single clip, correct duration, and it snapshots fine, which matches what you observed.

    Fix, now on main (AetherEngine ee34723):

    • The title picker discards repeated-clip decoys (a playlist dominated by one clip repeated many times) before ranking by duration, so the real feature becomes the main title. Legitimate multi-clip titles (seamless branching, multi-angle) are unaffected.
    • As defense in depth, the still extractor now clamps any request past the known duration to the last real frame instead of reading past the end into a blank.

    This is live in AetherPlayer 0.9.2 (built on that engine commit). Please update and confirm the snapshots come through on this disc. If the picker now lands you on the real feature and stills work, this can close.

  7. ijuniorfu commented on Jul 6, 2026

    @ijuniorfu
    Author

    When I switch to title3, the snapshot is still the one captured from title1.

  8. ijuniorfu commented on Jul 6, 2026

    @ijuniorfu
    Author
    Image title3 Image title4

    The positions and durations of these two titles still appear inconsistent.

    error.log.txt

  9. added a commit that references this issue on Jul 6, 2026
  10. superuser404notfound commented on Jul 6, 2026

    @superuser404notfound
    Owner

    Thanks for the re-test, the log confirms the decoy fix landed: the disc now recognizes 14 titles (the two decoy playlists are gone) and the real 2:05 feature is the default title. The two things you saw next are separate disc bugs, and both are now fixed on main (565c936) and shipping in AetherPlayer 0.9.3.

    1. Wrong duration on the short titles (Title 3 showing 25:30:43, Title 4 showing 0:05). Those titles concatenate several small clips whose timestamps are discontinuous, and FFmpeg's duration estimate over that is unreliable, so a 42-second title measured as 25.5 hours (and built ~23000 phantom segments) while a 35-second title measured as 5 seconds. The disc's own playlist already knows the real duration (that is what the title list shows correctly), so the engine now trusts that. The scrubber total and the playhead position line up again. As a side effect the 1-second TitleInfo vs duration difference you noted earlier is gone too.

    2. Snapshot stuck on the previous title. The full-resolution snapshot opened the disc's default title no matter which title you had selected, so it always captured a frame from the main feature. It now follows the selected title.

    Please update to AetherPlayer 0.9.3 and check both on this disc. If the short titles show a sane duration and the snapshot matches the title you are on, this can close.

  11. ijuniorfu commented on Jul 7, 2026

    @ijuniorfu
    Author
    1. Wrong duration on the short titles: resolved

    However, the position is still not quite accurate.

    Image Image
    1. Snapshot stuck on the previous title: resolved

    err.t.log.txt

  12. added a commit that references this issue on Jul 7, 2026
  13. superuser404notfound commented on Jul 7, 2026

    @superuser404notfound
    Owner

    Thanks for the re-test, and good to hear the short-title durations and the snapshot-follows-title are both confirmed.

    The remaining "position not quite accurate" is a third, separate bug on the same multi-clip titles, and it is now fixed on main (46d6c99, in AetherPlayer 0.9.5).

    What was happening: a multi-clip Blu-ray title is several m2ts clips stitched together, and each clip carries its own internal clock (STC). Read as one stream, the source timestamps jump at every clip boundary. On title 3 the trailing clip jumped the timeline by about 91803 seconds, so once playback crossed into it the position readout showed the raw clip time (1:10:14 instead of ~0:41), the scrubber pinned to the end, and decoding ran past the real content into a blank frame. The earlier duration fix corrected the scrubber total and the segment plan, but not the reported position, which is why this one survived.

    The fix folds every clip of a multi-clip title onto one continuous timeline before it reaches the player: each clip's timestamps are pulled back to continue right where the previous clip ended, with the first clip left untouched, so single-clip titles and the main feature are unchanged.

    Please update to AetherPlayer 0.9.5 and check the short titles again (title 3 / title 4): the position should track the scrubber, and the snapshot on the trailing clip should come through. If both look right on this disc, this can close.

  14. ijuniorfu commented on Jul 7, 2026

    @ijuniorfu
    Author

    main (46d6c99)

    3.position not quite accurate : It is still the same situation.Not resolved

    test.log.txt

  15. superuser404notfound commented on Jul 7, 2026

    @superuser404notfound
    Owner

    Thanks for the re-test, and for the clean log. It shows the round-3 fold did not go far enough, and the log pins down why.

    The root cause is a timestamp wrap. A multi-clip title stitches several m2ts clips together, and each clip carries its own internal clock. To fold them onto one timeline, the previous build predicted each clip's offset from the Blu-ray playlist's in-time field. That field is a 32-bit value that wraps roughly every 26.5 hours. On this disc the trailing clip's internal clock sits at about 96043 seconds, past that wrap, so the playlist read it as about 599 seconds and the predicted offset came out with the wrong sign. The clip was pushed further out instead of pulled back, which is why the position stayed wrong.

    The fix (on main as AetherEngine 95aef3a, in AetherPlayer 0.9.6) stops predicting the offset from the playlist and measures it from the clip's actual decoded timestamps, which the decoder has already unwrapped correctly. Each later clip is anchored to continue right after the previous one using its observed base, so the wrap can no longer throw it off. Single-clip titles and the main feature are untouched.

    Please update to AetherPlayer 0.9.6 and check title 3 and title 4 again: the position should track the scrubber, and the snapshot on the trailing clip should come through. If both look right on this disc, this can close.

  16. ijuniorfu commented on Jul 7, 2026

    @ijuniorfu
    Author

    (on main as AetherEngine 95aef3a)

    3.position not quite accurate : It is still the same situation.Not resolved

    test.t.log.txt

  17. added a commit that references this issue on Jul 7, 2026
  18. superuser404notfound commented on Jul 7, 2026

    @superuser404notfound
    Owner

    Thanks for the re-test and the clean log. It shows the round-4 fold is actually working now: on this log the trailing clip folds onto a contiguous timeline instead of leaping (the 96043s clip lands right after the previous one, and the 8-clip title runs smoothly from start to end). The position you are still seeing wrong is a separate problem that the fold rounds never touched, and the log and your two screenshots pin it down.

    A multi-clip disc title reports its total from the Blu-ray playlist, which is measured from zero, but the raw clip clocks start at a large offset (about 600 seconds on one of these titles, about 4200 on the other). The player was publishing the playhead on that raw clip axis while the total stayed on the zero axis, so a 35 second title showed the playhead at 10:04 against a 0:35 total, the ball pinned itself to the end, and a seek could not land. That also explains the earlier "position greater than duration" you first reported.

    The fix (on main as AetherEngine 83cffa7, in AetherPlayer 0.9.7) publishes the playhead, the buffer and the seek target on the same zero-based axis as the total, so the position tracks the scrubber and seeking lands where you drop it. Subtitle timing and normal single-clip titles are unaffected.

    Please update to AetherPlayer 0.9.7 and check titles 3 and 4 again: the elapsed time should start at 0:00 and match the total, and scrubbing should land at the right frame. If both look right on this disc, this can close.

  19. ijuniorfu commented on Jul 7, 2026

    @ijuniorfu
    Author

    The issue has been resolved. The problem where 'title1' started at 10:01 has also been fixed. That's great.

  20. superuser404notfound commented on Jul 7, 2026

    @superuser404notfound
    Owner

    Letsgo! Thanks for your testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions