[FFmpeg-user] RE : Rtmp

jacky renaux.jacky at orange.fr
Wed Dec 7 01:48:15 CET 2011



-----Message d'origine-----
De : ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-bounces at ffmpeg.org]
De la part de Carl Eugen Hoyos
Envoyé : mardi 6 décembre 2011 22:00
À : ffmpeg-user at ffmpeg.org
Objet : Re: [FFmpeg-user] Rtmp


jacky <renaux.jacky <at> orange.fr> writes:

> I am using a RED5 server , doing very well
> To stream flash files using rtmp protocol
> I try to stream live like
>  ffmpeg -f my_file .... rtmp://myserver/myfile.flv

This does not look like a valid ffmpeg command line...

> I am getting error such
> RTMP_READPacket, failed to read RTMP packet header
> 
> Could any body help me ?
> Does any body already made a live streaming using 
> Ffmpeg as encoder and red5 as streamer ?
> 
> Is this message generated by ffmpeg ?

I did not find it in the source.

> By the server ?
> ffmpeg version N-31031-gf211d9d, Copyright (c) 2000-2011 the FFmpeg
> developers
>   built on Jun 26 2011 22:50:39 with gcc 4.5.3

This is slightly old, please try current git head.

Carl Eugen

------thanks Carl i have updated ffmpeg-------------------

Following is a complete command line and ffmeg answer 

It is a bit confuse but on dump : 
Parsed app does not have the full path provided on the command line
But it is in the dump details 

set
f_out=rtmp://video-utl.univ-evry.fr/usr/local/red5/webapps/oflaDemo/streams/
live/toto.flv    
set f_in=macula1.vob
FFMPEG -i %f_in% -f flv  -b:v 400k -acodec libmp3lame -ab 128k -ar 44100 -ac
1 -s 720x576 -r 25  -debug -dump -hex %f_out% 

ffmpeg version N-35462-g61b1d85, Copyright (c) 2000-2011 the FFmpeg
developers
  built on Dec  5 2011 14:22:27 with gcc 4.6.2
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
--enable-zlib
  libavutil    51. 30. 0 / 51. 30. 0
  libavcodec   53. 40. 0 / 53. 40. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 51. 0 /  2. 51. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mpeg @ 020C9C00] max_analyze_duration 5000000 reached at 5000000
Input #0, mpeg, from 'macula1.vob':
  Duration: 00:02:40.08, start: 0.500000, bitrate: 3108 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR
16:15 DAR 4:3], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s
Parsing...
Parsed protocol: 0
Parsed host    : video-utl.univ-evry.fr
Parsed app     : usr/local
RTMP_Connect1, ... connected, handshaking
HandShake: Type Answer   : 03
HandShake: Server Uptime : 571217
HandShake: FMS Version   : 0.0.0.0
HandShake: Handshaking finished....
RTMP_Connect1, handshaked
RTMP_SendPacket: fd=1748, size=108
  0000:  03 00 00 00 00 00 6c 14  00 00 00 00               ......l.....

  0000:  02 00 07 63 6f 6e 6e 65  63 74 00 3f f0 00 00 00   ...connect.?....

  0010:  00 00 00 03 00 03 61 70  70 02 00 09 75 73 72 2f   ......app...usr/

  0020:  6c 6f 63 61 6c 00 04 74  79 70 65 02 00 0a 6e 6f   local..type...no

  0030:  6e 70 72 69 76 61 74 65  00 05 74 63 55 72 6c 02   nprivate..tcUrl.

  0040:  00 27 72 74 6d 70 3a 2f  2f 76 69 64 65 6f 2d 75   .'rtmp://video-u

  0050:  74 6c 2e 75 6e 69 76 2d  65 76 72 79 2e 66 72 2f   tl.univ-evry.fr/

  0060:  75 73 72 2f 6c 6f 63 61  6c 00 00 09               usr/local...

Invoking connect
RTMP_ReadPacket: fd=1748
  0000:  03 00 00 00 00 00 82 14  00 00 00 00               ............

  0000:  02 00 07 5f 72 65 73 75  6c 74 00 3f f0 00 00 00   ..._result.?....

  0010:  00 00 00 05 03 00 05 6c  65 76 65 6c 02 00 05 65   .......level...e

  0020:  72 72 6f 72 00 04 63 6f  64 65 02 00 1e 4e 65 74   rror..code...Net

  0030:  43 6f 6e 6e 65 63 74 69  6f 6e 2e 43 6f 6e 6e 65   Connection.Conne

  0040:  63 74 2e 52 65 6a 65 63  74 65 64 00 0b 64 65 73   ct.Rejected..des

  0050:  63 72 69 70 74 69 6f 6e  02 00 24 4e 6f 20 73 63   cription..$No sc

  0060:  6f 70 65 20 27 75 73 72  2f 6c 6f 63 61 6c 27 20   ope 'usr/local'

  0070:  6f 6e 20 74 68 69 73 20  73 65 72 76 65 72 2e 00   on this server..

RTMP_ReadPacket: fd=1748
  0000:  c3                                                 .

  0000:  00 09                                              ..

RTMP_ClientPacket, received: invoke 130 bytes
(object begin)
Property: <Name:           no-name., STRING:	_result>
Property: <Name:           no-name., NUMBER:	1.00>
Property: NULL
Property: <Name:           no-name., OBJECT>
(object begin)
Property: <Name:              level, STRING:	error>
Property: <Name:               code, STRING:
NetConnection.Connect.Rejected>
Property: <Name:        description, STRING:	No scope 'usr/local' on this
server.>
(object end)
(object end)
HandleInvoke, server invoking <_result>
HandleInvoke, received result for method call <connect>
RTMP_SendPacket: fd=1748, size=68
  0000:  43 00 00 00 00 00 44 14                            C.....D.

  0000:  02 00 0d 72 65 6c 65 61  73 65 53 74 72 65 61 6d   ...releaseStream

  0010:  00 40 00 00 00 00 00 00  00 05 02 00 27 72 65 64   . at ..........'red

  0020:  35 2f 77 65 62 61 70 70  73 2f 6f 66 6c 61 44 65   5/webapps/oflaDe

  0030:  6d 6f 2f 73 74 72 65 61  6d 73 2f 6c 69 76 65 2f   mo/streams/live/

  0040:  74 6f 74 6f                                        toto

Invoking releaseStream
RTMP_SendPacket: fd=1748, size=64
  0000:  43 00 00 00 00 00 40 14                            C..... at .

  0000:  02 00 09 46 43 50 75 62  6c 69 73 68 00 40 08 00   ...FCPublish. at ..

  0010:  00 00 00 00 00 05 02 00  27 72 65 64 35 2f 77 65   ........'red5/we

  0020:  62 61 70 70 73 2f 6f 66  6c 61 44 65 6d 6f 2f 73   bapps/oflaDemo/s

  0030:  74 72 65 61 6d 73 2f 6c  69 76 65 2f 74 6f 74 6f   treams/live/toto

Invoking FCPublish
RTMP_SendPacket: fd=1748, size=25
  0000:  43 00 00 00 00 00 19 14                            C.......

  0000:  02 00 0c 63 72 65 61 74  65 53 74 72 65 61 6d 00   ...createStream.

  0010:  40 10 00 00 00 00 00 00  05                        @........

Invoking createStream
RTMP_ReadPacket: fd=1748
RTMP_ReadPacket, failed to read RTMP packet header
rtmp://video-utl.univ-evry.fr/usr/local/red5/webapps/oflaDemo/streams/live/t
oto.flv: Operation not permitted 
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list