Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#10994 closed defect (duplicate)

Trancoding from h264 to DNxHR LB fail

Reported by: Fractale Owned by:
Priority: normal Component: undetermined
Version: 7.0 Keywords: DNxHD dnxhd put_bits buffer
Cc: Fractale Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

ffmpeg -i 2024-04-25_18-33-07.mkv -vcodec dnxhd -profile:v dnxhr_lb -vf scale=-1:540 tmp.mov
ffmpeg version 7.0-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Input #0, matroska,webm, from '2024-04-25_18-33-07.mkv':
  Metadata:
    ENCODER         : Lavf60.16.100
  Duration: 00:49:18.57, start: 0.000000, bitrate: 3760 kb/s
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn
      Metadata:
        DURATION        : 00:49:18.566000000
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
      Metadata:
        title           : simple_aac_recording0
        DURATION        : 00:49:18.506000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> dnxhd (native))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'tmp.mov':
  Metadata:
    encoder         : Lavf61.1.100
  Stream #0:0: Video: dnxhd (DNXHR LB) (AVdh / 0x68645641), yuv422p(tv, bt709, progressive), 960x540 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 15360 tbn
      Metadata:
        DURATION        : 00:49:18.566000000
        encoder         : Lavc61.3.100 dnxhd
  Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
      Metadata:
        title           : simple_aac_recording0
        DURATION        : 00:49:18.506000000
        encoder         : Lavc61.3.100 aac
Internal error, put_bits buffer too small
Assertion s->buf_ptr < s->buf_end failed at D:/code/ffmpeg/src/libavcodec/put_bits.h:150

Change History (4)

comment:1 by Fractale, 7 months ago

to get access to my original file use the following link:
https://drive.google.com/file/d/1AGcH8t7gNeSMLUqSZSNBmuTZagfB8RrM/view?usp=sharing

comment:2 by Fractale, 7 months ago

The file come from OBS and as soon as the file get large, the transcoding fails. Small files taken in the same condition works perfectly. The duration looks to be show the issue ?

comment:3 by mkver, 7 months ago

Resolution: duplicate
Status: newclosed

Duplicate of #9846.
(It has nothing to do with the duration (apart from the obvious fact that it is more likely to run into this issue with a longer file): the errors always happen at the same position in the input file, even when using seeks.)

comment:4 by Fractale, 7 months ago

Thanks @mkver for looking at my issue. I tried to receive email on the issue you pointed but I might have done something wrong.
Are you working or anyone else on this issue ?
Maybe I can help? (The issue has to be really simple, I’m not an expert)

Note: See TracTickets for help on using tickets.