[MEncoder-users] RTP streams

Barta János j.barta at freemail.hu
Wed Mar 1 15:23:27 CET 2006


Hello!

I would like to make an RTP stream with the ffmpeg, but I
have a probleam with the RTP configuration. 
(Because mencoder and ffmpeg have a close  friendship,
perhaps it is not a problem, that I send this request to 
this list. :-) )
The configuration:
	Server IP: 		10.22.2.135
	Server Audio Port: 	12300
	Server Video Port: 	12340

I'm not sure, but I think I need to configure 2 separeted
streams. First I need to configure the video, and then the
audio stream. (Of course, I always have to disable the other
device.)
For example:

#!/bin/bash
DEFAULT_HOST="10.22.2.135"
AUDIO_PORT=12300
VIDEO_PORT=12340
# audio settings
AUDIO_DEV="/dev/dsp"
SRATE=8000
CHANNELS=1
#SRATE=22050
#CHANNELS=1
AUDIO_BITRATE=6
# video settings
VIDEO_DEV="/dev/video"
VIDEO_DEV_null="/dev/null"
PIC_SIZE=qcif
FRAME_RATE=6
VIDEO_BITRATE=52

Video:
ffmpeg -y -an -vd $VIDEO_DEV -vcodec mpeg4 -f m4v -r
$FRAME_RATE -s $PIC_SIZE -b $VIDEO_BITRATE -g 12
rtp://$DEFAULT_HOST:$VIDEO_PORT&

Audio:
ffmpeg -y -vd $VIDEO_DEV_null -vcodec mpeg4 -f m4v -ad
$AUDIO_DEV -ar $SRATE -ac $CHANNELS -vn -ab $AUDIO_BITRATE
-acodec amr_nb rtp://$DEFAULT_HOST:$AUDIO_PORT&
-----
But it does not really work. I can make only one rtp stream.
Why?

And why can't I combine the 2 streams into one command, for
example:
ffmpeg -y -vd $VIDEO_DEV -vcodec mpeg4 -f m4v -r $FRAME_RATE
-s $PIC_SIZE -b $VIDEO_BITRATE -g 12 -ad $AUDIO_DEV -ar
$SRATE -ac $CHANNELS -vn -ab $AUDIO_BITRATE -acodec amr_nb
rtp://$DEFAULT_HOST:$AUDIO_PORT
It is not working too.

And I have a second question. Can I open the multimedia
devices (/dev/video, /dev/dsp) more than once? I would like
to make more streams (with different codecs). But it takes
multiple opens.


Can Somebody help me?

Thanks,
Jani




___________________________________________________________________________
[origo] klikkbank lakossági számlacsomag havi 199 Ft-ért, bankkártya éves díj nélkül!
www.klikkbank.hu






More information about the MEncoder-users mailing list