ffmpeg receiving rtmp stream from/streaming to flash media server

receiving:

$ ffplay -i rtmp://localhost:1936/live/b
ffplay version N-39664-g6bfb304 Copyright (c) 2003-2012 the FFmpeg developers
built on Apr 9 2012 20:32:46 with gcc 4.6.3
libavutil 51. 46.100 / 51. 46.100
libavcodec 54. 14.101 / 54. 14.101
libavformat 54. 3.100 / 54. 3.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 67.101 / 2. 67.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 10.100 / 0. 10.100
libpostproc 52. 0.100 / 52. 0.100
Closing connection: NetStream.Play.StreamNotFound
rtmp://localhost:1936/live/b: Operation not permitted

 

meant “use live=1″ apparently…
c:\dev\3.0\dps_trunk>ffplay -i “rtmp://localhost:1936/live/b live=1″

ffplay version N-39664-g6bfb304 Copyright (c) 2003-2012 the FFmpeg developers
built on Apr 9 2012 20:32:46 with gcc 4.6.3
configuration: –enable-gpl –enable-version3 –disable-w32threads –enable-runtime-cpudetect –enable-avisyn
th –enable-bzlib –enable-frei0r –enable-libass –enable-libcelt –enable-libopencore-amrnb –enable-libopenc
ore-amrwb –enable-libfreetype –enable-libgsm –enable-libmp3lame –enable-libnut –enable-libopenjpeg –enabl
e-librtmp –enable-libschroedinger –enable-libspeex –enable-libtheora –enable-libutvideo –enable-libvo-aace
nc –enable-libvo-amrwbenc –enable-libvorbis –enable-libvpx –enable-libx264 –enable-libxavs –enable-libxvi
d –enable-zlib
libavutil 51. 46.100 / 51. 46.100
libavcodec 54. 14.101 / 54. 14.101
libavformat 54. 3.100 / 54. 3.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 67.101 / 2. 67.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 10.100 / 0. 10.100
libpostproc 52. 0.100 / 52. 0.100
rtmp server sent error
Metadata:
duration 0.00
width 1720.00
height 880.00
videodatarate 195.31
framerate 30.00
videocodecid 2.00
encoder Lavf54.15.100
filesize 0.00
Input #0, flv, from ‘rtmp://localhost:1936/live/b live=1′:
Metadata:
encoder : Lavf54.15.100
Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: flv1, yuv420p, 1720×880, 200 kb/s, 30 tbr, 1k tbn, 1k tbc
68.01 A-V: 0.000 fd= 0 aq= 0KB vq= 32KB sq= 0B f=1/1 0/0

 

it pauses for like 15 seconds, then continues and actually works. Weird.

 

 

also use -analyzeduration 0

to avoid the initial delay

 

streaming:

$ ffmpeg -f dshow -i video=screen-capture-recorder -s vga -vcodec libx264 -f flv “rtmp://localhost:1936/live/b”

 

or the like.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>