-1

I am trying to stream my webcam video using the ffmpeg to wowza media server on linux..

ffmpeg -re -f video4linux2 -i /dev/video0 -acodec libfacc -vcodec libx264 -f h264 rtmp://localhost:1935/live/test

This is the command I used for some reason it doesn't seem to work as I am not able to run the example that came with wowza. I tried using flash media live encoder to send a rtmp to my wowza server and it works.

Any pointers on how to solve this problem.

I build ffmpeg from their git repo with the following config

--enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab

ffmpeg -protocols says it has rtmp input/output support

Josnidhin
  • 12,469
  • 9
  • 42
  • 61

3 Answers3

3

With these build options my FFMPEG build does receive and decode rtsp streams

--enable-network --enable-protocol=tcp --enable-demuxer=rtsp --enable-decoder=h264

I have answered a similar question here FFMPEG API: How to connect to RTSP stream using av_open_input_file?

Community
  • 1
  • 1
Alexander Kulyakhtin
  • 47,782
  • 38
  • 107
  • 158
  • Why not to take a ready FFMPEG build instead of building yourself? There's a site with ready FFMPEG builds, don't remember URL though. Worked for me – Alexander Kulyakhtin Nov 30 '11 at 16:20
1

Your second -f switch, for the container format, should be mp4 not h264. H264 is a codec not a container format

Allan Jude
  • 111
  • 3
0

In order to stream to rtmp, one should select 'flv' output format like this:

ffmpeg -re -f video4linux2 -i /dev/video0 -acodec libfacc -vcodec libx264 -f flv rtmp://localhost:1935/live/test