It is currently 27 Mar 2017, 09:29



How to stream to Youtube

CasparCG Server, Client and development

Moderators: Macey, Jonas Hummelstrand, didikunz

How to stream to Youtube

Postby tom_swinkels » 07 Aug 2013, 11:51

Hi everyone,

I want setup a stream with caspar to youtube.

On the CasparCG form i have read a lot of topic's.

But i don't now how i can fix a Youtube live stream.

ADD 1 FILE "rtmp://a.rtmp.youtube.com/live2/info.38xr-76w5-9q9x-5gct" -f flv -acodec aac -ab 64k -ac 1 -ar 44100 -vcodec libx264 -b 700k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -maxrate 700k -bufsize 300 -s 650x360 dosn't works.

Any can help me?
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby Jonas Hummelstrand » 07 Aug 2013, 22:02

Please post a complete log file inside "code" tags.
Jonas Hummelstrand
Independent Consultant at SuperFly.tv
Former Community Manager for CasparCG

Problems? Guide to posting Bug reports & Feature requests
User avatar
Jonas Hummelstrand
 
Posts: 2538
Joined: 21 Apr 2009, 08:07
Location: Stockholm, Sweden

Re: How to stream caspar to Youtube

Postby tom_swinkels » 07 Aug 2013, 22:16

This is the log file:

Code: Select all
[2013-08-07 23:14:15.613] [05160CD8] [info]    ############################################################################
[2013-08-07 23:14:15.613] [05160CD8] [info]    CasparCG Server is distributed by the Swedish Broadcasting Corporation (SVT)
[2013-08-07 23:14:15.613] [05160CD8] [info]    under the GNU General Public License GPLv3 or higher.
[2013-08-07 23:14:15.613] [05160CD8] [info]    Please see LICENSE.TXT for details.
[2013-08-07 23:14:15.613] [05160CD8] [info]    http://www.casparcg.com/
[2013-08-07 23:14:15.613] [05160CD8] [info]    ############################################################################
[2013-08-07 23:14:15.613] [05160CD8] [info]    Starting CasparCG Video and Graphics Playout Server 2.0.4.f27a404 Beta 1
[2013-08-07 23:14:15.613] [05160CD8] [info]    on Windows 8
[2013-08-07 23:14:15.613] [05160CD8] [info]    Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz Physical Threads: 8
[2013-08-07 23:14:15.613] [05160CD8] [info]    N56VZ
[2013-08-07 23:14:15.620] [05160CD8] [info]    Decklink 9.7.6
[2013-08-07 23:14:15.627] [05160CD8] [info]    Bluefish Not found
[2013-08-07 23:14:15.628] [05160CD8] [info]    FreeImage 3.15.4
[2013-08-07 23:14:15.628] [05160CD8] [info]    FFMPEG-avcodec 53.36.0
[2013-08-07 23:14:15.628] [05160CD8] [info]    FFMPEG-avformat 53.21.0
[2013-08-07 23:14:15.628] [05160CD8] [info]    FFMPEG-avfilter 2.49.0
[2013-08-07 23:14:15.628] [05160CD8] [info]    FFMPEG-avutil 51.26.0
[2013-08-07 23:14:15.628] [05160CD8] [info]    FFMPEG-swscale 2.1.0
[2013-08-07 23:14:15.628] [05160CD8] [info]    Flash 11.8.800.94
[2013-08-07 23:14:15.705] [05160CD8] [debug]   flash-player[cg20.fth.pal|1024x576] [command]      <invoke name="OnCommand" returntype="xml"><arguments><string>Command recieved @GetInfo@?@</string></arguments></invoke>
[2013-08-07 23:14:15.714] [05160CD8] [info]    flash-player[cg20.fth.pal|1024x576] Initialized.
[2013-08-07 23:14:15.714] [05160CD8] [info]    flash[cg20.fth.pal|0] Initialized.
[2013-08-07 23:14:15.714] [05160CD8] [info]    flash[cg20.fth.pal|0] Invoking info-command: <invoke name="GetInfo" returntype="xml"><arguments></arguments></invoke>
[2013-08-07 23:14:15.714] [00E1CDE8] [trace]   flash-player[cg20.fth.pal|1024x576] Call: <invoke name="GetInfo" returntype="xml"><arguments></arguments></invoke>
[2013-08-07 23:14:15.715] [00E1CDE8] [debug]   flash-player[cg20.fth.pal|1024x576] [command]      <invoke name="OnCommand" returntype="xml"><arguments><string>Command recieved @GetInfo@?@</string></arguments></invoke>
[2013-08-07 23:14:15.717] [05160CD8] [trace]   Created destroyer: 1
[2013-08-07 23:14:15.717] [05160CD8] [trace]   Template-Host 2.0.0.2480 STABLE
[2013-08-07 23:14:15.717] [05160CD8] [info]    casparcg.config:
-----------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <paths>
      <media-path>rtmp://</media-path>
      <log-path>log\</log-path>
      <data-path>data\</data-path>
      <template-path>templates\</template-path>
      <thumbnails-path>thumbnails\</thumbnails-path>
   </paths>
   <log-level>trace</log-level>
   <channel-grid>false</channel-grid>
   <blend-modes>true</blend-modes>
   <auto-transcode>true</auto-transcode>
   <flash>
      <buffer-depth>auto</buffer-depth>
   </flash>
   <thumbnails>
      <generate-thumbnails>false</generate-thumbnails>
      <width>256</width>
      <height>144</height>
      <video-grid>2</video-grid>
      <scan-interval-millis>5000</scan-interval-millis>
      <generate-delay-millis>2000</generate-delay-millis>
      <video-mode>720p2500</video-mode>
   </thumbnails>
   <channels>
      <channel>
         <video-mode>PAL</video-mode>
         <channel-layout>stereo</channel-layout>
         <straight-alpha-output>false</straight-alpha-output>
         <consumers>
            <screen>
               <device>1</device>
               <aspect-ratio>default</aspect-ratio>
               <stretch>fill</stretch>
               <windowed>true</windowed>
               <key-only>false</key-only>
               <auto-deinterlace>true</auto-deinterlace>
               <vsync>true</vsync>
            </screen>
         </consumers>
      </channel>
   </channels>
   <audio>
      <channel-layouts/>
   </audio>
   <osc>
      <default-port>6250</default-port>
      <predefined-clients/>
   </osc>
   <controllers>
      <tcp>
         <port>5250</port>
         <protocol>AMCP</protocol>
      </tcp>
   </controllers>
</configuration>
-----------------------------------------
[2013-08-07 23:14:15.717] [0518FD58] [trace]   flash[cg20.fth.pal|0] Destroying on asynchronous destruction thread.
[2013-08-07 23:14:15.717] [0518FD58] [trace]   flash[cg20.fth.pal|0] Uninitializing.
[2013-08-07 23:14:15.717] [05160CD8] [info]    Initializing OpenGL Device.
[2013-08-07 23:14:15.743] [0518FD88] [info]    OpenGL 4.3.0 NVIDIA Corporation
[2013-08-07 23:14:15.744] [0518FD88] [info]    Successfully initialized OpenGL Device.
[2013-08-07 23:14:15.794] [05160CD8] [info]    Initialized ffmpeg module.
[2013-08-07 23:14:15.794] [05160CD8] [info]    Initialized bluefish module.
[2013-08-07 23:14:15.799] [05160CD8] [info]    Initialized decklink module.
[2013-08-07 23:14:15.799] [05160CD8] [info]    Initialized oal module.
[2013-08-07 23:14:15.799] [05160CD8] [info]    Initialized ogl module.
[2013-08-07 23:14:15.799] [05160CD8] [info]    Initialized image module.
[2013-08-07 23:14:15.799] [05160CD8] [info]    Initialized flash module.
[2013-08-07 23:14:15.803] [05160CD8] [info]    video_channel[1|PAL] Successfully Initialized.
[2013-08-07 23:14:15.804] [0518FD88] [trace]   [device_buffer] [1] allocated size:1658880
[2013-08-07 23:14:15.804] [05160CD8] [info]    ogl[1|PAL] Successfully Initialized.
[2013-08-07 23:14:15.804] [051903B8] [info]    output[1] ogl[1|PAL] Added.
[2013-08-07 23:14:15.804] [05160CD8] [info]    Initialized channels.
[2013-08-07 23:14:15.805] [05160CD8] [info]    WinSock2 Initialized.
[2013-08-07 23:14:15.805] [05160CD8] [info]    Listener successfully initialized
[2013-08-07 23:14:15.805] [05160CD8] [info]    Initialized controllers.
[2013-08-07 23:14:15.805] [05160CD8] [info]    Initialized osc.
[2013-08-07 23:14:15.821] [0518FD88] [trace]   [host_buffer] [1] allocated size:1658880 usage: read_only
[2013-08-07 23:14:15.824] [0518FD88] [trace]   [device_buffer] [2] allocated size:1658880
[2013-08-07 23:14:15.825] [00E1CDE8] [info]    flash-player[cg20.fth.pal|1024x576] Uninitialized.
[2013-08-07 23:14:15.825] [0518FD88] [trace]   [host_buffer] [2] allocated size:1658880 usage: read_only
[2013-08-07 23:14:15.826] [0518FD58] [info]    flash[cg20.fth.pal|0] Uninitialized.
[2013-08-07 23:14:15.828] [0518FD88] [trace]   [host_buffer] [3] allocated size:1658880 usage: read_only
[2013-08-07 23:14:15.844] [051903E8] [info]    ogl[1|PAL] Successfully enabled vsync.
[2013-08-07 23:14:15.844] [051903E8] [info]    ogl[1|PAL] Successfully Initialized.
[2013-08-07 23:14:15.844] [051903E8] [info]    [ffmpeg] [buffer @ 012E7C20] w:720 h:576 pixfmt:bgra tb:0/0 sar:0/0 sws_param:
[2013-08-07 23:14:15.844] [051903E8] [info]    [ffmpeg] [yadif @ 012E8200] mode:1 parity:-1 auto_enable:0
[2013-08-07 23:14:15.845] [051903E8] [info]    [ffmpeg] [buffersink @ 012E8DA0] auto-inserting filter 'auto-inserted scale 0' between the filter 'Parsed_yadif_0' and the filter 'out'
[2013-08-07 23:14:15.845] [051903E8] [info]    [ffmpeg] [yadif @ 012E8200] auto-inserting filter 'auto-inserted scale 1' between the filter 'src' and the filter 'Parsed_yadif_0'
[2013-08-07 23:14:15.845] [051903E8] [info]    [ffmpeg] [scale @ 012E8140] w:720 h:576 fmt:bgra -> w:720 h:576 fmt:yuva420p flags:0x2
[2013-08-07 23:14:15.846] [051903E8] [info]    [ffmpeg] [scale @ 012E85C0] w:720 h:576 fmt:yuva420p -> w:720 h:576 fmt:bgra flags:0x2
[2013-08-07 23:14:15.902] [0518FD88] [trace]   [host_buffer] [4] allocated size:1658880 usage: read_only
[2013-08-07 23:14:21.710] [0518FD88] [trace]   [host_buffer] [5] allocated size:1658880 usage: read_only
[2013-08-07 23:14:21.822] [0518FD88] [trace]   [host_buffer] [6] allocated size:1658880 usage: read_only
[2013-08-07 23:14:46.604] [051870B8] [info]    Received message from Console: ADD 1 FILE "a.rtmp.youtube.com/live2/info.38xr-76w5-9q9x-5gct" -f flv -acodec aac -ab 64k -ac 1 -ar 44100 -vcodec libx264 -b 700k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -maxrate 700k -bufsize 300 -s 650x360\r\n
[2013-08-07 23:14:46.664] [051903B8] [info]    output[1] [ffmpeg_consumer] Added.
[2013-08-07 23:14:46.664] [05190448] [debug]   Executed command: AddCommand
[2013-08-07 23:14:46.668] [05190448] [trace]   Ready for a new command
[2013-08-07 23:14:46.726] [051903B8] [warning] [ffmpeg] [libx264 @ 0A4C1AA0] VBV maxrate specified, but no bufsize, ignored
[2013-08-07 23:14:46.726] [051903B8] [warning] [ffmpeg] [libx264 @ 0A4C1AA0] interlace + weightp is not implemented
[2013-08-07 23:14:46.727] [051903B8] [info]    [ffmpeg] [libx264 @ 0A4C1AA0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[2013-08-07 23:14:46.737] [051903B8] [info]    [ffmpeg] [libx264 @ 0A4C1AA0] profile High, level 3.0
[2013-08-07 23:14:46.737] [051903B8] [info]    [ffmpeg] [libx264 @ 0A4C1AA0] 264 - core 118 r2085 8a62835 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=5 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=0 threads=8 sliced_threads=0 nr=0 decimate=1 interlaced=tff bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=25 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=25 rc=abr mbtree=1 bitrate=700 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[2013-08-07 23:14:46.738] [051903B8] [info]    [ffmpeg] Output #0, flv, to 'rtmp://\A.RTMP.YOUTUBE.COM/LIVE2/INFO.38XR-76W5-9Q9X-5GCT':
[2013-08-07 23:14:46.738] [051903B8] [info]    [ffmpeg]     Stream #0:
[2013-08-07 23:14:46.738] [051903B8] [info]    [ffmpeg] : Video: h264, yuv420p, 650x360, q=-1--1, 700 kb/
[2013-08-07 23:14:46.738] [051903B8] [info]    [ffmpeg] , 90k tb
[2013-08-07 23:14:46.738] [051903B8] [info]    [ffmpeg] , 25 tb
[2013-08-07 23:14:46.738] [051903B8] [info]    [ffmpeg]
[2013-08-07 23:14:46.738] [051903B8] [info]    [ffmpeg]     Stream #0:
[2013-08-07 23:14:46.738] [051903B8] [info]    [ffmpeg] : Audio: aac, 44100 Hz, 1 channels, s16, 700 kb/
[2013-08-07 23:14:46.738] [051903B8] [info]    [ffmpeg]
[2013-08-07 23:14:47.698] [051903B8] [error]   [ffmpeg] Problem accessing the DNS. (addr: \A.RTMP.YOUTUBE.COM
[2013-08-07 23:14:47.698] [051903B8] [error]   [ffmpeg]
[2013-08-07 23:14:47.701] [051903B8] [error]   consumer\ffmpeg_consumer.cpp(294): Throw in function caspar::ffmpeg::`anonymous-namespace'::<lambda7>::operator ()
Dynamic exception type: class boost::exception_detail::clone_impl<struct caspar::ffmpeg::ffmpeg_error>
std::exception::what: Unknown exception
[struct boost::errinfo_api_function_ *] = avio_open(&oc_->pb, filename_.c_str(), 2)
[struct boost::errinfo_errno_ *] = 1, "Operation not permitted"
[struct caspar::tag_msg_info *] =
[struct caspar::tag_source_info *] = [ffmpeg_consumer]

[2013-08-07 23:14:47.725] [051903B8] [warning] [ffmpeg] [libx264 @ 1063CC00] VBV maxrate specified, but no bufsize, ignored
[2013-08-07 23:14:47.726] [051903B8] [warning] [ffmpeg] [libx264 @ 1063CC00] interlace + weightp is not implemented
[2013-08-07 23:14:47.726] [051903B8] [info]    [ffmpeg] [libx264 @ 1063CC00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg] [libx264 @ 1063CC00] profile High, level 3.0
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg] [libx264 @ 1063CC00] 264 - core 118 r2085 8a62835 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=5 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=0 threads=8 sliced_threads=0 nr=0 decimate=1 interlaced=tff bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=25 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=25 rc=abr mbtree=1 bitrate=700 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg] Output #0, flv, to 'rtmp://\A.RTMP.YOUTUBE.COM/LIVE2/INFO.38XR-76W5-9Q9X-5GCT':
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg]     Stream #0:
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg] : Video: h264, yuv420p, 650x360, q=-1--1, 700 kb/
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg] , 90k tb
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg] , 25 tb
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg]
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg]     Stream #0:
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg] : Audio: aac, 44100 Hz, 1 channels, s16, 700 kb/
[2013-08-07 23:14:47.732] [051903B8] [info]    [ffmpeg]
[2013-08-07 23:14:47.733] [051903B8] [error]   [ffmpeg] Problem accessing the DNS. (addr: \A.RTMP.YOUTUBE.COM
[2013-08-07 23:14:47.733] [051903B8] [error]   [ffmpeg]
[2013-08-07 23:14:47.736] [051903B8] [error]   consumer\ffmpeg_consumer.cpp(294): Throw in function caspar::ffmpeg::`anonymous-namespace'::<lambda7>::operator ()
Dynamic exception type: class boost::exception_detail::clone_impl<struct caspar::ffmpeg::ffmpeg_error>
std::exception::what: Unknown exception
[struct boost::errinfo_api_function_ *] = avio_open(&oc_->pb, filename_.c_str(), 2)
[struct boost::errinfo_errno_ *] = 1, "Operation not permitted"
[struct caspar::tag_msg_info *] =
[struct caspar::tag_source_info *] = [ffmpeg_consumer]

[2013-08-07 23:14:47.736] [051903B8] [error]   Failed to recover consumer: [ffmpeg_consumer]. Removing it.
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby Jonas Hummelstrand » 07 Aug 2013, 23:10

I would suggest you simplify that string down to the basics, and see if it works.
Jonas Hummelstrand
Independent Consultant at SuperFly.tv
Former Community Manager for CasparCG

Problems? Guide to posting Bug reports & Feature requests
User avatar
Jonas Hummelstrand
 
Posts: 2538
Joined: 21 Apr 2009, 08:07
Location: Stockholm, Sweden

Re: How to stream caspar to Youtube

Postby mcdikki » 07 Aug 2013, 23:34

Code: Select all
[2013-08-07 23:14:47.698] [051903B8] [error]   [ffmpeg] Problem accessing the DNS. (addr: \A.RTMP.YOUTUBE.COM


Seems as this is your problem. There is someting wrong with the address.

cheers
mcdikki
sublan.tv - Wir teilen Begeisterung
User avatar
mcdikki
 
Posts: 1051
Joined: 11 Dec 2012, 15:48
Location: Germany

Re: How to stream caspar to Youtube

Postby tom_swinkels » 08 Aug 2013, 02:23

@jonas what are the basics?

@mcdikki this is the address that i get from youtube?
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby mcdikki » 08 Aug 2013, 02:29

No, I don't think that
Code: Select all
\A.RTMP.YOUTUBE.COM

is the address you got from youtube.
The \ is the problem. I don't know where it commes from, maybe this is a parsing error or something.

cheers
mcdikki

EDIT

Bye the way, this is what caspar cg is getting
Code: Select all
ADD 1 FILE "a.rtmp.youtube.com/live2/info.38xr-76w5-9q9x-5gct" -f flv -acodec aac -ab 64k -ac 1 -ar 44100 -vcodec libx264 -b 700k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -maxrate 700k -bufsize 300 -s 650x360\r\n


So there is missing the rtmp:// in the address.

Try to send it that way
Code: Select all
ADD 1 FILE "\"rtmp://a.rtmp.youtube.com/live2/info.38xr-76w5-9q9x-5gct\" -f flv -acodec aac -ab 64k -ac 1 -ar 44100 -vcodec libx264 -b 700k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -maxrate 700k -bufsize 300 -s 650x360"
sublan.tv - Wir teilen Begeisterung
User avatar
mcdikki
 
Posts: 1051
Joined: 11 Dec 2012, 15:48
Location: Germany

Re: How to stream caspar to Youtube

Postby Robert Nagy » 08 Aug 2013, 07:07

This will probably not work. The CasparCG ffmpeg consumer has not properly implemented all those options.
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

Re: How to stream caspar to Youtube

Postby intheweb » 08 Aug 2013, 09:43

There are two problems with 'ADD 1 FILE':
- The URL will be prepended with 'media\'
- The URL is being converted to uppercase even when this part is within quotes

Both problems are visible in this part of the log.
Code: Select all
[2013-08-08 10:33:51.533] [04D68CF8] [info]    [ffmpeg] Output #0, flv, to 'media\RTMP://A.RTMP.YOUTUBE.COM/LIVE2/INFO.38XR-76W5-9Q9X-5GCT':


In case of tom_swinkels I think he has changed his media directory to the root of CasparCG. Is this correct?

It would work if there is a check within ADD FILE that checks for a protocol like upd://, rtp://, rtmp:// etc.
And then leave out the 'media\' part.
intheweb
 
Posts: 12
Joined: 20 May 2012, 11:57

Re: How to stream caspar to Youtube

Postby tom_swinkels » 08 Aug 2013, 11:09

@mcdikki No, the rtmp:// are the directory.
I have found that on another topic here.
I try you're command, but it doesn't work.

@robert Is there not any other option for streaming to Youtube? Output caspar stream with another program to youtube?

@intheweb Yes, you understand me. But you had a live stream to youtube in proces, with ffmpeg? So it must go!
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby cambell » 11 Aug 2013, 02:27

The caspar 2.0.4 Beta doesn't easily allow the ffmpeg consumer to be used for streaming. Checkout this post relating to the community build which does include this feature:

viewtopic.php?f=3&t=1493&p=10433#p9517

Although the build referenced in that post does allow outbound streaming I don't think it robust enough to stream to an internet destination. Though you are welcome to try, and I would be interested in your feedback.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby tom_swinkels » 11 Aug 2013, 13:07

@cambell i have try it in you're build, but it dosn't work?
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby cambell » 12 Aug 2013, 04:15

@tom What exactly did you try? Here's a simple example that gets an output stream working for me.

Code: Select all
ADD 1 STREAM udp://127.0.0.1:12345


You can have any ffmpeg options you wish. By default it includes these:

Code: Select all
-f mpegts -vcodec mpeg4 -acodec mp2 -ab 128000 -s 640x360 -b 1000000


Here's a screen shot of the udp example working in VLC.

Image

I've never tried streaming to youtube directly myself, or justin.tv etc either. I've only streamed output across a LAN. What would be helpful is for folk to provide examples of doing so using the ffmpeg command line. Then this can be replicated in caspar.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby cambell » 12 Aug 2013, 04:30

@Tom I just tried the command you had in the first post.

I managed to stream something some where. Here's the log. Note that this was using the community build which has an experimental ffmpeg consumer patch included.

Code: Select all
[08/12/13 10:19:01] [082FEA98] [info]    Received message from 127.0.0.1: ADD 1 STREAM "rtmp://a.rtm
p.youtube.com/live2/info.38xr-76w5-9q9x-5gct" -f flv -acodec aac -ab 64k -ac 1 -ar 44100 -vcodec lib
x264 -b 700k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -maxrate 700k
 -bufsize 300 -s 640x360\r\n
[08/12/13 10:19:01] [0618F650] [warning] [ffmpeg] [libx264 @ 027FF1A0] VBV maxrate specified, but no
 bufsize, ignored
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg] [libx264 @ 027FF1A0] using cpu capabilities: MMX2
SSE2Fast SSSE3 FastShuffle SSE4.2
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg] [libx264 @ 027FF1A0] profile High, level 3.0
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg] [libx264 @ 027FF1A0] 264 - core 125 r2200 999b753
- H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1
 ref=3 deblock=1:0:0 analyse=0x3:0x111 me=hex subme=5 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=0 threads=4 looka
head_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bfr
ames=0 weightp=2 keyint=25 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=25 rc=abr mbtree=1
bitrate=700 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg] Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live
2/info.38xr-76w5-9q9x-5gct':
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg]     Stream #0:
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg] : Video: h264, yuv420p, 640x360, q=-1--1, 700 kb/
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg] , 90k tb
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg] , 25 tb
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg]
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg]     Stream #0:
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg] : Audio: aac, 44100 Hz, 1 channels, s16, 700 kb/
[08/12/13 10:19:01] [0618F650] [info]    [ffmpeg]
[08/12/13 10:19:06] [0618F7A0] [debug]   ffmpeg_input[media\Broadcast News.avi)] Seeking: 0
[08/12/13 10:19:10] [0618F650] [warning] Invalid option: -partitions +parti4x4+partp8x8+partb8x8
[08/12/13 10:19:10] [0618F650] [info]    ffmpeg[rtmp://a.rtmp.youtube.com/live2/info.38xr-76w5-9q9x-
5gct] Successfully Initialized.
[08/12/13 10:19:10] [0618F470] [info]    output[1] ffmpeg[rtmp://a.rtmp.youtube.com/live2/info.38xr-
76w5-9q9x-5gct] Added.
[08/12/13 10:19:10] [0618F650] [debug]   Executed command: AddCommand
[08/12/13 10:19:10] [0618F650] [info]    Sent message to 127.0.0.1: 202 ADD OK\r\n
[08/12/13 10:19:10] [0A895120] [warning] [audio-resampler] sample-rate: 48000 channels: 2 sample-fmt
: s32      32
[08/12/13 10:19:12] [0A895120] [warning] [ffmpeg] [flv @ 027FF960] Encoder did not produce proper pt
s, making some up.


