Skip to content

[Bug]: Conversion failed! while creating final video #1797

Closed

Description

@joshholly

Describe the bug

ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'assets/temp/15su71p/background.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:04.60, start: 0.000000, bitrate: 1422 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1418 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 (h264) -> crop:default
  crop:default -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[NULL @ 0x7f9f4da04cc0] Invalid NAL unit size (6501 > 6478).
[NULL @ 0x7f9f4da04cc0] missing picture in access unit with size 6482
[h264 @ 0x7f9f4d8919c0] Invalid NAL unit size (6501 > 6478).
[h264 @ 0x7f9f4d8919c0] Error splitting the input into NAL units.
Error while decoding stream #0:0: Invalid data found when processing input
[libx264 @ 0x7f9f4d830a00] using SAR=1/1
[libx264 @ 0x7f9f4d830a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f9f4d830a00] profile High, level 4.1, 4:2:0, 8-bit
[libx264 @ 0x7f9f4d830a00] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=16 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=20000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'assets/temp/15su71p/background_noaudio.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf60.3.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p, 608x1080 [SAR 1:1 DAR 76:135], q=2-31, 20000 kb/s, 30 fps, 15360 tbn
    Metadata:
      encoder         : Lavc60.3.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/20000000 buffer size: 0 vbv_delay: N/A
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=-577014:32:22.77 bitrate=N/A speed=N/A    d=N/A    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x7f9f4d830a00] final ratefactor: 2.57
Conversion failed!

Reproduction Steps

Run the bot, wait for "Creating Final Video" and it will fail

Expected behavior

Create video

Screenshots

No response

System Information

Operating System : MacOS Sonoma
Python version : Python 3.10
App version / Branch : 3.2

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.

Additional Context

No response

Activity

  1. added
    bug
    on Aug 17, 2023
  2. MattPlayGamez commented on Aug 18, 2023

    @MattPlayGamez

    I got the same error

    ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ Creating the final video 🎥                                                                                 │╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ffmpeg version 4.3.6-0+deb11u1+rpt3 Copyright (c) 2000-2023 the FFmpeg developers
      built with gcc 10 (Debian 10.2.1-6)
      configuration: --prefix=/usr --extra-version=0+deb11u1+rpt3 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --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 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --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, mov,mp4,m4a,3gp,3g2,mj2, from 'assets/temp/15ucbrx/background.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf58.45.100
      Duration: 00:00:02.59, start: 0.000000, bitrate: 5240 kb/s
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 5266 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
        Metadata:
          handler_name    : ISO Media file produced by Google Inc.
    Stream mapping:
      Stream #0:0 (h264) -> crop
      crop -> Stream #0:0 (libx264)
    Press [q] to stop, [?] for help
    [h264 @ 0x5592ef28d0] Invalid NAL unit size (22841 > 21263)..77 bitrate=  -0.0kbits/s speed=N/A
    [h264 @ 0x5592ef28d0] Error splitting the input into NAL units.
    Error while decoding stream #0:0: Invalid data found when processing input
    [libx264 @ 0x5592e2ee10] using SAR=1/1
    [libx264 @ 0x5592e2ee10] using cpu capabilities: ARMv8 NEON
    [libx264 @ 0x5592e2ee10] profile High, level 4.1, 4:2:0, 8-bit
    [libx264 @ 0x5592e2ee10] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=20000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'assets/temp/15ucbrx/background_noaudio.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf58.45.100
        Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 608x1080 [SAR 1:1 DAR 76:135], q=-1--1, 20000 kb/s, 59.94 fps, 60k tbn, 59.94 tbc (default)
        Metadata:
          encoder         : Lavc58.91.100 libx264
        Side data:
          cpb: bitrate max/min/avg: 0/0/20000000 buffer size: 0 vbv_delay: N/A
    frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [libx264 @ 0x5592e2ee10] final ratefactor: 8.56
    Conversion failed!
    
    
  3. xJWzZ commented on Aug 21, 2023

    @xJWzZ
    Contributor

    Which background video is in your config file?
    I get errors with many of them. Try using minecraft as your background video

  4. xJWzZ commented on Aug 21, 2023

    @xJWzZ
    Contributor

    Solution

    I got these same errors and have found the root cause to be using the wrong version of yt-dlp.
    Follow these steps to fix:

    1. Delete assets folder
    2. run pip install yt-dlp==2023.7.6
    3. run python main.py
  5. added a commit that references this issue on Aug 21, 2023
    85b71ae
  6. MattPlayGamez commented on Aug 22, 2023

    @MattPlayGamez

    @xJWzZ Thanks for responding!
    I'm right now on Vacation but I will check it out

  7. added a commit that references this issue on Apr 5, 2026
    410810e
  8. added a commit that references this issue on Oct 23, 2026
    ba8a7ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions