[FFmpeg-trac] #6165(ffmpeg:new): FFMPEG UDP stream broken with DVB_SUBTITLE's
FFmpeg
trac at avcodec.org
Sun Feb 19 10:10:51 EET 2017
#6165: FFMPEG UDP stream broken with DVB_SUBTITLE's
-------------------------------------+-------------------------------------
Reporter: NPeca | Type: defect
Status: new | Priority: important
Component: ffmpeg | Version:
Keywords: UDP Stream | unspecified
subtitles | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
FFMPEG output stream with dvb_subtitles broken
I have HTTP stream which I like to convert to UDP:
http://192.168.1.44:8001/1:0:1:1F8:1B:2C0:E080000:0:0:0:
The Video, Audio and Subtitle work perfectly If I try to open this stream
in VLC, DragonPlayer, SMPlayer in Ubuntu.
So far, so good
Here is otput of FFPROBE
{{{
ffprobe -i http://192.168.1.44:8001/1:0:1:1F8:1B:2C0:E080000:0:0:0:
ffprobe version git-2017-01-22-f1214ad Copyright (c) 2007-2017 the FFmpeg
developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg
--mandir=/usr/share/man --enable-avresample --disable-debug --enable-
nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb
--enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb
--enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264
--enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-
libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-
libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-
libvidstab --enable-libwavpack --enable-nvenc
libavutil 55. 44.100 / 55. 44.100
libavcodec 57. 75.100 / 57. 75.100
libavformat 57. 63.100 / 57. 63.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 69.100 / 6. 69.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
[mpeg2video @ 0xa56fde0] Invalid frame dimensions 0x0.
Last message repeated 2 times
Input #0, mpegts, from 'ht
tp://192.168.1.44:8001/1:0:1:1F8:1B:2C0:E080000:0:0:0:':
Duration: N/A, start: 35782.514200, bitrate: N/A
Program 501
Program 502
Program 503
Program 504
Stream #0:0[0x13b1]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k
tbn, 50 tbc
Stream #0:1[0x13b2]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, s16p, 256 kb/s
Stream #0:2[0x1541](srp): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream #0:3[0x1542](slv): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream #0:4[0x1543](hrv): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream #0:5[0x1544](cze): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream #0:6[0x1545](hun): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream #0:7[0x1546](ron): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream #0:8[0x1547](alb): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream #0:9[0x1548](bul): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream #0:10[0x13b9](eng): Subtitle: dvb_teletext ([6][0][0][0] /
0x0006)
Program 505
Program 506
Program 507
Program 508
Program 509
Program 510
Program 511
Program 515
Program 516
Program 517
Program 518
Program 519
Program 520
Program 521
Unsupported codec with id 94215 for input stream 10
}}}
So I decide to use FFMPEG to stream to UDP, and filter out unwanted SUB's
Here is FFMPEG cmd
{{{
ffmpeg -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1
-reconnect_delay_max 2048 \
-i "http://192.168.1.44:8001/1:0:1:1F8:1B:2C0:E080000:0:0:0:" \
-map 0:0 -vcodec copy \
-map 0:1 -acodec copy \
-map 0:2 -map 0:6 -scodec copy \
-f mpegts udp://239.0.10.3:40000?pkt_size=1316
}}}
OUTPUT:
{{{
Output #0, mpegts, to 'udp://239.0.10.3:40000?pkt_size=1316':
Metadata:
encoder : Lavf57.63.100
Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], q=2-31, 25 fps, 25
tbr, 90k tbn, 90k tbc
Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo,
s16p, 256 kb/s
Stream #0:2(srp): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:3(hun): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #0:6 -> #0:3 (copy)
}}}
RESULT:
Resulting stream is disaster, Video fall apart, audio skipping, unusable
If i try same thing WITHOUT dvb_subtitle stream, only Video (0) and Audio
(1) everything work fine. Crystal clear picture and nice audio
If i map one or more SUB's, no matter which or how many, UDP stream is
unusable
To narrow down the problem, i tried to record input stream in file
{{{
ffmpeg -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1
-reconnect_delay_max 2048 \
-i "http://192.168.1.44:8001/1:0:1:1F8:1B:2C0:E080000:0:0:0:" \
-map 0:0 -map 0:1 -map 0:2 -map 0:6 \
-codec copy \
-y -f mpegts /tmp/tst.ts
}}}
resulting file is playable, video ok, audio ok, subtitles ok
and if i try to "burn" one subtitle on video
{{{
ffmpeg -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1
-reconnect_delay_max 2048 \
-f mpegts -i
"http://192.168.1.43:8001/1:0:1:1F8:1B:2C0:E080000:0:0:0:" \
-vcodec mpeg2video -s 720x576 -r 25 -qmax 30 \
-b:v 2M -minrate:v 2M -maxrate:v 2M -bufsize:v 1.4M \
-filter_complex "[0:v][0:s:0]overlay[v]" -map "[v]" \
-map 0:1 -acodec copy \
-f mpegts udp://239.0.10.3:40000?pkt_size=1316
}}}
everything is ok, sub is burned, video is ok, audio is ok.
So, i think there is something terribly wrong with UDP / TS muxing when
dvb_subtitle streams is included in output
about FFMPEG versions
i tried this on Centos 5, Ubuntu 14.04, tried to compile from source, same
things
about my network
Computer is strong enough to handle FFMPEG
ETH0 (input) is gigabit
ETH1 (outut) is gigabit
there is NO wireless in network
there is NO other equipment on network, only source, computer and receiver
any solution for this ?
I really need this two subtitle stream to be broadcast along with video /
audio
tnx
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6165>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list