[Ffmpeg-devel] Sending more than one RTP streams

Kite Flyer kiteflyer77
Thu Apr 12 09:52:51 CEST 2007


I'm trying to stream *both* audio and video from an mpeg file to RTP
destination urls. This is what I'm doing:
$ ./ffmpeg -f mpeg -i ../test/video/sample.mpeg -vcodec mpeg1video -b 400kb -ac
odec mp2 -ab 56kb -f rtp rtp://
FFmpeg version SVN-r8627, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-amr_nb
  libavutil version: 49.4.0
  libavcodec version: 51.40.2
  libavformat version: 51.11.0
  built on Apr  4 2007 19:38:30, gcc: 3.4.4 (cygming special) (gdc 0.12, using d
md 0.125)
Input #0, mpeg, from '../test/video/sample.mpeg':
  Duration: 00:00:13.4, start: 1.053656, bitrate: 606 kb/s
  Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 160x120, 400 kb/s, 25.00 fps(r
  Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, mono, 56 kb/s
Output #0, rtp, to 'rtp://':
  Stream #0.0: Video: mpeg1video, yuv420p, 160x120, q=2-31, 400 kb/s, 25.00 fps(
  Stream #0.1: Audio: mp2, 44100 Hz, mono, 56 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
rtp_write_header: nb_streames = 2		[my debug print]
Could not write header for output file #0 (incorrect codec parameters ?)
rtp_write_header returns error when it sees that number of output
streams (s1->nb_streams) is more than 1.

I can specify only one RTP destination url whereas I want to send to
separate ports. Am I missing something? Or is it suggested to run two
separate (A, V) ffmpeg processes to do the job? I'm going to check how
that works and how is the lip sync there.


More information about the ffmpeg-devel mailing list