1

I am trying to stream both video&audio from usbcam&mic throw ffmpeg over ffserver I got 2 errors:
- ffmpeg seems functionning but showing "Data doesn't look like RTP packets, make sure the RTP muxer is used" - i can connect to ffserver only for static files

here is server.conf file:

HTTPPort 1235
RTSPPort 1234
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 100000
#CustomLog –

########################################
##  static file for testing
########################################
#HTTP requests
<Stream media.flv>
File "/home/username/media.flv"
Format flv
</Stream>

#RTSP requests
<Stream media.mpg>
#preconverted file:
File "/home/username/media.mpg"
Format rtp
VideoFrameRate 30
VideoCodec libx264
VideoSize 720x720
StartSendOnKey
Preroll 0
</Stream>

##################################################
## usb cam
###################################################
<Feed test.ffm>
File /tmp/test.ffm
FileMaxSize 20K
ACL allow 192.168.1.149
</Feed>

<Stream usbcam.mpg>
Feed test.ffm
Format rtp
VideoFrameRate 25
VideoCodec libx264
VideoSize 720x720
PreRoll 0
StartSendOnKey
</Stream>

my ffmpeg cmd is

ffmpeg -s 720x720 -f video4linux2 -i /dev/video0 -r 25 -f alsa -i hw:0 -c:v libx264 -c:a aac -strict -2 rtp://192.168.1.149:1234/test.ffm

it seems working but showing this error:

"Data doesn't look like RTP packets, make sure the RTP muxer is used"

when i stream the static files it works but when i try to play usbcam stream throw ffplay and vlc nothing works

thank you in advance,

SOFuser
  • 134
  • 1
  • 10

1 Answers1

1

you can try tell to ffmpeg what is your output muxer format. (-f rtp)

ffmpeg -s 720x720 -f video4linux2 -i /dev/video0 -r 25 -f alsa -i hw:0 -c:v libx264 -c:a aac -strict -2 -f rtp rtp://192.168.1.149:1234/test.ffm
  • I've already tried that but I got: "Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument" Thanks for helping – SOFuser Jun 30 '16 at 08:31
  • 1
    I think that you need use one port per stream like: `ffmpeg -s 720x720 -f video4linux2 -i /dev/video0 -r 25 -f alsa -i hw:0 -c:v libx264 -an -f rtp rtp://192.168.1.149:1234/test.ffm -vn -c:a aac -strict -2 -f rtp rtp://192.168.1.149:1235/test.ffm`, – Fabio Pereira Jun 30 '16 at 15:48
  • using this command ffmpeg and ffserver work but ffplay keeps buffering and gives no output. I'll try to send the to media separatly and thne mux them. thank you again – SOFuser Jul 01 '16 at 09:56