Either my machine wasn't able to keep up with the encoding, or the network delay blocked the rendering. Here's what DIAG shows

Image
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby tom_swinkels » 12 Aug 2013, 12:39

@cambell I try the commands but i get any error's. Witch build of the caspar server do you have? And i sea that you connect with putty to caspar?
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby cambell » 12 Aug 2013, 14:52

@tom I'm using the community build which has an experimental patch for the ffmpeg consumer included. The ffmpeg consumer is what implements the ADD <channel> STREAM command. The linked post has a link where you can download the community build if you would like to experiment with the feature. I was using 2.0.40.

Note that I'm also using a different version of ffmpeg in the community build. I wouldn't have thought that would make a difference but I mention it just in case someone thinks aha that'll make a difference in this case.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby tom_swinkels » 12 Aug 2013, 15:33

@cambell Now i using 2.0.40 end get this errorlog.

Code: Select all
[08/12/13 16:25:11] [03854228] [info]    ############################################################################
[08/12/13 16:25:11] [03854228] [info]    CasparCG Server is distributed by the Swedish Broadcasting Corporation (SVT)
[08/12/13 16:25:11] [03854228] [info]    under the GNU General Public License GPLv3 or higher.
[08/12/13 16:25:11] [03854228] [info]    Please see LICENSE.TXT for details.
[08/12/13 16:25:11] [03854228] [info]    http://www.casparcg.com/
[08/12/13 16:25:11] [03854228] [info]    ############################################################################
[08/12/13 16:25:11] [03854228] [info]    Starting CasparCG Video and Graphics Playout Server 2.0.40.0 STABLE
[08/12/13 16:25:11] [03854228] [info]    on Windows 8
[08/12/13 16:25:11] [03854228] [info]    Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz Physical Threads: 8
[08/12/13 16:25:11] [03854228] [info]    N56VZ
[08/12/13 16:25:11] [03854228] [info]    Decklink 9.7.6
[08/12/13 16:25:11] [03854228] [info]    Bluefish Not found
[08/12/13 16:25:11] [03854228] [info]    FreeImage 3.13.1
[08/12/13 16:25:11] [03854228] [info]    FFMPEG-avcodec 54.29.100
[08/12/13 16:25:11] [03854228] [info]    FFMPEG-avformat 54.11.100
[08/12/13 16:25:11] [03854228] [info]    FFMPEG-avfilter 2.82.100
[08/12/13 16:25:11] [03854228] [info]    FFMPEG-avutil 51.61.100
[08/12/13 16:25:11] [03854228] [info]    FFMPEG-swscale 2.1.100
[08/12/13 16:25:11] [03854228] [info]    Flash 11.8.800.94
[08/12/13 16:25:11] [03854228] [info]    Template-Host Unknown
[08/12/13 16:25:11] [03854228] [info]    casparcg.config:
-----------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <paths>
      <media-path>media\</media-path>
      <log-path>log\</log-path>
      <data-path>data\</data-path>
      <template-path>templates\</template-path>
   </paths>
   <channels>
      <channel>
         <video-mode>PAL</video-mode>
         <consumers>
            <screen>
               <device>1</device>
               <windowed>true</windowed>
            </screen>
         </consumers>
      </channel>
   </channels>
   <controllers>
      <tcp>
         <port>5250</port>
         <protocol>AMCP</protocol>
      </tcp>
   </controllers>
