Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video-studio-edition ffmpeg issue adding intro #6868

Closed
gavio-dot opened this issue Jan 30, 2025 · 1 comment
Closed

video-studio-edition ffmpeg issue adding intro #6868

gavio-dot opened this issue Jan 30, 2025 · 1 comment
Labels
Component: Transcoding Type: Bug 🐛 Confirmed bug, at least replicated once by another contributor

Comments

@gavio-dot
Copy link
Contributor

gavio-dot commented Jan 30, 2025

Adding an intro to a video (both mp4 format but different resolutions) always throws

Error: ffmpeg exited with code 1: Stream specifier '' in filtergraph description [1][0]scale2ref=w=iw:h=ih[intro-outro][main];[intro-outro][main]scale2ref=w=iw:h=ih[to-scale][main];[to-scale]drawbox=t=fill[to-scale-bg];[1][to-scale-bg]scale2ref=w=iw:h=ih:force_original_aspect_ratio=decrease:flags=spline[to-scale][to-scale-bg];[to-scale-bg][to-scale]overlay=x=(main_w - overlay_w)/2:y=(main_h - overlay_h)/2[intro-outro-resized];[intro-outro-resized][main]concat=n=2:v=1:unsafe=1[v] matches no streams.

    at ChildProcess.<anonymous> (/var/www/peertube/versions/peertube-v7.0.1/node_modules/fluent-ffmpeg/lib/processor.js:180:22)
    at ChildProcess.emit (node:events:518:28)
    at ChildProcess._handle.onexit (node:internal/child_process:293:12)

and in logs I get these two errors

error[30/01/2025, 10:46:11] Error in ffmpeg.

