Opened 7 years ago

Closed 7 years ago

#5998 closed defect (fixed)

ffmpeg 3.1.0 and later fails converting some MKVs with "sample_fmt" error

Reported by: julian Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: dca regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

the error occurs at least on the file 'Goodnight.Mommy.2014.Bluray.1080p.DTS-HD.x264-Grym.mkv' but this one is 13GB and hard to get.

i tried to cut out a smaller sample out of the MKV so i could upload it here, but unfortunately the error doesn't occur on the cut sample. if anyone has any ideas for getting a smaller sample to exhibit the same issue, please let me know.

so, assuming you have downloaded the 'offending' file and named it bug.mkv
{{
ffmpeg -i bug.mkv -acodec ac3 -vcodec copy bug.mp4
}}
works fine for every version up to and including version 3.0.2
versions starting with 3.1.0 and including up to git snapshot 82713-g4e6d1c1 from 1.12 just fail to convert the file with:
'Error setting option sample_fmt to value'

i'll upload complete command line outputs for conversion with working (3.0.2) version and failing version (3.1.0).

if there are any additional informations i could provide please let me know.

Change History (18)

comment:1 by julian, 7 years ago

well, i've just cut the first 80MB of the offending file to create a sample to reproduce the issue. its not ideal but it works. if you have a better idea let me know.

please download
https://dl.dropboxusercontent.com/u/7221986/bug.mkv

if you try to convert it with the above command line with v3.0.2 it works fine until it hits the premature end of the file

if you try to convert it with 3.1.0 or later the mentioned error occurs

comment:2 by Carl Eugen Hoyos, 7 years ago

Is this issue reproducible with current FFmpeg git head?
Please post ffmpeg -i output for the 80MB sample, please do not attach compressed console output.

comment:3 by julian, 7 years ago

Is this issue reproducible with current FFmpeg git head?

as i mentioned i reproduced it using the precompiled git head from 1. dezember. i now reproduced it using precompiled git head from today ( ffmpeg-82780-gb6f80b1 ) too.

comment:4 by Carl Eugen Hoyos, 7 years ago

So why did you upload console output for old versions of FFmpeg?
Please post ffmpeg -i output for the 80MB sample.

comment:5 by julian, 7 years ago

Please post ffmpeg -i output for the 80MB sample, please do not attach compressed console output.

bad (git head)

ffmpeg version N-82780-gb6f80b1-tessus Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
  libavutil      55. 41.101 / 55. 41.101
  libavcodec     57. 66.109 / 57. 66.109
  libavformat    57. 58.101 / 57. 58.101
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 68.100 /  6. 68.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
[matroska,webm @ 0x7fe12c000600] Could not find codec parameters for stream 1 (Audio: dts, 48000 Hz, 6 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x7fe12c000600] Could not find codec parameters for stream 2 (Subtitle: hdmv_pgs_subtitle): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x7fe12c000600] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x7fe12c000600] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, matroska,webm, from 'bug.mkv':
  Metadata:
    encoder         : libebml v1.3.1 + libmatroska v1.4.2
    creation_time   : 2015-12-23T18:33:27.000000Z
  Duration: 01:40:02.79, start: 0.000000, bitrate: 109 kb/s
    Chapter #0:0: start 0.000000, end 386.094000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 386.094000, end 789.413000
    Metadata:
      title           : 00:06:26.094
    Chapter #0:2: start 789.413000, end 1208.040000
    Metadata:
      title           : 00:13:09.413
    Chapter #0:3: start 1208.040000, end 1526.399000
    Metadata:
      title           : 00:20:08.040
    Chapter #0:4: start 1526.399000, end 1867.824000
    Metadata:
      title           : 00:25:26.399
    Chapter #0:5: start 1867.824000, end 2354.393000
    Metadata:
      title           : 00:31:07.824
    Chapter #0:6: start 2354.393000, end 2865.571000
    Metadata:
      title           : 00:39:14.393
    Chapter #0:7: start 2865.571000, end 3283.446000
    Metadata:
      title           : 00:47:45.571
    Chapter #0:8: start 3283.446000, end 3701.656000
    Metadata:
      title           : 00:54:43.446
    Chapter #0:9: start 3701.656000, end 4102.264000
    Metadata:
      title           : 01:01:41.656
    Chapter #0:10: start 4102.264000, end 4493.572000
    Metadata:
      title           : 01:08:22.264
    Chapter #0:11: start 4493.572000, end 4874.411000
    Metadata:
      title           : 01:14:53.572
    Chapter #0:12: start 4874.411000, end 5372.283000
    Metadata:
      title           : 01:21:14.411
    Chapter #0:13: start 5372.283000, end 5636.714000
    Metadata:
      title           : 01:29:32.283
    Chapter #0:14: start 5636.714000, end 5801.795000
    Metadata:
      title           : 01:33:56.714
    Chapter #0:15: start 5801.795000, end 6002.746000
    Metadata:
      title           : 01:36:41.795
    Chapter #0:16: start 6002.746000, end 6002.789000
    Metadata:
      title           : 01:40:02.746
    Stream #0:0(ger): Video: h264 (High), yuv420p(progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(ger): Audio: dts, 48000 Hz, 5.1 (default)
    Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle
    Stream #0:3(eng): Subtitle: hdmv_pgs_subtitle
    Stream #0:4(spa): Subtitle: hdmv_pgs_subtitle
