Streaming to YouTube Live

Peter Maersk-Moller pmaersk at gmail.com
Wed Apr 24 05:15:26 PDT 2013


Hi.

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.

     .... ! flvmux streamable=true name=mux ! rtmpsink location="$LOCATION"

Here LOCATION is now defined as follows

    LOCATION="Primary Server URL/Stream Name live=1
flashver=FME/3.0\20(compatible;\20FMSc\201.0) "

Primary Server URL and Stream Name is copied from the settings from the
live event created for the YouTube account.

Nevertheless the script now fails with the following message after
apparently setting up communication with the YouTube servers.

   Pipeline is PREROLLED ...
   Setting pipeline to PLAYING ...
   New clock: GstSystemClock
   ERROR: WriteN, RTMP send error 104 (126 bytes)

Anybody know what that is?

Best regards

On Mon, Apr 22, 2013 at 11:57 PM, Peter Maersk-Moller <pmaersk at gmail.com>wrote:

> Hi.
>
> I was wondering if anybody has been successful streaming to the YouTube
> Live streaming servers using GStreamer?
>
> I get the following error message which I believe indicates that YouTube
> doesn't accept my data:
>
>   Pipeline is PREROLLED ...
>   Setting pipeline to PLAYING ...
>   New clock: GstSystemClock
>   ERROR: RTMP_ReadPacket, failed to read RTMP packet header
>   ERROR: from element /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0: Could
> not   open resource for writing.
>   Additional debug info:
>   gstrtmpsink.c(228): gst_rtmp_sink_render (): /GstPipeline:pipeline0
> /GstRTMPSink:rtmpsink0:
>   Could not connect to RTMP stream "rtmp://
> a.rtmp.youtube.com/videolive?..........
>
> I am using the following script that works great for UStream, but not for
> YouTube LIve. Anybody got any good suggestion?
>
> Best regards
> Peter
>
> ================
> #!/bin/bash
> if [ $# != 1 ] ; then exit ; fi
> AUDIOFORMAT='audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
> width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1'
> case $1 in
>   you|youtube)
>         width=1280
>         height=720
>         framerate='30/1'
>         videoencoder="x264enc bitrate=2000 profile=main bframes=2"
>         videomode='video/x-h264, width=(int)1280, height=(int)720,
> framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
> profile=(string)main'
>         videomode='video/x-h264, profile=main'
>         audioencoder="faac bitrate=64000 profile=2"
>         location="rtmp://
> a.rtmp.youtube.com/videolive?signature=REMOVED_FOR OBVIOUS_REASONS
> flashver=FME/3.0\20(compatible;\20FMSc\201.0)"
>
>         ;;
>   ustream)
>         width=1024
>         height=576
>         framerate='25/1'
>         videoencoder="x264enc bitrate=800 bframes=0"
>         videomode='queue'
>         audioencoder="lame mode=3 bitrate=64"
>         location="rtmp://
> SOMETHING.fme.ustream.tv/ustreamVideo/SOMETHING/MORESOMETHING'
> flashver=FME/3.0\20(compatible;\20FMSc\201.0)'"
>         ;;
>   *)    echo 'Use youtube or ustream'
>         exit
> esac
>
> gst-launch -v videotestsrc !\
>         'video/x-raw-yuv, framerate='$framerate', width='$width',
> height='$height !\
>         ffmpegcolorspace                !\
>         $videoencoder                   !\
>         "$videomode"                    !\
>         mux. audiotestsrc               !\
>         $AUDIOFORMAT                    !\
>         $audioencoder                   !\
>         flvmux streamable=true name=mux !\
>         rtmpsink location="$location"
>
> ==================
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130424/49646771/attachment.html>


More information about the gstreamer-devel mailing list