{
  "err": {
    "stack": "Error: ffmpeg exited with code 1: Stream specifier '' in filtergraph description [1][0]scale2ref=w=iw:h=ih[intro-outro][main];[intro-outro][main]scale2ref=w=iw:h=ih[to-scale][main];[to-scale]drawbox=t=fill[to-scale-bg];[1][to-scale-bg]scale2ref=w=iw:h=ih:force_original_aspect_ratio=decrease:flags=spline[to-scale][to-scale-bg];[to-scale-bg][to-scale]overlay=x=(main_w - overlay_w)/2:y=(main_h - overlay_h)/2[intro-outro-resized];[intro-outro-resized][main]concat=n=2:v=1:unsafe=1[v] matches no streams.\n\n    at ChildProcess.<anonymous> (/var/www/peertube/versions/peertube-v7.0.1/node_modules/fluent-ffmpeg/lib/processor.js:180:22)\n    at ChildProcess.emit (node:events:518:28)\n    at ChildProcess._handle.onexit (node:internal/child_process:293:12)",
    "message": "ffmpeg exited with code 1: Stream specifier '' in filtergraph description [1][0]scale2ref=w=iw:h=ih[intro-outro][main];[intro-outro][main]scale2ref=w=iw:h=ih[to-scale][main];[to-scale]drawbox=t=fill[to-scale-bg];[1][to-scale-bg]scale2ref=w=iw:h=ih:force_original_aspect_ratio=decrease:flags=spline[to-scale][to-scale-bg];[to-scale-bg][to-scale]overlay=x=(main_w - overlay_w)/2:y=(main_h - overlay_h)/2[intro-outro-resized];[intro-outro-resized][main]concat=n=2:v=1:unsafe=1[v] matches no streams.\n"
  },
  "stdout": "",
  "stderr": "ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers\n  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)\n  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --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-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\n  libavutil      56. 70.100 / 56. 70.100\n  libavcodec     58.134.100 / 58.134.100\n  libavformat    58. 76.100 / 58. 76.100\n  libavdevice    58. 13.100 / 58. 13.100\n  libavfilter     7.110.100 /  7.110.100\n  libswscale      5.  9.100 /  5.  9.100\n  libswresample   3.  9.100 /  3.  9.100\n  libpostproc    55.  9.100 / 55.  9.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/peertube/storage/streaming-playlists/hls/private/f51fac26-0384-493d-91cc-28a7fc8c9a62/8c5d1939-3868-4535-b7d5-61694772641f-720-fragmented.mp4':\n  Metadata:\n    major_brand     : iso5\n    minor_version   : 512\n    compatible_brands: iso5iso6mp41\n    encoder         : Lavf58.76.100\n  Duration: 00:00:30.10, start: 0.132682, bitrate: 492 kb/s\n  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 452 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)\n    Metadata:\n      handler_name    : VideoHandler\n      vendor_id       : [0][0][0][0]\nInput #1, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/peertube/storage/streaming-playlists/hls/private/f51fac26-0384-493d-91cc-28a7fc8c9a62/32c48614-b729-439c-af55-2e869d84bbec-0-fragmented.mp4':\n  Metadata:\n    major_brand     : iso5\n    minor_version   : 512\n    compatible_brands: iso5iso6mp41\n    encoder         : Lavf58.76.100\n  Duration: 00:00:30.53, start: 0.000000, bitrate: 162 kb/s\n  Stream #1:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 146 kb/s (default)\n    Metadata:\n      handler_name    : SoundHandler\n      vendor_id       : [0][0][0][0]\nInput #2, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/peertube/storage/tmp-persistent/759dc91cd807e755b329b09791fb9157.mp4':\n  Metadata:\n    major_brand     : isom\n    minor_version   : 512\n    compatible_brands: isomiso2avc1mp41\n    creation_time   : 2024-12-04T17:29:14.000000Z\n    encoder         : Blackmagic Design DaVinci Resolve\n  Duration: 00:00:08.13, start: 0.000000, bitrate: 1601 kb/s\n  Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1271 kb/s, 30 fps, 30 tbr, 15360 tbn, 30720 tbc (default)\n    Metadata:\n      creation_time   : 2024-12-04T17:29:14.000000Z\n      handler_name    : VideoHandler\n      vendor_id       : [0][0][0][0]\n      encoder         : H.264\n      timecode        : 01:00:00:00\n  Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 319 kb/s (default)\n    Metadata:\n      creation_time   : 2024-12-04T17:29:14.000000Z\n      handler_name    : SoundHandler\n      vendor_id       : [0][0][0][0]\n  Stream #2:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)\n    Metadata:\n      creation_time   : 2024-12-04T17:29:14.000000Z\n      handler_name    : TimeCodeHandler\n      timecode        : 01:00:00:00\nStream specifier '' in filtergraph description [1][0]scale2ref=w=iw:h=ih[intro-outro][main];[intro-outro][main]scale2ref=w=iw:h=ih[to-scale][main];[to-scale]drawbox=t=fill[to-scale-bg];[1][to-scale-bg]scale2ref=w=iw:h=ih:force_original_aspect_ratio=decrease:flags=spline[to-scale][to-scale-bg];[to-scale-bg][to-scale]overlay=x=(main_w - overlay_w)/2:y=(main_h - overlay_h)/2[intro-outro-resized];[intro-outro-resized][main]concat=n=2:v=1:unsafe=1[v] matches no streams.\n",
  "shellCommand": "ffmpeg -n 15 /usr/bin/ffmpeg -i /var/www/peertube/storage/streaming-playlists/hls/private/f51fac26-0384-493d-91cc-28a7fc8c9a62/8c5d1939-3868-4535-b7d5-61694772641f-720-fragmented.mp4 -i /var/www/peertube/storage/streaming-playlists/hls/private/f51fac26-0384-493d-91cc-28a7fc8c9a62/32c48614-b729-439c-af55-2e869d84bbec-0-fragmented.mp4 -i /var/www/peertube/storage/tmp-persistent/759dc91cd807e755b329b09791fb9157.mp4 -y -filter_complex [1][0]scale2ref=w=iw:h=ih[intro-outro][main];[intro-outro][main]scale2ref=w=iw:h=ih[to-scale][main];[to-scale]drawbox=t=fill[to-scale-bg];[1][to-scale-bg]scale2ref=w=iw:h=ih:force_original_aspect_ratio=decrease:flags=spline[to-scale][to-scale-bg];[to-scale-bg][to-scale]overlay=x=(main_w - overlay_w)/2:y=(main_h - overlay_h)/2[intro-outro-resized];[intro-outro-resized][main]concat=n=2:v=1:unsafe=1[v] -acodec aac -vcodec libx264 -f mp4 -movflags faststart -max_muxing_queue_size 1024 -map_metadata -1 -pix_fmt yuv420p -channel_layout stereo -r 30 -crf 23 -g:v 60 -map [v] /var/www/peertube/storage/tmp/bd12e499-9f18-46a0-8517-f3d8660515b7.mp4",
  "tags": [
    "ffmpeg"
  ]
}
error[30/01/2025, 10:46:11] Cannot execute job 4 in queue video-studio-edition.