[abuffer @ 0x7fe12bc12a00] Unable to parse option value "(null)" as sample format
    Last message repeated 1 times
[abuffer @ 0x7fe12bc12a00] Error setting option sample_fmt to value (null).
[graph 0 input from stream 0:1 @ 0x7fe12bc12b00] Error applying options to the filter.
Error opening filters!

good (3.0.2) - starts converting but stops at EOF when using the CUT sample ... continues fine with the full 13GB file:

ffmpeg version 3.0.2-tessus Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[matroska,webm @ 0x7f801e000600] Could not find codec parameters for stream 1 (Audio: dts, 48000 Hz, 6 channels, s32p (24 bit)): no decodable DTS frames
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x7f801e000600] Could not find codec parameters for stream 2 (Subtitle: hdmv_pgs_subtitle): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x7f801e000600] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x7f801e000600] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for  Input Stream #0.1 : 5.1
Input #0, matroska,webm, from 'bug.mkv':
  Metadata:
    encoder         : libebml v1.3.1 + libmatroska v1.4.2
    creation_time   : 2015-12-23 18:33:27
  Duration: 01:40:02.79, start: 0.000000, bitrate: 109 kb/s
    Chapter #0:0: start 0.000000, end 386.094000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 386.094000, end 789.413000
    Metadata:
      title           : 00:06:26.094
    Chapter #0:2: start 789.413000, end 1208.040000
    Metadata:
      title           : 00:13:09.413
    Chapter #0:3: start 1208.040000, end 1526.399000
    Metadata:
      title           : 00:20:08.040
    Chapter #0:4: start 1526.399000, end 1867.824000
    Metadata:
      title           : 00:25:26.399
    Chapter #0:5: start 1867.824000, end 2354.393000
    Metadata:
      title           : 00:31:07.824
    Chapter #0:6: start 2354.393000, end 2865.571000
    Metadata:
      title           : 00:39:14.393
    Chapter #0:7: start 2865.571000, end 3283.446000
    Metadata:
      title           : 00:47:45.571
    Chapter #0:8: start 3283.446000, end 3701.656000
    Metadata:
      title           : 00:54:43.446
    Chapter #0:9: start 3701.656000, end 4102.264000
    Metadata:
      title           : 01:01:41.656
    Chapter #0:10: start 4102.264000, end 4493.572000
    Metadata:
      title           : 01:08:22.264
    Chapter #0:11: start 4493.572000, end 4874.411000
    Metadata:
      title           : 01:14:53.572
    Chapter #0:12: start 4874.411000, end 5372.283000
    Metadata:
      title           : 01:21:14.411
    Chapter #0:13: start 5372.283000, end 5636.714000
    Metadata:
      title           : 01:29:32.283
    Chapter #0:14: start 5636.714000, end 5801.795000
    Metadata:
      title           : 01:33:56.714
    Chapter #0:15: start 5801.795000, end 6002.746000
    Metadata:
      title           : 01:36:41.795
    Chapter #0:16: start 6002.746000, end 6002.789000
    Metadata:
      title           : 01:40:02.746
    Stream #0:0(ger): Video: h264 (High), yuv420p, 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(ger): Audio: dts, 48000 Hz, 6 channels, s32p (24 bit) (default)
    Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle
    Stream #0:3(eng): Subtitle: hdmv_pgs_subtitle
    Stream #0:4(spa): Subtitle: hdmv_pgs_subtitle
