Bug: Error playing back NDI stream on Ubuntu 22.04 and Ubuntu 24.04
jpc0 opened this issue · comments
Observed Behavior
When attempting to play back an NDI stream on ubuntu 22.04 and ubuntu 24.04 I get an FFMPEG error??? I have looked into the code and it does seem like ffmpeg should be called but it is. Using the release on github/releases as well as the latest 2.4.0 release on casparcg.com/builds.
log level trace
[2024-06-11 17:08:56.535] [info] Received message from Console: log level trace\r\n
#202 LOG OK
[2024-06-11 17:08:56.535] [debug] Executed command (0s): LOG LEVEL
[2024-06-11 17:08:56.536] [trace] Ready for a new command
ndi list
[2024-06-11 17:08:58.680] [info] Received message from Console: ndi list\r\n
[2024-06-11 17:08:58.680] [debug] Executing command: NDI LIST
#200 NDI LIST OK
1 "FOHMULTIMEDIA (ProjectMedia)" 10.0.0.19:5963
2 "FOHMULTIMEDIA (ProjectSidesL)" 10.0.0.19:5962
3 "FOHMULTIMEDIA (ProjectStreaming)" 10.0.0.19:5961
[2024-06-11 17:08:58.681] [debug] Executed command (0.001s): NDI LIST
[2024-06-11 17:08:58.681] [trace] Ready for a new command
play 1 ndi://FOHMULTIMEDIA/ProjectMedia
[2024-06-11 17:09:20.091] [info] Received message from Console: play 1 ndi://FOHMULTIMEDIA/ProjectMedia\r\n
[2024-06-11 17:09:20.091] [debug] Executing command: PLAY
[2024-06-11 17:09:20.091] [debug] ffmpeg[ndi://FOHMULTIMEDIA/ProjectMedia|0.0000/0.0000] seekable: 2
[2024-06-11 17:09:20.091] [trace] [ffmpeg] [NULL @ 0x7efbe0003000] Opening 'ndi://FOHMULTIMEDIA/ProjectMedia' for reading
[2024-06-11 17:09:20.091] [trace]
#202 PLAY OK
[2024-06-11 17:09:20.091] [debug] Executed command (0s): PLAY
[2024-06-11 17:09:20.091] [trace] Ready for a new command
[2024-06-11 17:09:20.091] [error] Exception: /source/modules/ffmpeg/producer/av_input.cpp(162): Throw in function caspar::ffmpeg::Input::internal_reset()::<lambda()>
[2024-06-11 17:09:20.091] [error] Dynamic exception type: boost::wrapexcept<caspar::ffmpeg::ffmpeg_error_t>
[2024-06-11 17:09:20.091] [error] [caspar::tag_stacktrace_info*] = 0# 0x00005A7C6E44B85F in bin/casparcg
[2024-06-11 17:09:20.091] [error] 1# 0x00005A7C6E63229D in bin/casparcg
[2024-06-11 17:09:20.091] [error] 2# 0x00005A7C6E63265F in bin/casparcg
[2024-06-11 17:09:20.091] [error] 3# 0x00005A7C6E62B26A in bin/casparcg
[2024-06-11 17:09:20.091] [error] 4# 0x00005A7C6E6AA91B in bin/casparcg
[2024-06-11 17:09:20.091] [error] 5# 0x00007EFCB3C94AC3 in /lib/x86_64-linux-gnu/libc.so.6
[2024-06-11 17:09:20.091] [error] 6# 0x00007EFCB3D26850 in /lib/x86_64-linux-gnu/libc.so.6
[2024-06-11 17:09:20.091] [error]
[2024-06-11 17:09:20.091] [error] [caspar::ffmpeg::tag_ffmpeg_errn_info*] = -1330794744
[2024-06-11 17:09:20.091] [error] [boost::errinfo_errno_*] = 1330794744, "Unknown error 1330794744"
[2024-06-11 17:09:20.091] [error] [boost::errinfo_api_function_*] = avformat_open_input(&ic, filename_.c_str(), input_format, &options)
[2024-06-11 17:09:20.091] [error]
[2024-06-11 17:09:20.091] [error] 0# 0x00005A7C6E4331A2 in bin/casparcg
[2024-06-11 17:09:20.091] [error] 1# 0x00005A7C6E62DD01 in bin/casparcg
[2024-06-11 17:09:20.091] [error] 2# 0x00005A7C6E6AA91B in bin/casparcg
[2024-06-11 17:09:20.091] [error] 3# 0x00007EFCB3C94AC3 in /lib/x86_64-linux-gnu/libc.so.6
[2024-06-11 17:09:20.091] [error] 4# 0x00007EFCB3D26850 in /lib/x86_64-linux-gnu/libc.so.6
[2024-06-11 17:09:20.091] [error]
Config:
[2024-06-11 17:10:57.887] [info] ############################################################################
[2024-06-11 17:10:57.887] [info] CasparCG Server is distributed by the Swedish Broadcasting Corporation (SVT) [2024-06-11 17:10:57.887] [info] under the GNU General Public License GPLv3 or higher. [2024-06-11 17:10:57.887] [info] Please see LICENSE.TXT for details. [2024-06-11 17:10:57.887] [info] http://www.casparcg.com/ [2024-06-11 17:10:57.887] [info] ############################################################################ [2024-06-11 17:10:57.887] [info] Starting CasparCG Video and Graphics Playout Server 2.4.0 N/A Dev [2024-06-11 17:10:57.888] [info] "/opt/casparcg/casparcg.config": [2024-06-11 17:10:57.888] [info] ----------------------------------------- [2024-06-11 17:10:57.888] [info] <?xml version="1.0" encoding="utf-8"?>
[2024-06-11 17:10:57.888] [info] <configuration>
[2024-06-11 17:10:57.888] [info] <paths>
[2024-06-11 17:10:57.888] [info] <media-path>/casparMedia/</media-path>
[2024-06-11 17:10:57.888] [info] <log-path disable="false">log/</log-path>
[2024-06-11 17:10:57.888] [info] <data-path>data/</data-path>
[2024-06-11 17:10:57.888] [info] <template-path>template/</template-path>
[2024-06-11 17:10:57.888] [info] </paths>
[2024-06-11 17:10:57.888] [info] <lock-clear-phrase>secret</lock-clear-phrase>
[2024-06-11 17:10:57.888] [info] <ndi>
[2024-06-11 17:10:57.888] [info] <auto-load>true</auto-load>
[2024-06-11 17:10:57.888] [info] </ndi>
[2024-06-11 17:10:57.888] [info] <channels>
[2024-06-11 17:10:57.888] [info] <channel>
[2024-06-11 17:10:57.888] [info] <video-mode>720p5000</video-mode>
[2024-06-11 17:10:57.888] [info] <consumers>
[2024-06-11 17:10:57.888] [info] <screen/>
[2024-06-11 17:10:57.888] [info] <system-audio/>
[2024-06-11 17:10:57.888] [info] </consumers>
[2024-06-11 17:10:57.888] [info] </channel>
[2024-06-11 17:10:57.888] [info] </channels>
[2024-06-11 17:10:57.888] [info] <controllers>
[2024-06-11 17:10:57.888] [info] <tcp>
[2024-06-11 17:10:57.888] [info] <port>5250</port>
[2024-06-11 17:10:57.888] [info] <protocol>AMCP</protocol>
[2024-06-11 17:10:57.888] [info] </tcp>
[2024-06-11 17:10:57.888] [info] </controllers>
[2024-06-11 17:10:57.888] [info] <amcp>
[2024-06-11 17:10:57.888] [info] <media-server>
[2024-06-11 17:10:57.888] [info] <host>localhost</host>
[2024-06-11 17:10:57.888] [info] <port>8000</port>
[2024-06-11 17:10:57.888] [info] <port>8000</port>
[2024-06-11 17:10:57.888] [info] </media-server>
[2024-06-11 17:10:57.888] [info] </amcp>
[2024-06-11 17:10:57.888] [info] </configuration>
[2024-06-11 17:10:57.888] [info] -----------------------------------------
[2024-06-11 17:10:57.888] [info] Initialized video modes.
[2024-06-11 17:10:58.042] [info] Initializing OpenGL Device.
[2024-06-11 17:10:58.047] [info] Initialized OpenGL 4.5.0 NVIDIA 535.171.04 NVIDIA Corporation
[2024-06-11 17:10:58.063] [info] Initialized OpenGL Accelerated GPU Image Mixer for channel 1
[2024-06-11 17:10:58.063] [info] video_channel[1|720p5000] Successfully Initialized.
[2024-06-11 17:10:58.063] [info] Initialized channels.
[2024-06-11 17:10:58.063] [info] Initialized command repository.
[2024-06-11 17:10:58.063] [info] Initialized image module.
[2024-06-11 17:10:58.063] [info] Initialized ffmpeg module.
[2024-06-11 17:10:58.063] [info] Initialized oal module.
[2024-06-11 17:10:58.064] [info] Initialized decklink module.
[2024-06-11 17:10:58.064] [info] Initialized screen module.
[2024-06-11 17:10:58.064] [info] Loaded "/opt/casparcg/libndi.so.5"
[2024-06-11 17:10:58.066] [info] Initialized newtek module.
[2024-06-11 17:10:58.066] [info] Initialized artnet module.
[0611/171058.221763:WARNING:policy_logger.cc(148)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(88) Could not create policy manager as CBCM is not enabled.
[2024-06-11 17:10:58.226] [info] Initialized html module.
[2024-06-11 17:10:58.226] [info] Initialized modules.
[2024-06-11 17:10:58.226] [info] Screen consumer [1|720p5000] Initialized.
[2024-06-11 17:10:58.239] [info] oal[1|720p5000] Initialized.
[2024-06-11 17:10:58.239] [info] Initialized startup producers.
[2024-06-11 17:10:58.239] [info] Initialized controllers.
[2024-06-11 17:10:58.239] [info] Initialized osc.
[0611/171058.397354:WARNING:sandbox_linux.cc(393)] InitializeSandbox() called with multiple threads in process gpu-process.
Expected behaviour
NDI works as it does on windows?
Steps to reproduce
- Either install the Casparcg deb / use the zip archive to install
- Install ndi lib using
https://github.com/obs-ndi/obs-ndi/blob/master/CI/libndi-get.sh
I altered the script to download V5
Note: need to run./libndi-get install
- Attempt to playback NDI stream in casparcg
Environment
- Commit: 31a580f
- Server version: v2.4.0
- Operating system: Ubuntu 22.04 and Ubuntu 24.04
I've pushed a commit to master that I haven't tested but hopefully fixes this (copied from nxtedition@eaa7890)
Solved!
I need to consider the boost libs more. I had found so far that filesystem was not parsing the string at all, was busy implementing starts_with myself but this solves it.