<div dir="ltr"><div><div><div><div><div><div><div>Hi.<br><br></div>A little update on using GStreamer to generate a live stream for YouTube Live. Using the following information, the pipeline gets a little bit further.<br>
<br></div> .... ! flvmux streamable=true name=mux ! rtmpsink location="$LOCATION"<br><br></div>Here LOCATION is now defined as follows<br><br></div> LOCATION="<span style="color:rgb(51,51,51);font-family:arial,sans-serif;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:11px;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none">Primary Server URL/</span><span style="color:rgb(51,51,51);font-family:arial,sans-serif;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:11px;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none">Stream Name</span> live=1 flashver=FME/3.0\20(compatible;\20FMSc\201.0) "<br>
<br><span style="color:rgb(51,51,51);font-family:arial,sans-serif;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:11px;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none">Primary Server URL</span> and<span style="color:rgb(51,51,51);font-family:arial,sans-serif;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:11px;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none"> Stream Name</span> is copied from the settings from the live event created for the YouTube account.<br>
<br></div>Nevertheless the script now fails with the following message after apparently setting up communication with the YouTube servers.<br><br> Pipeline is PREROLLED ...<br> Setting pipeline to PLAYING ...<br> New clock: GstSystemClock<br>
ERROR: WriteN, RTMP send error 104 (126 bytes)<br><br></div>Anybody know what that is?<br><br></div>Best regards<br><div><div><div><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 22, 2013 at 11:57 PM, Peter Maersk-Moller <span dir="ltr"><<a href="mailto:pmaersk@gmail.com" target="_blank">pmaersk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi.<br><br></div>I was wondering if anybody has been successful streaming to the YouTube Live streaming servers using GStreamer?<br>
<br></div>I get the following error message which I believe indicates that YouTube doesn't accept my data:<br>
<br> Pipeline is PREROLLED ...<br> Setting pipeline to PLAYING ...<br> New clock: GstSystemClock<br> ERROR: RTMP_ReadPacket, failed to read RTMP packet header<br> ERROR: from element /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0: Could not open resource for writing. <br>
Additional debug info:<br> gstrtmpsink.c(228): gst_rtmp_sink_render (): /GstPipeline:pipeline0 /GstRTMPSink:rtmpsink0:<br> Could not connect to RTMP stream "rtmp://<a href="http://a.rtmp.youtube.com/videolive?........" target="_blank">a.rtmp.youtube.com/videolive?........</a>..<br>
<br></div>I am using the following script that works great for UStream, but not for YouTube LIve. Anybody got any good suggestion?<br><br></div>Best regards<br></div>Peter<br><div><div><br>================<br>#!/bin/bash<br>
if [ $# != 1 ] ; then exit ; fi<br>AUDIOFORMAT='audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1'<br>case $1 in<br> you|youtube)<br> width=1280<br>
height=720<br> framerate='30/1'<br> videoencoder="x264enc bitrate=2000 profile=main bframes=2"<br> videomode='video/x-h264, width=(int)1280, height=(int)720, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, profile=(string)main'<br>
videomode='video/x-h264, profile=main'<br> audioencoder="faac bitrate=64000 profile=2"<br> location="rtmp://<a href="http://a.rtmp.youtube.com/videolive?signature=REMOVED_FOR" target="_blank">a.rtmp.youtube.com/videolive?signature=REMOVED_FOR</a> OBVIOUS_REASONS flashver=FME/3.0\20(compatible;\20FMSc\201.0)"<br>
<br> ;;<br> ustream)<br> width=1024<br> height=576<br> framerate='25/1'<br> videoencoder="x264enc bitrate=800 bframes=0"<br> videomode='queue'<br> audioencoder="lame mode=3 bitrate=64"<br>
location="rtmp://<a href="http://SOMETHING.fme.ustream.tv/ustreamVideo/SOMETHING/MORESOMETHING" target="_blank">SOMETHING.fme.ustream.tv/ustreamVideo/SOMETHING/MORESOMETHING</a>' flashver=FME/3.0\20(compatible;\20FMSc\201.0)'"<br>
;;<br> *) echo 'Use youtube or ustream'<br> exit<br>esac<br><br>gst-launch -v videotestsrc !\<br> 'video/x-raw-yuv, framerate='$framerate', width='$width', height='$height !\<br>
ffmpegcolorspace !\<br> $videoencoder !\<br> "$videomode" !\<br> mux. audiotestsrc !\<br> $AUDIOFORMAT !\<br>
$audioencoder !\<br> flvmux streamable=true name=mux !\<br> rtmpsink location="$location"<br><br>==================<br><br><br><br></div></div></div> </blockquote></div></div>
</div></div></div></div>