File 'bug.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'bug.mp4':
  Metadata:
    encoder         : Lavf57.25.100
    Chapter #0:0: start 0.000000, end 386.094000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 386.094000, end 789.413000
    Metadata:
      title           : 00:06:26.094
    Chapter #0:2: start 789.413000, end 1208.040000
    Metadata:
      title           : 00:13:09.413
    Chapter #0:3: start 1208.040000, end 1526.399000
    Metadata:
      title           : 00:20:08.040
    Chapter #0:4: start 1526.399000, end 1867.824000
    Metadata:
      title           : 00:25:26.399
    Chapter #0:5: start 1867.824000, end 2354.393000
    Metadata:
      title           : 00:31:07.824
    Chapter #0:6: start 2354.393000, end 2865.571000
    Metadata:
      title           : 00:39:14.393
    Chapter #0:7: start 2865.571000, end 3283.446000
    Metadata:
      title           : 00:47:45.571
    Chapter #0:8: start 3283.446000, end 3701.656000
    Metadata:
      title           : 00:54:43.446
    Chapter #0:9: start 3701.656000, end 4102.264000
    Metadata:
      title           : 01:01:41.656
    Chapter #0:10: start 4102.264000, end 4493.572000
    Metadata:
      title           : 01:08:22.264
    Chapter #0:11: start 4493.572000, end 4874.411000
    Metadata:
      title           : 01:14:53.572
    Chapter #0:12: start 4874.411000, end 5372.283000
    Metadata:
      title           : 01:21:14.411
    Chapter #0:13: start 5372.283000, end 5636.714000
    Metadata:
      title           : 01:29:32.283
    Chapter #0:14: start 5636.714000, end 5801.795000
    Metadata:
      title           : 01:33:56.714
    Chapter #0:15: start 5801.795000, end 6002.746000
    Metadata:
      title           : 01:36:41.795
    Chapter #0:16: start 6002.746000, end 6002.789000
    Metadata:
      title           : 01:40:02.746
    Stream #0:0(ger): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 16k tbn, 1k tbc (default)
    Stream #0:1(ger): Audio: ac3 ([165][0][0][0] / 0x00A5), 48000 Hz, 5.1, fltp (24 bit), 448 kb/s (default)
    Metadata:
      encoder         : Lavc57.24.102 ac3
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (dts (dca) -> ac3 (native))
Press [q] to stop, [?] for help
Input stream #0:1 frame changed from rate:48000 fmt:s32p ch:6 chl:5.1 to rate:48000 fmt:s32p ch:6 chl:5.1(side)
[matroska,webm @ 0x7f801e000600] Read error time=00:00:55.07 bitrate=10058.9kbits/s speed=55.1x    
frame= 1324 fps=1319 q=-1.0 Lsize=   68140kB time=00:00:55.19 bitrate=10112.5kbits/s speed=  55x    
video:65542kB audio:2552kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.068264%

comment:6 by julian, 7 years ago

So why did you upload console output for old versions of FFmpeg?

3.1.0 is the first release with the bug and the console output with 3.1.0 and any other later version is completely identical

comment:7 by Carl Eugen Hoyos, 7 years ago

Component: undeterminedavcodec
Keywords: dca regression added
Reproduced by developer: set
Status: newopen

in reply to:  6 comment:8 by Carl Eugen Hoyos, 7 years ago

Replying to julian:

the console output with 3.1.0 and any other later version is completely identical

For future tickets: Please remember that this is completely irrelevant, support for releases is limited, releases get no support on osx and on this bug tracker, you are required to test current FFmpeg git head when reporting issues.

comment:9 by Hendrik, 7 years ago

The file doesn't have any audio for several seconds, the console output does tell you what to do to fix it - increase analyzeduration.

comment:10 by Carl Eugen Hoyos, 7 years ago

If you believe that the text on https://evermeet.cx/ffmpeg/ is unclear please help Helmut and me to improve it.

comment:11 by julian, 7 years ago

i can confirm that just reverting commit 39f7620d76c7a133535ed7a535f7a74fefa6e435 makes the bug go away

comment:12 by julian, 7 years ago

i can no longer host the file 'bug.mkv' but for the next 5 days you should still be able to get it here:

https://www.zipshare.com/download/eyJhcmNoaXZlSWQiOiJkNWMwNzlhMy05ZDQ4LTRhNzAtYmFkZC1jYzA1NDc1ODI5MWMiLCJlbWFpbCI6ImVudGVAbWFpbGluYXRvci5jb20ifQ==

comment:13 by İsmail Dönmez, 7 years ago

I can reproduce the bug and uploaded it to https://i10z.com/tmp/bug.mkv , @cehoyos please upload it to the ffmpeg samples directory so I can delete it.

comment:16 by Hendrik, 7 years ago

This should work with git master now (after af1761f7b5b1b72197dc40934953b775c2d951cc), please confirm.

comment:17 by julian, 7 years ago

i can confirm the bug is fixed in git master. thanks very much good job

comment:18 by Hendrik, 7 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.