I have a question about streaming with CasparCG-Server. I read alot of comments how to add a stream with ffmpeg. But i have a problem to fill the stream with content.
I have a setup like this:
CasparCG-Server 2.2 stable
VLC - Player
I add the Stream with this command:
ADD 2 STREAM udp://localhost:1234 -format mpegts -vcodec libx264 -crf 0 -tune zerolatency -preset ultrafast
and im setting up a reciever on VLC with: udp://@:1234
After this, VLC is recieving from CasparCG but i cant see something. So I guess, that my stream from Caspar is empty.
Now my question is: How can I add Content to the stream?
Maybe my thoughts are on a wrong way and you guys can help me. Our later goal of streaming is to stream an incoming SDI-signal to various IP-adresses.
first of all with this ADD 2 command you are going to stream Channel 2 so confirm that your channel 2 is not empty.
second i don’t think that your streaming parameters are acceptable with 2.2 build. In server 2.2 ffmpeg updated with updated version so parameters are change in 2.2 so i’m sure you must be getting warning after adding stream check console for this.
for me first testcase i just added a picture to layer 1 on channel 2. But i couldnt see it on my stream.
I tried this command and i didnt get any warnings like beofre. Thanks for that. But now vlc cant recieve anything and stays in search mode.
Maybe i have to smth in my config? I still have the standard one.
Am I getting it right? Normally you fill your layer with content as you want and then you add a stream with this command to your channel and it should now stream your whole channel content?
Hi Guys - Im still struggling with streaming and CasparCG.
I get a weird exception, when i want to add a stream to youtube:
[2019-05-17 15:30:23.892] [info] ffmpeg[rtmp://(Stream Name)@(Server URL)] Initialized.
[2019-05-17 15:30:23.893] [info] [ffmpeg] [libx264 @ 0000018758520080] using SAR=1/1
[2019-05-17 15:30:23.893] [info]
[2019-05-17 15:30:23.894] [info] [ffmpeg] [libx264 @ 0000018758520080] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[2019-05-17 15:30:23.894] [info]
[2019-05-17 15:30:23.896] [info] [ffmpeg] [libx264 @ 0000018758520080] profile High 4:2:2, level 3.2, 4:2:2 8-bit
[2019-05-17 15:30:23.896] [info]
[2019-05-17 15:30:24.583] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\2.2.x\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(580): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::<lambda_e201b6f5f8931444e6d9c1015de83729>::operator ()(void) const
[2019-05-17 15:30:24.583] [error] Dynamic exception type: class boost::exception_detail::clone_impl<struct caspar::ffmpeg::ffmpeg_error_t>
[2019-05-17 15:30:24.583] [error] [struct boost::errinfo_api_function_ * __ptr64] = avio_open2(&oc->pb, full_path.string().c_str(), 2, nullptr, &dict)
[2019-05-17 15:30:24.583] [error] [struct boost::errinfo_errno_ * __ptr64] = 5, "Input/output error"
[2019-05-17 15:30:24.583] [error] [struct caspar::tag_stacktrace_info * __ptr64] = 0# 0x00007FF780A598AE in casparcg
[2019-05-17 15:30:24.583] [error] 1# 0x00007FF780A88C50 in casparcg
[2019-05-17 15:30:24.583] [error] 2# 0x00007FF780C32DE6 in casparcg
[2019-05-17 15:30:24.583] [error] 3# 0x00007FF780C35450 in casparcg
[2019-05-17 15:30:24.583] [error] 4# 0x00007FF780A545C9 in casparcg
[2019-05-17 15:30:24.583] [error] 5# o_exp in ucrtbase
[2019-05-17 15:30:24.583] [error] 6# BaseThreadInitThunk in KERNEL32
[2019-05-17 15:30:24.583] [error] 7# RtlUserThreadStart in ntdll
[2019-05-17 15:30:24.583] [error]
[2019-05-17 15:30:24.583] [error]
[2019-05-17 15:30:24.583] [error] 0# 0x00007FF780A598AE in casparcg
[2019-05-17 15:30:24.583] [error] 1# 0x00007FF780A591DF in casparcg
[2019-05-17 15:30:24.583] [error] 2# 0x00007FF780F30F37 in casparcg
[2019-05-17 15:30:24.583] [error] 3# _C_specific_handler in VCRUNTIME140
[2019-05-17 15:30:24.583] [error] 4# _TypeMatch in VCRUNTIME140
[2019-05-17 15:30:24.583] [error] 5# RtlCaptureContext in ntdll
[2019-05-17 15:30:24.583] [error] 6# 0x00007FF780B476BA in casparcg
[2019-05-17 15:30:24.583] [error] 7# 0x00007FF780B480F5 in casparcg
[2019-05-17 15:30:24.583] [error] 8# 0x00007FF780B22E1D in casparcg
[2019-05-17 15:30:24.583] [error] 9# 0x00007FF780B26050 in casparcg
[2019-05-17 15:30:24.583] [error] 10# 0x00007FF780A545C9 in casparcg
[2019-05-17 15:30:24.583] [error] 11# o_exp in ucrtbase
[2019-05-17 15:30:24.583] [error] 12# BaseThreadInitThunk in KERNEL32
[2019-05-17 15:30:24.583] [error] 13# RtlUserThreadStart in ntdll
[2019-05-17 15:30:24.583] [error]
Following line is the command im using: add 1 stream rtmp://(Stream Name)@(ServerURL) -format mpegts -codec:v libx264 -crf:v 0 -tune:v zerolatency -present:v ultrafast
I cant figure out what the problem is, maybe you can help me.
I have similar problem. I have started server and client, in client I have made playlist with one picture. Than I started playing on server and put following command into command line:
Latest stable version of ffmpeg, (in Caspar 2.0.7 Stable) seems
to not support -crf:v 25 which should be frame rate parameter, it work thought, when ommited.
I’ve just had to add ?pkt_size=1316 to end of path. (Check compatibility with your network’s MTU)
So my final configuration is:
# CASPARCG SERVER
ADD 1 STREAM udp://127.0.0.1:1551?pkt_size=1316 -codec:v libx264 -tune:v zerolatency -preset:v ultrafast -format mpegts
# VLC (open stream) v3.0.12
# Didn't work without "@" which is weird
udp://@127.0.0.1:1551?pkt_size=1316
This output stream can be also set in casparcg.config