</configuration>
-----------------------------------------
[08/12/13 16:25:11] [03854228] [info]    Initializing OpenGL Device.
[08/12/13 16:25:11] [00A27260] [info]    OpenGL 4.3.0 NVIDIA Corporation
[08/12/13 16:25:11] [00A27260] [info]    Successfully initialized OpenGL Device.
[08/12/13 16:25:11] [03854228] [info]    Initialized ffmpeg module.
[08/12/13 16:25:11] [03854228] [info]    Initialized bluefish module.
[08/12/13 16:25:11] [03854228] [info]    Initialized decklink module.
[08/12/13 16:25:11] [03854228] [info]    Initialized oal module.
[08/12/13 16:25:11] [03854228] [info]    Initialized ogl module.
[08/12/13 16:25:11] [03854228] [info]    Initialized image module.
[08/12/13 16:25:11] [03854228] [info]    Initialized flash module.
[08/12/13 16:25:11] [00A27260] [info]    [shader] Blend-modes are disabled.
[08/12/13 16:25:11] [03854228] [info]    video_channel[1|PAL] Successfully Initialized.
[08/12/13 16:25:11] [03854228] [info]    ogl[1|PAL] Successfully Initialized.
[08/12/13 16:25:11] [03895F20] [info]    output[1] ogl[1|PAL] Added.
[08/12/13 16:25:11] [03854228] [info]    Initialized channels.
[08/12/13 16:25:11] [03854228] [info]    WinSock2 Initialized.
[08/12/13 16:25:11] [03854228] [info]    Listener successfully initialized
[08/12/13 16:25:11] [03854228] [info]    Initialized controllers.
[08/12/13 16:25:11] [03895D10] [info]    ogl[1|PAL] Successfully Initialized.
[08/12/13 16:25:11] [03895D10] [warning] [ffmpeg] [src @ 0112B3E0] Flat options syntax is deprecated, use key=value pairs.
[08/12/13 16:25:11] [03895D10] [info]    [ffmpeg] [src @ 0112B3E0] w:720 h:576 pixfmt:bgra tb:0/0 fr:0/0 sar:0/0 sws_param:
[08/12/13 16:25:11] [03895D10] [info]    [ffmpeg] [Parsed_yadif_0 @ 0112B9A0] mode:1 parity:-1 auto_enable:0
[08/12/13 16:25:11] [03895D10] [info]    [ffmpeg] [out @ 0112B620] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_yadif_0' and the filter 'out'
[08/12/13 16:25:11] [03895D10] [info]    [ffmpeg] [Parsed_yadif_0 @ 0112B9A0] auto-inserting filter 'auto-inserted scaler 1' between the filter 'src' and the filter 'Parsed_yadif_0'
[08/12/13 16:25:11] [03895D10] [info]    [ffmpeg] [auto-inserted scaler 1 @ 0112B900] w:720 h:576 fmt:bgra sar:1/1 -> w:720 h:576 fmt:yuva420p sar:1/1 flags:0x2
[08/12/13 16:25:11] [03895D10] [info]    [ffmpeg] [auto-inserted scaler 0 @ 0112BE00] w:720 h:576 fmt:yuva420p sar:1/1 -> w:720 h:576 fmt:bgra sar:1/1 flags:0x2
[08/12/13 16:25:19] [03854228] [info]    Received message from Console: ADD 1 STREAM UDP://127.0.0.1:12345\r\n
[08/12/13 16:25:19] [03895DA0] [info]    [ffmpeg] Output #0, mpegts, to 'UDP://127.0.0.1:12345':
[08/12/13 16:25:19] [03895DA0] [info]    [ffmpeg]     Stream #0:
[08/12/13 16:25:19] [03895DA0] [info]    [ffmpeg] : Video: mpeg4, yuv420p, 640x360, q=2-31, 1000 kb/
[08/12/13 16:25:19] [03895DA0] [info]    [ffmpeg] , 90k tb
[08/12/13 16:25:19] [03895DA0] [info]    [ffmpeg] , 25 tb
[08/12/13 16:25:19] [03895DA0] [info]    [ffmpeg]
[08/12/13 16:25:19] [03895DA0] [info]    [ffmpeg]     Stream #0:
[08/12/13 16:25:19] [03895DA0] [info]    [ffmpeg] : Audio: aac, 48000 Hz, 2 channels, s16, 1000 kb/
[08/12/13 16:25:19] [03895DA0] [info]    [ffmpeg]
[08/12/13 16:25:19] [03895DA0] [error]   consumer\ffmpeg_consumer.cpp(265): Throw in function caspar::ffmpeg::`anonymous-namespace'::<lambda5>::operator ()
Dynamic exception type: class boost::exception_detail::clone_impl<struct caspar::ffmpeg::averror_protocol_not_found>
std::exception::what: Unknown exception
[struct boost::errinfo_api_function_ *] = avio_open(&oc_->pb, resource_name_.c_str(), 2)
[struct boost::errinfo_errno_ *] = 1330794744, "Unknown error"
[struct caspar::tag_msg_info *] = Protocol not found
[struct caspar::tag_source_info *] = [ffmpeg_consumer]

[08/12/13 16:25:19] [03895DA0] [warning] Failed to execute command: AddCommand
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby cambell » 12 Aug 2013, 16:47

Why is your 'udp' in upper case?
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby tom_swinkels » 12 Aug 2013, 16:59

I don't no? Caspar do that?
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby tom_swinkels » 12 Aug 2013, 21:30

@cambell I can now stream to youtube, Caspar make the upper case i send the commands now with putty end thats work. Only now i want a better quality. Look at http://www.youtube.com/watch?v=yKz9BMEldnk for the live-stream with caspar.
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby cambell » 13 Aug 2013, 01:58

Looks ok, except for the scrolling text. I can view it 720p which seems fine (except for the scroller which is bad). You would need to look at your flash template for that. Doesn't seem to match your channel resolution. Others here would be able to offer better advice than I about that. If this is a broadcast / production environment I would recommend that you don't use caspar to stream to youtube or any streaming service. Any network issue will break the system very very quickly.

Are there any other quality issues you were referring to? Or, are you referring to the lack of robustness in the outbound streaming. i.e. the fact that network issues would cause it to break quickly. I think perhaps others could suggest a better pipeline than caspar.

Still, this would be the first time I've ever seen it done successfully!
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby tom_swinkels » 15 Aug 2013, 23:36

@cambell It was my mistake. Caspar output was PAL, now it is 720p see -> http://www.youtube.com/watch?v=7NyCNm0Y5HA ! This Quality are good. But sometimes falters the live stream.
tom_swinkels
 
Posts: 22
Joined: 13 Mar 2012, 21:55
Location: Nederland

Re: How to stream caspar to Youtube

Postby palco » 25 Aug 2013, 09:04

I need Caspar playout in the form of UDP multicast protocols (239.1.1.10:1234) in the unit Luminato Teleste for digital Cable TV.I just need to streaming via lan cable.How
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream caspar to Youtube

Postby cambell » 25 Aug 2013, 14:32

Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234


from putty / telnet should do it.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby palco » 25 Aug 2013, 14:51

Thanks,
I tried putty but immediately gives an error (400 error).
When I wrote:
Code: Select all
ADD 1 FILE udp://239.1.1.10:1234

putty gives 202 add ok, but not works in VLC

Image
how to make it work in VLC
Please, can be a little more detailed explanation
CasparCG server 2.0.4. Beta + Caspar media playback Vimlesh
Last edited by palco on 25 Aug 2013, 16:06, edited 1 time in total.
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream caspar to Youtube

Postby cambell » 25 Aug 2013, 16:03

The 2.0.4 Beta does not support this function. Download the community build. viewtopic.php?f=3&t=1493 then do

Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234


Note the STREAM not FILE.

Don't forget when opening in VLC to use udp://@239.1.1.10:1234 I just tested with community build 2.0.40 and it works ok with VLC.
Last edited by cambell on 25 Aug 2013, 16:45, edited 1 time in total.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby palco » 25 Aug 2013, 16:26

WOW
Work perfect
Thank you very
Last edited by palco on 25 Aug 2013, 17:01, edited 1 time in total.
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream caspar to Youtube

Postby palco » 25 Aug 2013, 17:51

which client use.Not working good with Vimlesh media playback.Way?

Teleste Luminato for digital Cable TV only required RAW format in UDP protokol (not codecs like VLC).Is it possible export UDP stream CasparCG in RAW format.
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream caspar to Youtube

Postby umek » 26 Aug 2013, 09:23

RAW? are you sure? thats a lot of data for network
Broadcast Live streaming | Video production
www.agatin.hr
User avatar
umek
 
Posts: 161
Joined: 01 Sep 2012, 10:50
Location: Zagreb, Croatia

Re: How to stream caspar to Youtube

Postby palco » 26 Aug 2013, 10:50

Yes, shure.
UDP streaming in VLC work good, in Teleste Luminato streaming work, but not picture (black screen), problems in codecs.

Way not working good community build 2.0.40 @cambell with client (bloked video and not working tamplates)?
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream caspar to Youtube

Postby cambell » 27 Aug 2013, 02:19

Sorry its not working for you. You haven't provided any information that would enable anyone to help you. Streaming does work for me, and I have no problems with templates.

Note that the 'community build' is an experimental build for features that have not yet (or may never) end up in the official build. You should not use the community build in a production environment, it is for testing new experimental feature (like streaming) to see what needs to be done to get such features ready for including in the official build.

With the streaming consumer you can add any ffmpeg options you like. So, if you can stream a video file using ffmpeg to your device then you should be able to get it to work with Caspar. I suggest that you either experiment with ffmpeg yourself, or ask the device manufacturer what their recommended settings are for streaming from ffmpeg. Then you can let us know what ffmpeg options are needed and I can help you get that working in Caspar.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby palco » 27 Aug 2013, 06:01

cambell wrote:Sorry its not working for you. You haven't provided any information that would enable anyone to help you. Streaming does work for me, and I have no problems with templates.

Note that the 'community build' is an experimental build for features that have not yet (or may never) end up in the official build. You should not use the community build in a production environment, it is for testing new experimental feature (like streaming) to see what needs to be done to get such features ready for including in the official build.

With the streaming consumer you can add any ffmpeg options you like. So, if you can stream a video file using ffmpeg to your device then you should be able to get it to work with Caspar. I suggest that you either experiment with ffmpeg yourself, or ask the device manufacturer what their recommended settings are for streaming from ffmpeg. Then you can let us know what ffmpeg options are needed and I can help you get that working in Caspar.

Thanks, Cambell
Streaming good work with VLC for me and using VLC works streaming in my device Teleste Luminato ok When you select the codec in VLC MPEG2+MPGA (TS).Does that say something to that without VLC to work streaming from Casper in my device.

Which client works templates with community build with you? Video works ok.When I copy templates in folder templates, not working well.
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream caspar to Youtube

Postby cambell » 27 Aug 2013, 06:51

If you are just using the default udp stream with no other ffmpeg options you will get this:

Code: Select all
-f mpegts -vcodec mpeg4 -acodec mp2 -ab 128000 -s 640x360 -b 1000000


I've used several templates. Mostly I use templates that I've made myself for my preferred resolution 720p2500. I have my own client that I'm using written in Angular JS and PHP.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby palco » 27 Aug 2013, 08:03

cambell wrote:If you are just using the default udp stream with no other ffmpeg options you will get this:

Code: Select all
-f mpegts -vcodec mpeg4 -acodec mp2 -ab 128000 -s 640x360 -b 1000000


I've used several templates. Mostly I use templates that I've made myself for my preferred resolution 720p2500. I have my own client that I'm using written in Angular JS and PHP.


This is in log file:
Code: Select all
[08/27/13 08:56:34] [07E53FD8] [info]    Received message from 127.0.0.1: add 1 stream udp://239.1.1.3:1234\r\n
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] Output #0, mpegts, to 'udp://239.1.1.3:1234':
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]     Stream #0:
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] : Video: mpeg4, yuv420p, 640x360, q=2-31, 1000 kb/
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] , 90k tb
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] , 25 tb
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]     Stream #0:
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] : Audio: aac, 48000 Hz, 2 channels, s16, 1000 kb/
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] [mpegts @ 0FC56C60] muxrate VBR,
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
[08/27/13 08:56:34] [07151E48] [info]    ffmpeg[udp://239.1.1.3:1234] Successfully Initialized.
[08/27/13 08:56:34] [05FDA030] [info]    output[1] ffmpeg[udp://239.1.1.3:1234] Added.
[08/27/13 08:56:34] [07151E48] [debug]   Executed command: AddCommand
[08/27/13 08:56:34] [07151E48] [info]    Sent message to 127.0.0.1: 202 ADD OK\r\n
[08/27/13 08:56:34] [0A961E38] [warning] [ffmpeg] [mpegts @ 0FC56C60] Encoder did not produce proper pts, making some up.
[08/27/13 08:56:34] [0A961E38] [warning] [audio-resampler] sample-rate: 48000 channels: 2 sample-fmt: s32      32


Video not, sound yes.

Will your client be available to the public?
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream caspar to Youtube

Postby cambell » 27 Aug 2013, 08:13

This is in log file:

Code: Select all
[08/27/13 08:56:34] [07E53FD8] [info]    Received message from 127.0.0.1: add 1 stream udp://239.1.1.3:1234\r\n
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] Output #0, mpegts, to 'udp://239.1.1.3:1234':
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]     Stream #0:
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] : Video: mpeg4, yuv420p, 640x360, q=2-31, 1000 kb/
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] , 90k tb
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] , 25 tb
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]     Stream #0:
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] : Audio: aac, 48000 Hz, 2 channels, s16, 1000 kb/
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] [mpegts @ 0FC56C60] muxrate VBR,
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
[08/27/13 08:56:34] [07151E48] [info]    ffmpeg[udp://239.1.1.3:1234] Successfully Initialized.
[08/27/13 08:56:34] [05FDA030] [info]    output[1] ffmpeg[udp://239.1.1.3:1234] Added.
[08/27/13 08:56:34] [07151E48] [debug]   Executed command: AddCommand
[08/27/13 08:56:34] [07151E48] [info]    Sent message to 127.0.0.1: 202 ADD OK\r\n
[08/27/13 08:56:34] [0A961E38] [warning] [ffmpeg] [mpegts @ 0FC56C60] Encoder did not produce proper pts, making some up.
[08/27/13 08:56:34] [0A961E38] [warning] [audio-resampler] sample-rate: 48000 channels: 2 sample-fmt: s32      32


And what is your question? Looks like streaming with the defaults to me.

Will your client be available to the public?


Yes, I'm working on packaging it now for use on windows. The source is already available on github.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby palco » 27 Aug 2013, 08:31

cambell wrote:
This is in log file:

Code: Select all
[08/27/13 08:56:34] [07E53FD8] [info]    Received message from 127.0.0.1: add 1 stream udp://239.1.1.3:1234\r\n
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] Output #0, mpegts, to 'udp://239.1.1.3:1234':
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]     Stream #0:
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] : Video: mpeg4, yuv420p, 640x360, q=2-31, 1000 kb/
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] , 90k tb
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] , 25 tb
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]     Stream #0:
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] : Audio: aac, 48000 Hz, 2 channels, s16, 1000 kb/
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg]
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] [mpegts @ 0FC56C60] muxrate VBR,
[08/27/13 08:56:34] [07151E48] [info]    [ffmpeg] pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
[08/27/13 08:56:34] [07151E48] [info]    ffmpeg[udp://239.1.1.3:1234] Successfully Initialized.
[08/27/13 08:56:34] [05FDA030] [info]    output[1] ffmpeg[udp://239.1.1.3:1234] Added.
[08/27/13 08:56:34] [07151E48] [debug]   Executed command: AddCommand
[08/27/13 08:56:34] [07151E48] [info]    Sent message to 127.0.0.1: 202 ADD OK\r\n
[08/27/13 08:56:34] [0A961E38] [warning] [ffmpeg] [mpegts @ 0FC56C60] Encoder did not produce proper pts, making some up.
[08/27/13 08:56:34] [0A961E38] [warning] [audio-resampler] sample-rate: 48000 channels: 2 sample-fmt: s32      32


And what is your question? Looks like streaming with the defaults to me.

Will your client be available to the public?


Yes, I'm working on packaging it now for use on windows. The source is already available on github.


How to fix that comes out as MPEG2 (TS) from CasparCG
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream caspar to Youtube

Postby cambell » 27 Aug 2013, 11:17

Not able to test this right now but you could try something like this:

Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234 -f mpegts -vcodec mpeg2video -pix_fmt yuv420p -me_method epzs -threads 4 -r 29.97 -g 45 -bf 2 -trellis 2 -cmp 2 -subcmp 2 -s 704x396 -b 2500k -bt 300k -acodec mp2 -ac 2 -ab 192k -ar 44100 -async 1
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby palco » 27 Aug 2013, 12:07

cambell wrote:Not able to test this right now but you could try something like this:

Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234 -f mpegts -vcodec mpeg2video -pix_fmt yuv420p -me_method epzs -threads 4 -r 29.97 -g 45 -bf 2 -trellis 2 -cmp 2 -subcmp 2 -s 704x396 -b 2500k -bt 300k -acodec mp2 -ac 2 -ab 192k -ar 44100 -async 1


Not:
Code: Select all
502 ADD FAILED
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream to Youtube

Postby cambell » 27 Aug 2013, 13:35

Not able to test this right now. I suggest you try getting ffmpeg to work directly as per my earlier post, and let us know what options work.

viewtopic.php?f=3&t=369
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream to Youtube

Postby cambell » 27 Aug 2013, 15:43

Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234 -f mpegts -vcodec mpeg2video -pix_fmt yuv420p -threads 2 -r 25 -bf 2 -trellis 2 -cmp 2 -subcmp 2 -s 704x396 -b 2500k -bt 300k -acodec mp2 -ac 2 -ab 192k -ar 44100 -async 1


I changed the frame rate to 25 (-r 25) and it works for me. Though, if you can possibly use an x264 codec that would be much better. There are other topics in this forum that describe the various merits of one encoder over another.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream to Youtube

Postby palco » 27 Aug 2013, 16:07

cambell wrote:Not able to test this right now. I suggest you try getting ffmpeg to work directly as per my earlier post, and let us know what options work.

viewtopic.php?f=3&t=369

OK
How do I get a client that works with your server (templates and etc...) I would now use the CasparCG in my digital cable TV for info channel.that's my biggest problem.With the official server works all, but not works UDP stream. All TV programs in cable TV go over UDP protocol in Luminato Teleste and output as DVB-C.
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream to Youtube

Postby Jonas Hummelstrand » 27 Aug 2013, 16:11

May I suggest you use something like Open Broadcast Encoder if you need to stream professionally?
http://www.obe.tv/
Jonas Hummelstrand
Independent Consultant at SuperFly.tv
Former Community Manager for CasparCG

Problems? Guide to posting Bug reports & Feature requests
User avatar
Jonas Hummelstrand
 
Posts: 2538
Joined: 21 Apr 2009, 08:07
Location: Stockholm, Sweden

Re: How to stream to Youtube

Postby cambell » 27 Aug 2013, 16:18

FYI, here's a sample for x264
Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234 -f mpegts -acodec aac -ac 2 -ar 48000 -ab 192k -vcodec libx264 -s 640x360 -preset veryfast -threads 2


Any of the clients would work (assuming that they work at all). Any template that works with Caspar should also work with the community build (again, assuming it works at all). Note that templates are often built for a particular channel resolution and framerate. So, a template built for say PAL will not work so well with 720p for example.

What do you want the client program to do?
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream to Youtube

Postby palco » 27 Aug 2013, 16:30

cambell wrote:FYI, here's a sample for x264
Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234 -f mpegts -acodec aac -ac 2 -ar 48000 -ab 192k -vcodec libx264 -s 640x360 -preset veryfast -threads 2


Any of the clients would work (assuming that they work at all). Any template that works with Caspar should also work with the community build (again, assuming it works at all). Note that templates are often built for a particular channel resolution and framerate. So, a template built for say PAL will not work so well with 720p for example.

What do you want the client program to do?

I tried the server 2.0.3 and 2.04 beta with CasparCG Client 2.0.1 and Simple Video Playout by Vimlesh all works , but with these clients and community build 2.0.40 not works templates (right you can try).
I will now try to codecs and writer
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream to Youtube

Postby vimlesh1975 » 27 Aug 2013, 16:44

Place these files in template directory of your server.

template hosts.png
template hosts.png (6.38 KiB) Viewed 22778 times
User avatar
vimlesh1975
 
Posts: 595
Joined: 29 Aug 2011, 11:42
Location: Doordarshan, Mumbai, India

Re: How to stream to Youtube

Postby palco » 27 Aug 2013, 16:55

vimlesh1975 wrote:Place these files in template directory of your server.

template hosts.png

Ohh
YES
all Works
Thanks
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream to Youtube

Postby palco » 28 Aug 2013, 12:26

[quote="cambell"]FYI, here's a sample for x264
Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234 -f mpegts -acodec aac -ac 2 -ar 48000 -ab 192k -vcodec libx264 -s 640x360 -preset veryfast -threads 2


Thanks, Cambell
This work stream in my devices direct, but very bad image (resolution), with VLC output and default CapsacCg stream work perfect.
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream to Youtube

Postby mcdikki » 28 Aug 2013, 12:59

Well, the resolution is only 640x360. So no wonder the image is getting worse when displayed on a large screen. The stream should match your needs.

Please inform your self of the ffmpeg options to use and how to achieve a good streaming result. This is not casparCG related.

You can have a look at this
http://trac.ffmpeg.org/wiki/StreamingGuide
http://www.ffmpeg.org/ffmpeg.html


cheers
mcdikki
sublan.tv - Wir teilen Begeisterung
User avatar
mcdikki
 
Posts: 1051
Joined: 11 Dec 2012, 15:48
Location: Germany

Re: How to stream to Youtube

Postby Alrikabah » 28 Aug 2013, 13:12

palco wrote:
cambell wrote:FYI, here's a sample for x264
Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234 -f mpegts -acodec aac -ac 2 -ar 48000 -ab 192k -vcodec libx264 -s 640x360 -preset veryfast -threads 2


Thanks, Cambell
This work stream in my devices direct, but very bad image (resolution), with VLC output and default CapsacCg stream work perfect.


The -b or -b:v option (depends on the ffmpeg version but both should work) in ffmpeg line is missing. This option sets the video bitrate and the default is probably too small for your needs. Insert it after the size and before the preset like that:

Code: Select all
... -s 640x360 -b 5120k -preset veryfast ...


It is really necessary to read and understand few ffmpeg HOW-TO-s and/or cheat-sheets.
Alrikabah
 
Posts: 16
Joined: 16 Aug 2013, 13:48

Re: How to stream to Youtube

Postby palco » 29 Aug 2013, 08:52

Alrikabah wrote:
palco wrote:
cambell wrote:FYI, here's a sample for x264
Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234 -f mpegts -acodec aac -ac 2 -ar 48000 -ab 192k -vcodec libx264 -s 640x360 -preset veryfast -threads 2


Thanks, Cambell
This work stream in my devices direct, but very bad image (resolution), with VLC output and default CapsacCg stream work perfect.


The -b or -b:v option (depends on the ffmpeg version but both should work) in ffmpeg line is missing. This option sets the video bitrate and the default is probably too small for your needs. Insert it after the size and before the preset like that:

Code: Select all
... -s 640x360 -b 5120k -preset veryfast ...


It is really necessary to read and understand few ffmpeg HOW-TO-s and/or cheat-sheets.


and not so good
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream to Youtube

Postby palco » 30 Aug 2013, 11:42

@cambell
To work with you stream, when you let scrool?
Do you need a good configuration to the computer, to stream worked well.
What computer configuration is required in order to stream worked well?
palco
 
Posts: 48
Joined: 24 Aug 2013, 18:45

Re: How to stream to Youtube

Postby cambell » 31 Aug 2013, 01:54

palco wrote:@cambell
To work with you stream, when you let scrool?

Sorry, I cannot understand your question.

palco wrote:Do you need a good configuration to the computer, to stream worked well.
What computer configuration is required in order to stream worked well?


I'm not really sure. I don't have any experience with professional streaming. You would need something at least as good as the recommended minimum spec. I use the streaming for preview only at 640x360 and I can have two streams running on an i5 nvidia GeForce 220 with no problems. Source channels are 720p2500.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream caspar to Youtube

Postby jrmorrison » 20 Mar 2014, 00:11

palco wrote:
cambell wrote:Not able to test this right now but you could try something like this:

Code: Select all
ADD 1 STREAM udp://239.1.1.10:1234 -f mpegts -vcodec mpeg2video -pix_fmt yuv420p -me_method epzs -threads 4 -r 29.97 -g 45 -bf 2 -trellis 2 -cmp 2 -subcmp 2 -s 704x396 -b 2500k -bt 300k -acodec mp2 -ac 2 -ab 192k -ar 44100 -async 1


Not:
Code: Select all
502 ADD FAILED


My CasparCG Server has multiple Ethernet adapters and I can not get the stream to exit the server into the video core.

I have extensive experience with both VLC and FFMPEG and I have several systems running.

my question centers on this FFMPEG UDP command option.

i can not seem to get this to work....

Code: Select all
add 1 stream udp://239.7.7.1:12345?localaddr=172.16.6.68 -f mpegts


I simply want to send the stream out the adapter with that address. its just not working ... Anyone have any ideas ?? ( My Firewall is OFF )

Thanks.
jrmorrison
 
Posts: 5
Joined: 19 Mar 2014, 01:56

Re: How to stream to Youtube

Postby cambell » 20 Mar 2014, 02:07

Did you try

Code: Select all
-localaddr 172.16.6.68


You can use pretty much any option that you can see from ffmpeg -h full.
User avatar
cambell
 
Posts: 135
Joined: 23 Jan 2013, 13:47

Re: How to stream to Youtube

Postby jrmorrison » 20 Mar 2014, 02:42

it is working now.
my line is...

add 1 stream udp://239.7.7.1:2345?localaddr=172.16.6.68&ttl=10 -f mpegts -vcodec libx264 -preset fast -crf 22 -s 1920x1080 -b 6000000 -acodec mp2 -ab 192000 -ar 48000

im getting out of the machine and into my video core.

my set top boxes love it... beautiful video.

this encoding loads my HP dual 6 core g7 server to 36 percent cpu.

so far its stable.
jrmorrison
 
Posts: 5
Joined: 19 Mar 2014, 01:56

Re: How to stream to Youtube

Postby jrmorrison » 20 Mar 2014, 02:47

thanks cambell great work on 2.0.43 !
just what i needed.
jrmorrison
 
Posts: 5
Joined: 19 Mar 2014, 01:56

How to stream to CasparMediaPlayback

Postby gmmorales27 » 25 Sep 2016, 21:24

need streaming
gmmorales27
 
Posts: 2
Joined: 02 Sep 2016, 19:09

Re: How to stream to Youtube

Postby juanidiaz » 20 Jan 2017, 16:03

Hello all, I've been following this and other posts and finally got the STREAM command to work on my system. I just need to read more on ffmpeg flags to get the desired result. However I still have a problem where the STREAM from Caspar is not available on a remote computer in the same network; but in the same computer where Caspar is running the stream works well.

Here is the info:

1- Both computers running windows have firewall OFF
2- CasparCG is running (version 2.1.0) on IP 10.10.7.19
3- I'm using the "fresh" config file from the ZIP file downloaded from caspar site
4- The command sent to Caspar is:
Code: Select all
ADD 1 STREAM udp://@239.9.9.9:9999 -vcodec libx264 -tune zerolatency -preset ultrafast -crf 20 -format mpegts -vf scale=1920:1080

5- Running VLC in the same computer I can open: udp://@239.9.9.9:9999
6- When trying the same stream from a different computer (with IP 10.10.7.15) the stream is not there

Is this something to do with the addrss udp://@239.9.9.9:9999??

Thank you for your comments
JD
User avatar
juanidiaz
 
Posts: 9
Joined: 10 Jul 2016, 23:56


Return to Tech and Development

Who is online

Users browsing this forum: Bing [Bot], didikunz, Yahoo [Bot] and 4 guests