[FFmpeg-user] How to publish rtmp to multiple destinations

Loadlinx limiteddi at gmail.com
Fri Jun 6 09:39:37 CEST 2014


On Fri, Jun 6, 2014 at 3:10 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Loadlinx <limiteddi <at> gmail.com> writes:
>
>> ffmpeg -i udp://192.168.0.1:12710 -vcodec libx264
>> -deinterlace -preset superfast -vb 500k -acodec libfdk_aac
>> -ab 32k -ar 44100 -async 480 -f flv
>> rtmp://127.0.0.1:1935/live/stream2
>
> (Completely unrelated: The -deinterlace option
> is deprecated, please use a filter, for example
> yadif.)
>
>> How do I also get the above to publish into let's
>> say rtmp://127.0.0.2:1936
>
> Did you try the tee muxer?
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

I did and had very little luck

/root/bin/ffmpeg -i udp://192.168.0.1:7777 -deinterlace -vcodec copy
-acodec libfdk_aac -ab 32k -ar 44100 -async 480 \ -f tee -map 0:v -map
0:a "rtmp://192.168.0.1:1935/live/test1|[f=flv]rtmp://192.168.0.2:1935/live/test2/"
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar 25 2014 21:10:08 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
  configuration: --prefix=/root/ffmpeg_build
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libtheora --enable-libvorbis --enable-libx264
--enable-nonfree --enable-pic
  libavutil      52. 69.100 / 52. 69.100
  libavcodec     55. 54.100 / 55. 54.100
  libavformat    55. 35.101 / 55. 35.101
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
[mpeg2video @ 0x2435240] Invalid frame dimensions 0x0.
    Last message repeated 50 times
Input #0, mpegts, from 'udp://192.128.0.1:7777':
  Duration: N/A, start: 39284.693322, bitrate: 157 kb/s
  Program 710
    Stream #0:0[0x1722]: Video: mpeg2video (Main) ([2][0][0][0] /
0x0002), yuv420p(tv), 544x480 [SAR 20:17 DAR 4:3], max. 15000 kb/s,
29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1723](eng): Audio: mp2 ([4][0][0][0] / 0x0004),
48000 Hz, stereo, s16p, 157 kb/s
[NULL @ 0x24f9420] Unable to find a suitable output format for ' -f'
 -f: Invalid argument

What am I doing wrong?


More information about the ffmpeg-user mailing list