C4illin / ConvertX

💾 Self-hosted online file converter. Supports 1000+ formats ⚙️
GNU Affero General Public License v3.0
619 stars 18 forks source link

ffmpeg error - "Conversion failed - Too many packets buffered for output stream 0:1" #34

Closed EpicLPer closed 5 months ago

EpicLPer commented 5 months ago

Heya,

I tried converting an OGG file to FLAC, however it instantly fails. According to some workarounds online adding -max_muxing_queue_size 9999 might fix this if the input file is in some form malformed (Source). Another option would be to use a more up-to-date ffmpeg build, as it seems this project currently uses 4.3.6 which is around 3 years old now.

Here are the Docker logs:

ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1 --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
Input #0, ogg, from './data/uploads/1/2/XXXXX.ogg':
  Duration: 00:03:50.24, start: 0.000000, bitrate: 351 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 320 kb/s
    Metadata:
      artist          : XXXXX
      album           : XXXXX
      disc            : 1
      track           : 1
      title           : XXXXX
      date            : Fri Jun 12 2020 00:00:00 GMT+0000 (Coordinated Universal Time)
      encoder         : Lavf58.76.100
    Stream #0:1: Video: theora, yuv444p, 640x640 [SAR 1:1 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.134.100 libtheora
      artist          : XXXXX
      album           : XXXXX
      disc            : 1
      track           : 1
      title           : XXXXX
      date            : Fri Jun 12 2020 00:00:00 GMT+0000 (Coordinated Universal Time)
Stream mapping:
  Stream #0:1 -> #0:0 (theora (native) -> png (native))
  Stream #0:0 -> #0:1 (vorbis (native) -> flac (native))
Press [q] to stop, [?] for help
[flac @ 0x590db88f6a80] encoding as 24 bits-per-sample
Too many packets buffered for output stream 0:1.
Conversion failed!
C4illin commented 5 months ago

Thanks for reporting this! In the newest image it uses alpine which has more up to date packages then debian. So could you test with the ghcr.io/c4illin/convertx:main image?

EpicLPer commented 5 months ago

The :main one seems to work, yes :)

Btw. as a bit of an offtopic question, is this project as of now safe enough to host online (only for personal use tho)?

C4illin commented 5 months ago

Nice then that is one more reason to move forward with the alpine switch.

I host it online for personal use and haven't had any issues. It is probably possible to do some denial of service attack since there is no rate limits, but nothing worse should be possible