Hello.
I'm responding to a request for help with ffmpeg that was output in a terminal error message via mpv media player. Full details are below but briefly, I'm on MX Linux 19.4 and using mpv/ffmpeg to play a movie MKV file with TrueHD audio (bitstreamed through an AV Receiver, in case that's relevant).

Initially the playback works fine, and remains so if left uninterrupted (at least as far as I've watched it, not the whole movie). However if I jump directly to a new point in the movie by e.g clicking in the time bar or skipping to next chapter, then sometimes - but not always - the audio is lost. The video plays ok from the new point but the audio sometimes drops out completely. When this happens, an error message is output to the terminal regarding an unusual "samples per frame" value as shown in the terminal output below, along with a request to help by uploading a sample.

I've created a 5-minute sample that I hope is enough, but the videolanfileuploader seems to require a gitlab ticket number that I don't have yet - what is the procedure now?.


A web search on the message showed only one result for the message, it was in the source code of module avformat/spdifenc, specifically a fix for handling of large TrueHD frames. This is part of a "sanity check" added by anssih and committed on 20 Feb 2020 ( https://github.com/FFmpeg/FFmpeg/commit/36e156bef02566d70cea46cc5e00b3e5d5ed3286#diff-86f89550175526d713fb8dd01b291190197a0014c46b9d9e40896ceadfa4b562R474 ):-

---------
        /* 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;
        }
---------

I think (?) I'm safe in saying that the very latest ffmpeg snapshot will not make a difference in this case.

Details:-

The following terminal output shows 3 jumps to new positions where the audio failed and the 3 error messages. On my 4th. jump the audio came back. Interestingly the 3 pairs of numbers are different but the offending value is always 40.

------------
Terminal output:-
$ mpv --vo=gpu --profile=gpu-hq "/media/vgx/ML1/The Da Vinci Code (2006)/DaVinciCode.mkv"
 (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (truehd 6ch 48000Hz)
 (+) Subs  --sid=1 --slang=eng (*) (f) (hdmv_pgs_subtitle)
ALSA lib conf.c:5014:(snd_config_expand) Unknown parameters AES0=6,AES1=130,AES2=0,AES3=14 ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM default:AES0=6,AES1=130,AES2=0,AES3=14
AO: [alsa] 192000Hz 7.1 8ch spdif-truehd
VO: [gpu] 1920x1080 yuv420p
AV: 00:10:59 / 02:54:37 (6%) A-V:  0.000 Cache: 0.0s
[ffmpeg] spdif: Unusual frame timing: 6744 => 40915, 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. [ffmpeg] spdif: If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
AV: 00:18:08 / 02:54:37 (10%) A-V:  0.000 Cache: 0.0s
[ffmpeg] spdif: Unusual frame timing: 3352 => 35793, 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. [ffmpeg] spdif: If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
AV: 00:24:23 / 02:54:37 (13%) A-V:  0.000 Cache: 0.0s
[ffmpeg] spdif: Unusual frame timing: 39704 => 1989, 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. [ffmpeg] spdif: If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
(Paused) AV: 00:24:30 / 02:54:37 (14%) A-V:  0.000 Cache: 20s/43MB


Exiting... (Quit)
---------End of terminal output

---------
mpv details:-
mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
ffmpeg library versions:
   libavutil       56.22.100 (runtime 56.51.100)
   libavcodec      58.35.100 (runtime 58.91.100)
   libavformat     58.20.100 (runtime 58.45.100)
   libswscale      5.3.100 (runtime 5.7.100)
   libavfilter     7.40.101 (runtime 7.85.100)
   libswresample   3.3.100 (runtime 3.7.100)
ffmpeg version: 4.3.2-0+deb11u1~mx19+1
------------End of mpv details
------------

ffmpeg details:-
$ ffmpeg
ffmpeg version 4.3.2-0+deb11u1~mx19+1 Copyright (c) 2000-2021 the FFmpeg 
developers
  built with gcc 8 (Debian 8.3.0-6)
configuration: --prefix=/usr --extra-version='0+deb11u1~mx19+1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
-------------End of ffmpeg details

Best regards
Geoff

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to