Hello, I am trying to setup a stream where I receive NDI from cameras on LAN and stream it live online to our wowza servers using SRT through CasparCG. We stream to these servers with the same parameters from other devices/software with no problem.
I managed to make it all run quite well, or at least so I thought. I am going to try running it just locally (with local SRT Listener) when I get access to the machine it runs on during weekend, just to test it. But I wanted to ask if anyone would be able to help me with my problem or at least point me in the right direction even before that local test.
This is my custom command for starting the stream:
ADD 2-500 STREAM "srt://ec2-3-121-221-116.eu-central-1.compute.amazonaws.com:9999?mode=caller&latency=400000&passphrase=<passphrase>&pbkeylen=32" -format mpegts -codec:v h264_nvenc -preset:v p1 -g:v 50 -x264opts:v "keyint=50" -filter:v "scale=1280:720,fps=25" -b:v 2000k -maxrate:v 2000k -codec:a aac -b:a 128k -filter:a "pan=stereo|c0=c0|c1=c1" -srt_streamid <stream_id>"
It works well at first, but after random amount of time (it ranged from 10 minutes to 2 hours during testing) it crashes suddenly.
Error log:
[2025-09-26 10:51:35.534] [error] Exception: /source/modules/ffmpeg/consumer/ffmpeg_consumer.cpp(627): Throw in function caspar::ffmpeg::ffmpeg_consumer::initialize(const caspar::core::video_format_desc&, const caspar::core::channel_info&, int)::<lambda()>::<lambda()>::<lambda()> mutable::<lambda()>
[2025-09-26 10:51:35.534] [error] Dynamic exception type: boost::wrapexcept<caspar::ffmpeg::ffmpeg_error_t>
[2025-09-26 10:51:35.534] [error] [caspar::tag_stacktrace_info*] = 0# 0x000055E278F3BAF0 in bin/casparcg
[2025-09-26 10:51:35.534] [error] 1# 0x000055E2791189DC in bin/casparcg
[2025-09-26 10:51:35.534] [error] 2# 0x000055E27911983D in bin/casparcg
[2025-09-26 10:51:35.534] [error] 3# 0x00007FC6EBD18253 in /lib/x86_64-linux-gnu/libstdc++.so.6
[2025-09-26 10:51:35.534] [error] 4# 0x00007FC6EB9A0AC3 in /lib/x86_64-linux-gnu/libc.so.6
[2025-09-26 10:51:35.534] [error] 5# 0x00007FC6EBA32850 in /lib/x86_64-linux-gnu/libc.so.6
[2025-09-26 10:51:35.534] [error]
[2025-09-26 10:51:35.534] [error] [caspar::ffmpeg::tag_ffmpeg_errn_info*] = -5
[2025-09-26 10:51:35.534] [error] [boost::errinfo_errno_] = 5, “Input/output error”
[2025-09-26 10:51:35.534] [error] [boost::errinfo_api_function_] = avio_closep(&oc->pb)
[2025-09-26 10:51:35.534] [error]
[2025-09-26 10:51:35.534] [error] 0# 0x000055E278F23003 in bin/casparcg
[2025-09-26 10:51:35.534] [error] 1# 0x000055E279118B3D in bin/casparcg
[2025-09-26 10:51:35.534] [error] 2# 0x000055E27911983D in bin/casparcg
[2025-09-26 10:51:35.534] [error] 3# 0x00007FC6EBD18253 in /lib/x86_64-linux-gnu/libstdc++.so.6
[2025-09-26 10:51:35.534] [error] 4# 0x00007FC6EB9A0AC3 in /lib/x86_64-linux-gnu/libc.so.6
[2025-09-26 10:51:35.534] [error] 5# 0x00007FC6EBA32850 in /lib/x86_64-linux-gnu/libc.so.6
[2025-09-26 10:51:35.534] [error]
[2025-09-26 10:51:35.535] [error] Exception: /source/modules/ffmpeg/consumer/ffmpeg_consumer.cpp(640): Throw in function caspar::ffmpeg::ffmpeg_consumer::initialize(const caspar::core::video_format_desc&, const caspar::core::channel_info&, int)::<lambda()>::<lambda()>::<lambda()>
[2025-09-26 10:51:35.535] [error] Dynamic exception type: boost::wrapexcept<caspar::ffmpeg::ffmpeg_error_t>
[2025-09-26 10:51:35.535] [error] [caspar::tag_stacktrace_info*] = 0# 0x000055E278F3BAF0 in bin/casparcg
[2025-09-26 10:51:35.535] [error] 1# 0x000055E279119434 in bin/casparcg
[2025-09-26 10:51:35.535] [error] 2# 0x00007FC6EBD18253 in /lib/x86_64-linux-gnu/libstdc++.so.6
[2025-09-26 10:51:35.535] [error] 3# 0x00007FC6EB9A0AC3 in /lib/x86_64-linux-gnu/libc.so.6
[2025-09-26 10:51:35.535] [error] 4# 0x00007FC6EBA32850 in /lib/x86_64-linux-gnu/libc.so.6
[2025-09-26 10:51:35.535] [error]
[2025-09-26 10:51:35.535] [error] [caspar::ffmpeg::tag_ffmpeg_errn_info*] = -5
[2025-09-26 10:51:35.535] [error] [boost::errinfo_errno_] = 5, “Input/output error”
[2025-09-26 10:51:35.535] [error] [boost::errinfo_api_function_] = av_interleaved_write_frame(oc, pkt.get())
[2025-09-26 10:51:35.535] [error]
[2025-09-26 10:51:35.535] [error] 0# 0x000055E278F23003 in bin/casparcg
[2025-09-26 10:51:35.535] [error] 1# 0x000055E279119933 in bin/casparcg
[2025-09-26 10:51:35.535] [error] 2# 0x00007FC6EBD18253 in /lib/x86_64-linux-gnu/libstdc++.so.6
[2025-09-26 10:51:35.535] [error] 3# 0x00007FC6EB9A0AC3 in /lib/x86_64-linux-gnu/libc.so.6
[2025-09-26 10:51:35.535] [error] 4# 0x00007FC6EBA32850 in /lib/x86_64-linux-gnu/libc.so.6
[2025-09-26 10:51:35.535] [error]
My config:
CasparCG server runs in docker. I build the ffmpeg myself, this is the ffmpeg -version output:
root@78369c42640e:/opt/casparcg# ffmpeg -version
ffmpeg version 7.1.2 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04.2)
configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-openssl --enable-libsrt --enable-cuda --enable-cuvid --enable-nvenc --enable-nvdec --enable-libnpp --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libfreetype --enable-libfontconfig --enable-shared --disable-static --disable-debug --extra-cflags=‘-O3 -march=x86-64-v3’ --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --extra-libs=‘-lpthread -lm’
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.101 / 61. 19.101
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
I use latest CasparCG version installed like this:
RUN mkdir /casparcg && git clone https://github.com/CasparCG/server.git /casparcg &&
mkdir /source && cp -r casparcg/src/* /source/
RUN ls -l /source && mkdir -p /build /install && cd /build &&
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
cmake -GNinja /source
-DUSE_STATIC_BOOST=ON
-DUSE_SYSTEM_CEF=OFF
-DENABLE_HTML=OFF
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_PREFIX_PATH=/usr/local
-DCMAKE_INSTALL_RPATH=/usr/local/lib &&
cmake --build . &&
cmake --install . --prefix /install && ldconfig