Search code examples
ffmpegred5rtmp

ffmpeg rtmp streaming


I have Red5 oflaDemo Connected and working fine

When I try to rtmp stream flv file with ffmpeg I am getting this errors

root@zzz-OptiPlex-170L:~# ffmpeg -re -i '/usr/share/red5/webapps/oflaDemo/streams
/avatar.flv' -vcodec libx264 -acodec copy -ab 128.k -ac 2 -ar 44100 -r 25 
-s 320x240 -vb 660.k -preset slow -f flv 'rtmp://localhost/oflaDemo/streamTest' 


Output #0, flv, to 'rtmp://localhost/oflaDemo/streamTest':
  Metadata:
    encoder         : Lavf53.24.2
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 320x240, q=-1--1, 660 kb/s, 1k tbn, 25 tbc
    Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 11025 Hz, mono, 16 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (flv -> libx264)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=   15 fps=  0 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s
frame=   27 fps= 26 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s
frame=   40 fps= 26 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s
frame=   52 fps= 24 q=27.0 size=       7kB time=00:00:00.-4 bitrate=-1362.0kbits

Solution

  • Well, -ab 128.k and -vb 660.k shouldn't have periods in them, and also its just -b, not -vb... or am I missing something? And if you use -acodec copy I don't see how you can specify an -ab audio bitrate or -ar either...

    This might work better:

    ffmpeg -re -i '/usr/share/red5/webapps/oflaDemo/streams/avatar.flv' \
    -vcodec libx264 -ab 128k -ac 2 -ar 44100 -r 25 -s 320x240 -vb 660k -f \
    flv 'rtmp://localhost/oflaDemo/streamTest'