Opened 8 months ago

Last modified 9 days ago

#10948 open defect

[ffmpeg] spdif: Unusual frame timing 40 samples/frame is not implemented.

Reported by: adolfotregosa Owned by:
Priority: critical Component: ffmpeg
Version: git-master Keywords: spdif audio cuts truehd atmos
Cc: adolfotregosa Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by adolfotregosa)

Summary of the bug:

mpv sample.mkv -ao=pulse -audio-spdif=truehd

While playing this video file with truehd atmos audio, audio cuts always on the same spot, 100% reproducible every time giving the following message.

[ffmpeg] spdif: Unusual frame timing: 10248 => 12042, 40 samples/frame is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

I compiled and tried latest ffmpeg git and mpv git with same results.

sample file -> https://tregosacloud.duckdns.org/s/HRWxz7oX7HCSSpD

Change History (3)

comment:1 by adolfotregosa, 8 months ago

Description: modified (diff)

comment:2 by adolfotregosa, 8 months ago

editing ffmpeg spdifenc.c and commenting out:

        /* sanity check */
        //if (padding_remaining < 0 || padding_remaining >= MAT_FRAME_SIZE / 2) {
        //    avpriv_request_sample(s, "Unusual frame timing: %"PRIu16" => %"PRIu16", %d samples/frame",
        //                          ctx->truehd_prev_time, input_timing, ctx->truehd_samples_per_frame);
        //    padding_remaining = 0;
       // }

Afterwards compiling ffmpeg and mpv with that change to ffmpeg seams to be fixing two issues for me. Spdif/passthrough to the AVR audio no longer cuts on the problematic spot and when seeking movie, audio is not going silent whereas it was becoming silent most of the time having one to keep seeking until audio eventually recovered.

Since I know very little of what am I doing hopefully someone who actually knows what they are doing has a look at this and implements a proper fix.

Last edited 8 months ago by adolfotregosa (previous) (diff)

comment:3 by Balling, 9 days ago

Status: newopen

It is well understood that MAT_FRAME_SIZE / 2 is wrong, it should be MAT_FRAME_SIZE * 2 https://gist.github.com/gbooker/d4fa3ba4f0ad676a403b259f3b74044e or maybe

https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200412195626.9090-1-anssi.hannula@iki.fi/

#9569

Please crossrefence your issues with mpv next time: https://github.com/mpv-player/mpv/issues/13943

Last edited 9 days ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.