{
  "payload": {
    "videoUUID": "f51fac26-0384-493d-91cc-28a7fc8c9a62",
    "tasks": [
      {
        "name": "add-intro",
        "options": {
          "file": "/var/www/peertube/storage/tmp-persistent/759dc91cd807e755b329b09791fb9157.mp4"
        }
      }
    ]
  },
  "err": {
    "stack": "Error: ffmpeg exited with code 1: Stream specifier '' in filtergraph description [1][0]scale2ref=w=iw:h=ih[intro-outro][main];[intro-outro][main]scale2ref=w=iw:h=ih[to-scale][main];[to-scale]drawbox=t=fill[to-scale-bg];[1][to-scale-bg]scale2ref=w=iw:h=ih:force_original_aspect_ratio=decrease:flags=spline[to-scale][to-scale-bg];[to-scale-bg][to-scale]overlay=x=(main_w - overlay_w)/2:y=(main_h - overlay_h)/2[intro-outro-resized];[intro-outro-resized][main]concat=n=2:v=1:unsafe=1[v] matches no streams.\n\n    at ChildProcess.<anonymous> (/var/www/peertube/versions/peertube-v7.0.1/node_modules/fluent-ffmpeg/lib/processor.js:180:22)\n    at ChildProcess.emit (node:events:518:28)\n    at ChildProcess._handle.onexit (node:internal/child_process:293:12)",
    "message": "ffmpeg exited with code 1: Stream specifier '' in filtergraph description [1][0]scale2ref=w=iw:h=ih[intro-outro][main];[intro-outro][main]scale2ref=w=iw:h=ih[to-scale][main];[to-scale]drawbox=t=fill[to-scale-bg];[1][to-scale-bg]scale2ref=w=iw:h=ih:force_original_aspect_ratio=decrease:flags=spline[to-scale][to-scale-bg];[to-scale-bg][to-scale]overlay=x=(main_w - overlay_w)/2:y=(main_h - overlay_h)/2[intro-outro-resized];[intro-outro-resized][main]concat=n=2:v=1:unsafe=1[v] matches no streams.\n",
    "stdout": "",
    "stderr": "ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers\n  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)\n  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --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-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\n  libavutil      56. 70.100 / 56. 70.100\n  libavcodec     58.134.100 / 58.134.100\n  libavformat    58. 76.100 / 58. 76.100\n  libavdevice    58. 13.100 / 58. 13.100\n  libavfilter     7.110.100 /  7.110.100\n  libswscale      5.  9.100 /  5.  9.100\n  libswresample   3.  9.100 /  3.  9.100\n  libpostproc    55.  9.100 / 55.  9.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/peertube/storage/streaming-playlists/hls/private/f51fac26-0384-493d-91cc-28a7fc8c9a62/8c5d1939-3868-4535-b7d5-61694772641f-720-fragmented.mp4':\n  Metadata:\n    major_brand     : iso5\n    minor_version   : 512\n    compatible_brands: iso5iso6mp41\n    encoder         : Lavf58.76.100\n  Duration: 00:00:30.10, start: 0.132682, bitrate: 492 kb/s\n  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 452 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)\n    Metadata:\n      handler_name    : VideoHandler\n      vendor_id       : [0][0][0][0]\nInput #1, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/peertube/storage/streaming-playlists/hls/private/f51fac26-0384-493d-91cc-28a7fc8c9a62/32c48614-b729-439c-af55-2e869d84bbec-0-fragmented.mp4':\n  Metadata:\n    major_brand     : iso5\n    minor_version   : 512\n    compatible_brands: iso5iso6mp41\n    encoder         : Lavf58.76.100\n  Duration: 00:00:30.53, start: 0.000000, bitrate: 162 kb/s\n  Stream #1:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 146 kb/s (default)\n    Metadata:\n      handler_name    : SoundHandler\n      vendor_id       : [0][0][0][0]\nInput #2, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/peertube/storage/tmp-persistent/759dc91cd807e755b329b09791fb9157.mp4':\n  Metadata:\n    major_brand     : isom\n    minor_version   : 512\n    compatible_brands: isomiso2avc1mp41\n    creation_time   : 2024-12-04T17:29:14.000000Z\n    encoder         : Blackmagic Design DaVinci Resolve\n  Duration: 00:00:08.13, start: 0.000000, bitrate: 1601 kb/s\n  Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1271 kb/s, 30 fps, 30 tbr, 15360 tbn, 30720 tbc (default)\n    Metadata:\n      creation_time   : 2024-12-04T17:29:14.000000Z\n      handler_name    : VideoHandler\n      vendor_id       : [0][0][0][0]\n      encoder         : H.264\n      timecode        : 01:00:00:00\n  Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 319 kb/s (default)\n    Metadata:\n      creation_time   : 2024-12-04T17:29:14.000000Z\n      handler_name    : SoundHandler\n      vendor_id       : [0][0][0][0]\n  Stream #2:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)\n    Metadata:\n      creation_time   : 2024-12-04T17:29:14.000000Z\n      handler_name    : TimeCodeHandler\n      timecode        : 01:00:00:00\nStream specifier '' in filtergraph description [1][0]scale2ref=w=iw:h=ih[intro-outro][main];[intro-outro][main]scale2ref=w=iw:h=ih[to-scale][main];[to-scale]drawbox=t=fill[to-scale-bg];[1][to-scale-bg]scale2ref=w=iw:h=ih:force_original_aspect_ratio=decrease:flags=spline[to-scale][to-scale-bg];[to-scale-bg][to-scale]overlay=x=(main_w - overlay_w)/2:y=(main_h - overlay_h)/2[intro-outro-resized];[intro-outro-resized][main]concat=n=2:v=1:unsafe=1[v] matches no streams.\n"
  }
}

Peertube was updated to 7.0.1 from 6.3.2 and Ubuntu upgraded to 22 LTS to get an above recommanded version of FFMPEG but still got the same error as before.
In another older installation upgraded to 6.3.3 from an older 5.something and with ubuntu 20 LTS the problem is not happening

  • PeerTube Version: 7.0.1
    • NodeJS version: v20.18.2
    • Ffmpeg version: 4.4.2-0ubuntu0.22.04.1

UPDATE:
the issue seems to be linked to the configuration setting "Split audio and video streams" that is enabled in the server with the error. If I disable it I get no ffmpeg error. Should I update ffmpeg to a more recent version to fix the problem? Any suggested version?

@Chocobozzz Chocobozzz added Type: Bug 🐛 Confirmed bug, at least replicated once by another contributor Component: Transcoding labels Jan 31, 2025
@Chocobozzz
Copy link
Owner

Thanks! It's a peertube bug, that should be fixed by 319932c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Transcoding Type: Bug 🐛 Confirmed bug, at least replicated once by another contributor
Projects
None yet
Development

No branches or pull requests

2 participants