Opened 6 years ago

Closed 5 years ago

#3514 closed defect (fixed)

Remuxing a dvb teletext stream fails

Reported by: dalongra Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: dvbsub av_interleaved_write_frame
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by cehoyos)

See comment:8 for the description.
---
Summary of the bug: Image freezes when copying DVB subtitles from input to the output TS.

I working with a complex mpeg2video input stream (from Nat Geo Wild SD channel), described below: 1 SD mepeg2video, 8 audio, 1 empty dvb_teletext (cue tones), 4 languages in the same stream dvb_teletext (4 pages) and 8 streams DVB_sub. Please see ffprobe -i output below.

Stream #0:0[0xc81], 21, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], 1/50, max. 3485 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0xc8a](eng), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 186 kb/s
Stream #0:2[0xc8c](dut), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:3[0xc92](cze), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:4[0xc94](hun), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 62 kb/s
Stream #0:5[0xc95](tur), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:6[0xc9a](rus), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:7[0xca0](heb), 40, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:8[0xca7](bul), 40, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 249 kb/s
Stream #0:9[0xd49](spa), 24, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:10[0xd4a](dut,nor,dan,swe,por), 24, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:11[0xd54](dut), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:12[0xd57](nor), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:13[0xd5e](gre), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:14[0xd5f](por), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:15[0xd70](slv), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:16[0xd71](heb), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:17[0xd72](hrv), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:18[0xd73](srp), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)

I am trying to copy input to output selecting some streams with -map option, but I am having lot of trouble when selecting subtitles streams. Please see the test I have done, listed below (I have no problem with video and all audio streams, included in all the tests)

Regarding the subtitles streams:

1 - If I only select Stream #0:9[0xd49](spa) and copy subtitle codec: dvb_teletext, everything OK.

2 - If add to the output any of the DVB subs input streams either copying the codec or forcing the output to DVBsub encoding, output image freezes.

Please find attached 4 files:

FILE 1 - Sample of the input stream.
FILE 2 - Sample of the output streams with no subs --> OK
FILE 3 - Sample of the output stream selecting only stream #0:9 --> OK
FILE 4 - Sample of the output stream including 2 DVBsub streams --> IMAGE FREEZING

Please find below a summary of the commands I have used to generate every file:

  • FOR FILE 2:

ffmpeg -v 9 -loglevel 99 -fix_sub_duration -re -i "udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1" -acodec copy -vcodec copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 -map 0:6 -map 0:7 -map 0:8 -f mpegts "udp://224.168.223.204:2204"

  • FOR FILE 3:

ffmpeg -v 9 -loglevel 99 -fix_sub_duration -re -i "udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1" -acodec copy -vcodec copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 -map 0:6 -map 0:7 -map 0:8 -map 0:9 -c:s:0 copy -f mpegts "udp://224.168.223.204:2204"

  • FOR FILE 4:

ffmpeg -v 9 -loglevel 99 -fix_sub_duration -re -i "udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1" -acodec copy -vcodec copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 -map 0:6 -map 0:7 -map 0:8 -map 0:9 -map 0:11 -map 0:12 -c:s:0 copy -c:s:1 dvbsub -c:s:2 dvbsub -f mpegts "udp://224.168.223.204:2204"

As you can see below, ouput image freezes when adding DVB subtitles. I have also tried using -muxrate option but it does not improve. Can you help me on this issue? Regards.

Please find below the complete output of ffmpeg with -v 9 -loglevel 99 options to generate file 4:

ffmpeg -v 9 -loglevel 99 -fix_sub_duration -re -i "udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1" -acodec copy -vcodec copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 -map 0:6 -map 0:7 -map 0:8 -map 0:9 -map 0:11 -map 0:12 -c:s:0 copy -c:s:1 dvbsub -c:s:2 dvbsub -f mpegts "udp://224.168.223.204:2204"
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers

built on Mar 27 2014 12:18:08 with gcc 4.6 (Ubuntu/Linaro? 4.6.3-1ubuntu5)
configuration: --prefix=/home/obencoder/ffmpeg_build --extra-cflags=-I/home/obencoder/ffmpeg_build/include --extra-ldflags=-L/home/obencoder/ffmpeg_build/lib --bindir=/home/obencoder/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libfreetype --enable-libzvbi
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

Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-fix_sub_duration' ... matched as option 'fix_sub_duration' (fix subtitles duration) with argument '1'.
Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
Reading option '-i' ... matched as input file with argument 'udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:1'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:2'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:3'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:4'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:5'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:6'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:7'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:8'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:9'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:11'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:12'.
Reading option '-c:s:0' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:1' ... matched as option 'c' (codec name) with argument 'dvbsub'.
Reading option '-c:s:2' ... matched as option 'c' (codec name) with argument 'dvbsub'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mpegts'.
Reading option 'udp://224.168.223.204:2204' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1.
Applying option fix_sub_duration (fix subtitles duration) with argument 1.
Applying option re (read input at native frame rate) with argument 1.
Successfully parsed a group of options.
Opening an input file: udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1.
[udp @ 0x2397180] end receive buffer size reported is 131072
[mpegts @ 0x2396b40] Format mpegts probed with size=2048 and score=100
[mpegts @ 0x2396b40] stream=0 stream_type=2 pid=c81 prog_reg_desc=
[mpegts @ 0x2396b40] stream=1 stream_type=3 pid=c8a prog_reg_desc=
[mpegts @ 0x2396b40] stream=2 stream_type=3 pid=c8c prog_reg_desc=
[mpegts @ 0x2396b40] stream=3 stream_type=3 pid=c92 prog_reg_desc=
[mpegts @ 0x2396b40] stream=4 stream_type=3 pid=c94 prog_reg_desc=
[mpegts @ 0x2396b40] stream=5 stream_type=3 pid=c95 prog_reg_desc=
[mpegts @ 0x2396b40] stream=6 stream_type=3 pid=c9a prog_reg_desc=
[mpegts @ 0x2396b40] stream=7 stream_type=3 pid=ca0 prog_reg_desc=
[mpegts @ 0x2396b40] stream=8 stream_type=3 pid=ca7 prog_reg_desc=
[mpegts @ 0x2396b40] stream=9 stream_type=6 pid=d49 prog_reg_desc=
[mpegts @ 0x2396b40] stream=10 stream_type=6 pid=d4a prog_reg_desc=
[mpegts @ 0x2396b40] stream=11 stream_type=6 pid=d54 prog_reg_desc=
[mpegts @ 0x2396b40] stream=12 stream_type=6 pid=d57 prog_reg_desc=
[mpegts @ 0x2396b40] stream=13 stream_type=6 pid=d5e prog_reg_desc=
[mpegts @ 0x2396b40] stream=14 stream_type=6 pid=d5f prog_reg_desc=
[mpegts @ 0x2396b40] stream=15 stream_type=6 pid=d70 prog_reg_desc=
[mpegts @ 0x2396b40] stream=16 stream_type=6 pid=d71 prog_reg_desc=
[mpegts @ 0x2396b40] stream=17 stream_type=6 pid=d72 prog_reg_desc=
[mpegts @ 0x2396b40] stream=18 stream_type=6 pid=d73 prog_reg_desc=
[mpegts @ 0x2396b40] Before avformat_find_stream_info() pos: 0 bytes read:1718696 seeks:0
[mpegts @ 0x2396b40] parser not found for codec dvb_teletext, packets or times may be invalid.
[libzvbi_teletextdec @ 0x23c18a0] page filter: *
[mpegts @ 0x2396b40] parser not found for codec dvb_teletext, packets or times may be invalid.
[libzvbi_teletextdec @ 0x23c23c0] page filter: *
[mpegts @ 0x2396b40] parser not found for codec dvb_teletext, packets or times may be invalid.

Last message repeated 1 times

[mpegts @ 0x2396b40] All programs have pmt, headers found
[mpeg2video @ 0x23bb440] Invalid frame dimensions 0x0.
[mpegts @ 0x2396b40] All info found
[mpegts @ 0x2396b40] After avformat_find_stream_info() pos: 2192644 bytes read:2193772 seeks:0 frames:359
Input #0, mpegts, from 'udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1':

Duration: N/A, start: 52271.793022, bitrate: 885 kb/s
Program 1002

Metadata:

service_name : Nat Geo Wild
service_provider: Overon

Stream #0:0[0xc81], 21, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], 1/50, max. 3485 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0xc8a](eng), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 186 kb/s
Stream #0:2[0xc8c](dut), 30, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:3[0xc92](cze), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:4[0xc94](hun), 30, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 61 kb/s
Stream #0:5[0xc95](tur), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:6[0xc9a](rus), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:7[0xca0](heb), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:8[0xca7](bul), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 248 kb/s
Stream #0:9[0xd49](spa), 43, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:10[0xd4a](dut,nor,dan,swe,por), 21, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:11[0xd54](dut), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:12[0xd57](nor), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:13[0xd5e](gre), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:14[0xd5f](por), 1, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:15[0xd70](slv), 1, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:16[0xd71](heb), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:17[0xd72](hrv), 1, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:18[0xd73](srp), 1, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)

Successfully opened the file.
Parsing a group of options: output file udp://224.168.223.204:2204.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Applying option map (set input stream mapping) with argument 0:0.
Applying option map (set input stream mapping) with argument 0:1.
Applying option map (set input stream mapping) with argument 0:2.
Applying option map (set input stream mapping) with argument 0:3.
Applying option map (set input stream mapping) with argument 0:4.
Applying option map (set input stream mapping) with argument 0:5.
Applying option map (set input stream mapping) with argument 0:6.
Applying option map (set input stream mapping) with argument 0:7.
Applying option map (set input stream mapping) with argument 0:8.
Applying option map (set input stream mapping) with argument 0:9.
Applying option map (set input stream mapping) with argument 0:11.
Applying option map (set input stream mapping) with argument 0:12.
Applying option c:s:0 (codec name) with argument copy.
Applying option c:s:1 (codec name) with argument dvbsub.
Applying option c:s:2 (codec name) with argument dvbsub.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: udp://224.168.223.204:2204.
Successfully opened the file.
[mpegts @ 0x24f32a0] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'udp://224.168.223.204:2204':

Metadata:

encoder : Lavf55.35.101
Stream #0:0, 0, 1/90000: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 1/25, q=2-31, max. 3485 kb/s, 25 fps, 90k tbn, 25 tbc
Stream #0:1(eng), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 186 kb/s
Stream #0:2(dut), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:3(cze), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:4(hun), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 61 kb/s
Stream #0:5(tur), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:6(rus), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:7(heb), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:8(bul), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 248 kb/s
Stream #0:9(spa), 0, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:10(dut), 0, 1/90000: Subtitle: dvb_subtitle (dvbsub)
Stream #0:11(nor), 0, 1/90000: Subtitle: dvb_subtitle (dvbsub)

Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #0:3 -> #0:3 (copy)
Stream #0:4 -> #0:4 (copy)
Stream #0:5 -> #0:5 (copy)
Stream #0:6 -> #0:6 (copy)
Stream #0:7 -> #0:7 (copy)
Stream #0:8 -> #0:8 (copy)
Stream #0:9 -> #0:9 (copy)
Stream #0:11 -> #0:10 (dvbsub -> dvbsub)
Stream #0:12 -> #0:11 (dvbsub -> dvbsub)

Press [q] to stop, ? for help
[mpegts @ 0x2396b40] Correcting start time by 103511
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 195ate= 0.0kbits/s
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 267
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 4853te= 0.0kbits/s
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 92rate= 0.0kbits/s
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 4879
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 154
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 2946te=4117.0kbits/s
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 101ate=3461.7kbits/s
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 2962
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 172
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 3906te=3980.7kbits/s
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 3295te=3560.8kbits/s
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 153
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 297
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 4696te=3969.5kbits/s
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 3906te=3563.1kbits/s
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 79
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 151
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 3580te=4203.3kbits/s
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 171ate=3906.3kbits/s
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 4393
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 330
[dvbsub @ 0x23c2f00] Subtitle duration reduced from 60000 to 2231te=4506.4kbits/s
[dvbsub @ 0x23c3b60] Subtitle duration reduced from 60000 to 3675te=4453.0kbits/s
frame= 632 fps= 24 q=-1.0 Lsize= 15334kB time=00:00:27.16 bitrate=4624.5kbits/s
video:10483kB audio:2819kB subtitle:485kB other streams:0kB global headers:0kB muxing overhead: 11.227127%
Input file #0 (udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1):

Input stream #0:0 (video): 633 packets read (10746537 bytes);
Input stream #0:1 (audio): 1055 packets read (607680 bytes);
Input stream #0:2 (audio): 1055 packets read (253200 bytes);
Input stream #0:3 (audio): 1055 packets read (253200 bytes);
Input stream #0:4 (audio): 1055 packets read (202560 bytes);
Input stream #0:5 (audio): 1055 packets read (253200 bytes);
Input stream #0:6 (audio): 1055 packets read (253200 bytes);
Input stream #0:7 (audio): 1055 packets read (253200 bytes);
Input stream #0:8 (audio): 1055 packets read (810240 bytes);
Input stream #0:9 (subtitle): 1270 packets read (410210 bytes);
Input stream #0:10 (subtitle): 22 packets read (7106 bytes);
Input stream #0:11 (subtitle): 13 packets read (48372 bytes); 6 frames decoded;
Input stream #0:12 (subtitle): 13 packets read (45577 bytes); 6 frames decoded;
Input stream #0:13 (subtitle): 0 packets read (0 bytes);
Input stream #0:14 (subtitle): 1 packets read (494 bytes);
Input stream #0:15 (subtitle): 1 packets read (494 bytes);
Input stream #0:16 (subtitle): 0 packets read (0 bytes);
Input stream #0:17 (subtitle): 1 packets read (494 bytes);
Input stream #0:18 (subtitle): 1 packets read (494 bytes);
Total: 10395 packets (14146258 bytes) demuxed

Output file #0 (udp://224.168.223.204:2204):

Output stream #0:0 (video): 632 packets muxed (10734350 bytes);
Output stream #0:1 (audio): 1055 packets muxed (607680 bytes);
Output stream #0:2 (audio): 1055 packets muxed (253200 bytes);
Output stream #0:3 (audio): 1055 packets muxed (253200 bytes);
Output stream #0:4 (audio): 1055 packets muxed (202560 bytes);
Output stream #0:5 (audio): 1055 packets muxed (253200 bytes);
Output stream #0:6 (audio): 1055 packets muxed (253200 bytes);
Output stream #0:7 (audio): 1055 packets muxed (253200 bytes);
Output stream #0:8 (audio): 1055 packets muxed (810240 bytes);
Output stream #0:9 (subtitle): 1270 packets muxed (410210 bytes);
Output stream #0:10 (subtitle): 12 frames encoded; 12 packets muxed (44572 bytes);
Output stream #0:11 (subtitle): 12 frames encoded; 12 packets muxed (41570 bytes);
Total: 10366 packets (14117182 bytes) muxed

26 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x23b5a60] Statistics: 0 seeks, 12463 writeouts
[AVIOContext @ 0x23b7660] Statistics: 63560168 bytes read, 0 seeks

Change History (9)

comment:1 in reply to: ↑ description Changed 6 years ago by cehoyos

Replying to dalongra:

ffmpeg -v 9 -loglevel 99 -fix_sub_duration -re -i "udp://224.168.223.60:2060?fifo_size=3000000&overrun_nonfatal=1" -acodec copy -vcodec copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 -map 0:6 -map 0:7 -map 0:8 -map 0:9 -map 0:11 -map 0:12 -c:s:0 copy -c:s:1 dvbsub -c:s:2 dvbsub -f mpegts "udp://224.168.223.204:2204"

This would be a duplicate of ticket #2024 (reencoding dvbsub does not work correctly).
Is there a problem reproducible with -scodec copy? If yes, please post a command line starting with -i FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts together with the console output.

Version 0, edited 6 years ago by cehoyos (next)

comment:2 Changed 6 years ago by cehoyos

  • Keywords dvbsub added; DVB subtitles image freezing removed
  • Version changed from unspecified to git-master

comment:3 follow-up: Changed 6 years ago by dalongra

Thanks for your reply. I was not sure if this is a duplicate of ticket #2024 because I did manage to see subtitles in the output.

I have reproduced the problem with FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts as input (instead of UDP multicast), and everything is OK in the output (no freezing). Therefore it seems to be caused by the UDP multicast input because it does not happen when I use FILE_1.

But I don't manage to get subtitle Stream #0:10[0xd4a](dut,nor,dan,swe,por) of FILE_1 in the output (-map 0 option crashes).

If I use -scodec copy for Stream #0:10[0xd4a] I get this error:

[mpegts @ 0x3dfd620] Application provided invalid, non monotonically increasing dts to muxer in stream 10: 44818 >= 44818
av_interleaved_write_frame(): Invalid argument

An output file (File 6) is generated before it crashes.

If I use -c:s:1 dvbsub for Stream #0:10[0xd4a], Stream #0:10 -> #0:10 (libzvbi_teletextdec -> dvbsub), I get this other error: Subtitle encoding failed

No output file generated.

I understand these are different issues from the freezing thing. Should I open new tickets for these?

I have uploaded files 5 and 6 to the FTP:

  • File 5: everything OK in the output without Stream #0:10[0xd4a] (no freezing).

FILE_5_TICKET_3514_Output_stream_SD_mpeg2video_1_video_8_audios_1_teletext_8_DVB_subs.ts

  • File 6: mapping also #0:10[0xd4a] with -scodec copy, before crash.

See below command and output for generating file 6 (same as for file 5 but with one more -map option for stream #0:10[0xd4a])

Thanks for your help. dalongra.

ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers

built on Mar 31 2014 16:29:06 with gcc 4.6 (Ubuntu/Linaro? 4.6.3-1ubuntu5)
configuration: --prefix=/home/obencoder/ffmpeg_build --extra-cflags=-I/home/obencoder/ffmpeg_build/include --extra-ldflags=-L/home/obencoder/ffmpeg_build/lib --bindir=/home/obencoder/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libfreetype --enable-libzvbi
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

Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-fix_sub_duration' ... matched as option 'fix_sub_duration' (fix subtitles duration) with argument '1'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
Reading option '-i' ... matched as input file with argument '/home/obencoder/archivos_prueba/FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:1'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:2'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:3'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:4'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:5'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:6'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:7'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:8'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:9'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:10'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:11'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:12'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:13'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:14'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:15'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:16'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:17'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:18'.
Reading option '-c:s:0' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:1' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:2' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:3' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:3' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:4' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:5' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:6' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:7' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:8' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s:9' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mpegts'.
Reading option '/home/obencoder/archivos_prueba/FILE_6_TICKET_3514_Output_stream_SD_mpeg2video_1_video_8_audios_1_subs_dvbsub_stream10.ts' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file /home/obencoder/archivos_prueba/FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts.
Applying option fix_sub_duration (fix subtitles duration) with argument 1.
Applying option re (read input at native frame rate) with argument 1.
Successfully parsed a group of options.
Opening an input file: /home/obencoder/archivos_prueba/FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts.
[mpegts @ 0x27add00] Format mpegts probed with size=2048 and score=100
[mpegts @ 0x27add00] stream=0 stream_type=2 pid=c81 prog_reg_desc=
[mpegts @ 0x27add00] stream=1 stream_type=3 pid=c8a prog_reg_desc=
[mpegts @ 0x27add00] stream=2 stream_type=3 pid=c8c prog_reg_desc=
[mpegts @ 0x27add00] stream=3 stream_type=3 pid=c92 prog_reg_desc=
[mpegts @ 0x27add00] stream=4 stream_type=3 pid=c94 prog_reg_desc=
[mpegts @ 0x27add00] stream=5 stream_type=3 pid=c95 prog_reg_desc=
[mpegts @ 0x27add00] stream=6 stream_type=3 pid=c9a prog_reg_desc=
[mpegts @ 0x27add00] stream=7 stream_type=3 pid=ca0 prog_reg_desc=
[mpegts @ 0x27add00] stream=8 stream_type=3 pid=ca7 prog_reg_desc=
[mpegts @ 0x27add00] stream=9 stream_type=6 pid=d49 prog_reg_desc=
[mpegts @ 0x27add00] stream=10 stream_type=6 pid=d4a prog_reg_desc=
[mpegts @ 0x27add00] stream=11 stream_type=6 pid=d54 prog_reg_desc=
[mpegts @ 0x27add00] stream=12 stream_type=6 pid=d57 prog_reg_desc=
[mpegts @ 0x27add00] stream=13 stream_type=6 pid=d5e prog_reg_desc=
[mpegts @ 0x27add00] stream=14 stream_type=6 pid=d5f prog_reg_desc=
[mpegts @ 0x27add00] stream=15 stream_type=6 pid=d70 prog_reg_desc=
[mpegts @ 0x27add00] stream=16 stream_type=6 pid=d71 prog_reg_desc=
[mpegts @ 0x27add00] stream=17 stream_type=6 pid=d72 prog_reg_desc=
[mpegts @ 0x27add00] stream=18 stream_type=6 pid=d73 prog_reg_desc=
[mpegts @ 0x27add00] Before avformat_find_stream_info() pos: 0 bytes read:655360 seeks:1
[mpegts @ 0x27add00] parser not found for codec dvb_teletext, packets or times may be invalid.
[libzvbi_teletextdec @ 0x27d2560] page filter: *
[mpegts @ 0x27add00] parser not found for codec dvb_teletext, packets or times may be invalid.
[libzvbi_teletextdec @ 0x27d3080] page filter: *
[mpegts @ 0x27add00] parser not found for codec dvb_teletext, packets or times may be invalid.

Last message repeated 1 times

[mpeg2video @ 0x27b1fa0] Invalid frame dimensions 0x0.

Last message repeated 1 times

[mpegts @ 0x27add00] All programs have pmt, headers found
[mpegts @ 0x27add00] Non-increasing DTS in stream 10: packet 12 with DTS 7783637667, packet 13 with DTS 7783637667
[mpegts @ 0x27add00] Non-increasing DTS in stream 10: packet 16 with DTS 7783650411, packet 17 with DTS 7783650411
[mpegts @ 0x27add00] All info found
[NULL @ 0x27d3c80] start time is not set in estimate_timings_from_pts
[NULL @ 0x27d47a0] start time is not set in estimate_timings_from_pts
[NULL @ 0x27d5360] start time is not set in estimate_timings_from_pts
[NULL @ 0x27d5e80] start time is not set in estimate_timings_from_pts
[NULL @ 0x27d6aa0] start time is not set in estimate_timings_from_pts
[NULL @ 0x27d75c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x27d8180] start time is not set in estimate_timings_from_pts
[NULL @ 0x27d8ca0] start time is not set in estimate_timings_from_pts
[mpegts @ 0x27add00] PES packet size mismatch

Last message repeated 7 times

[mpegts @ 0x27add00] After avformat_find_stream_info() pos: 0 bytes read:3264656 seeks:3 frames:372
Input #0, mpegts, from '/home/obencoder/archivos_prueba/FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts':

Duration: 00:00:33.72, start: 86484.364989, bitrate: 19873 kb/s
Program 1002

Metadata:

service_name : Nat Geo Wild
service_provider: Overon

Stream #0:0[0xc81], 21, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], 1/50, max. 3485 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0xc8a](eng), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 186 kb/s
Stream #0:2[0xc8c](dut), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:3[0xc92](cze), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:4[0xc94](hun), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 62 kb/s
Stream #0:5[0xc95](tur), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:6[0xc9a](rus), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:7[0xca0](heb), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
Stream #0:8[0xca7](bul), 35, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 248 kb/s
Stream #0:9[0xd49](spa), 47, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:10[0xd4a](dut,nor,dan,swe,por), 24, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:11[0xd54](dut), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:12[0xd57](nor), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:13[0xd5e](gre), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:14[0xd5f](por), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:15[0xd70](slv), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:16[0xd71](heb), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:17[0xd72](hrv), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:18[0xd73](srp), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)

Successfully opened the file.
Parsing a group of options: output file /home/obencoder/archivos_prueba/FILE_6_TICKET_3514_Output_stream_SD_mpeg2video_1_video_8_audios_1_subs_dvbsub_stream10.ts.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Applying option map (set input stream mapping) with argument 0:0.
Applying option map (set input stream mapping) with argument 0:1.
Applying option map (set input stream mapping) with argument 0:2.
Applying option map (set input stream mapping) with argument 0:3.
Applying option map (set input stream mapping) with argument 0:4.
Applying option map (set input stream mapping) with argument 0:5.
Applying option map (set input stream mapping) with argument 0:6.
Applying option map (set input stream mapping) with argument 0:7.
Applying option map (set input stream mapping) with argument 0:8.
Applying option map (set input stream mapping) with argument 0:9.
Applying option map (set input stream mapping) with argument 0:10.
Applying option map (set input stream mapping) with argument 0:11.
Applying option map (set input stream mapping) with argument 0:12.
Applying option map (set input stream mapping) with argument 0:13.
Applying option map (set input stream mapping) with argument 0:14.
Applying option map (set input stream mapping) with argument 0:15.
Applying option map (set input stream mapping) with argument 0:16.
Applying option map (set input stream mapping) with argument 0:17.
Applying option map (set input stream mapping) with argument 0:18.
Applying option c:s:0 (codec name) with argument copy.
Applying option c:s:1 (codec name) with argument copy.
Applying option c:s:2 (codec name) with argument copy.
Applying option c:s:3 (codec name) with argument copy.

Last message repeated 1 times

Applying option c:s:4 (codec name) with argument copy.
Applying option c:s:5 (codec name) with argument copy.
Applying option c:s:6 (codec name) with argument copy.
Applying option c:s:7 (codec name) with argument copy.
Applying option c:s:8 (codec name) with argument copy.
Applying option c:s:9 (codec name) with argument copy.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: /home/obencoder/archivos_prueba/FILE_6_TICKET_3514_Output_stream_SD_mpeg2video_1_video_8_audios_1_subs_dvbsub_stream10.ts.
Successfully opened the file.
[mpegts @ 0x2973620] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to '/home/obencoder/archivos_prueba/FILE_6_TICKET_3514_Output_stream_SD_mpeg2video_1_video_8_audios_1_subs_dvbsub_stream10.ts':

Metadata:

encoder : Lavf55.35.101
Stream #0:0, 0, 1/90000: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 1/25, q=2-31, max. 3485 kb/s, 25 fps, 90k tbn, 25 tbc
Stream #0:1(eng), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 186 kb/s
Stream #0:2(dut), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:3(cze), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:4(hun), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 62 kb/s
Stream #0:5(tur), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:6(rus), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:7(heb), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 77 kb/s
Stream #0:8(bul), 0, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 248 kb/s
Stream #0:9(spa), 0, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:10(dut,nor,dan,swe,por), 0, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:11(dut), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:12(nor), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:13(gre), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:14(por), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:15(slv), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:16(heb), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:17(hrv), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:18(srp), 0, 1/90000: 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:3 -> #0:3 (copy)
Stream #0:4 -> #0:4 (copy)
Stream #0:5 -> #0:5 (copy)
Stream #0:6 -> #0:6 (copy)
Stream #0:7 -> #0:7 (copy)
Stream #0:8 -> #0:8 (copy)
Stream #0:9 -> #0:9 (copy)
Stream #0:10 -> #0:10 (copy)
Stream #0:11 -> #0:11 (copy)
Stream #0:12 -> #0:12 (copy)
Stream #0:13 -> #0:13 (copy)
Stream #0:14 -> #0:14 (copy)
Stream #0:15 -> #0:15 (copy)
Stream #0:16 -> #0:16 (copy)
Stream #0:17 -> #0:17 (copy)
Stream #0:18 -> #0:18 (copy)

Press [q] to stop, ? for help
[mpegts @ 0x2973620] Application provided invalid, non monotonically increasing dts to muxer in stream 10: 44818 >= 44818
av_interleaved_write_frame(): Invalid argument
No more output streams to write to, finishing.
frame= 8 fps=0.0 q=-1.0 Lsize= 250kB time=00:00:00.75 bitrate=2713.5kbits/s
video:161kB audio:42kB subtitle:13kB other streams:0kB global headers:0kB muxing overhead: 15.942634%
Input file #0 (/home/obencoder/archivos_prueba/FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts):

Input stream #0:0 (video): 10 packets read (178684 bytes);
Input stream #0:1 (audio): 15 packets read (8640 bytes);
Input stream #0:2 (audio): 20 packets read (4800 bytes);
Input stream #0:3 (audio): 15 packets read (3600 bytes);
Input stream #0:4 (audio): 20 packets read (3840 bytes);
Input stream #0:5 (audio): 15 packets read (3600 bytes);
Input stream #0:6 (audio): 15 packets read (3600 bytes);
Input stream #0:7 (audio): 15 packets read (3600 bytes);
Input stream #0:8 (audio): 15 packets read (11520 bytes);
Input stream #0:9 (subtitle): 26 packets read (8398 bytes);
Input stream #0:10 (subtitle): 14 packets read (4522 bytes);
Input stream #0:11 (subtitle): 0 packets read (0 bytes);
Input stream #0:12 (subtitle): 0 packets read (0 bytes);
Input stream #0:13 (subtitle): 0 packets read (0 bytes);
Input stream #0:14 (subtitle): 0 packets read (0 bytes);
Input stream #0:15 (subtitle): 0 packets read (0 bytes);
Input stream #0:16 (subtitle): 0 packets read (0 bytes);
Input stream #0:17 (subtitle): 0 packets read (0 bytes);
Input stream #0:18 (subtitle): 0 packets read (0 bytes);
Total: 180 packets (234804 bytes) demuxed

Output file #0 (/home/obencoder/archivos_prueba/FILE_6_TICKET_3514_Output_stream_SD_mpeg2video_1_video_8_audios_1_subs_dvbsub_stream10.ts):

Output stream #0:0 (video): 8 packets muxed (164565 bytes);
Output stream #0:1 (audio): 15 packets muxed (8640 bytes);
Output stream #0:2 (audio): 20 packets muxed (4800 bytes);
Output stream #0:3 (audio): 15 packets muxed (3600 bytes);
Output stream #0:4 (audio): 20 packets muxed (3840 bytes);
Output stream #0:5 (audio): 15 packets muxed (3600 bytes);
Output stream #0:6 (audio): 15 packets muxed (3600 bytes);
Output stream #0:7 (audio): 15 packets muxed (3600 bytes);
Output stream #0:8 (audio): 15 packets muxed (11520 bytes);
Output stream #0:9 (subtitle): 26 packets muxed (8398 bytes);
Output stream #0:10 (subtitle): 14 packets muxed (4522 bytes);
Output stream #0:11 (subtitle): 0 packets muxed (0 bytes);
Output stream #0:12 (subtitle): 0 packets muxed (0 bytes);
Output stream #0:13 (subtitle): 0 packets muxed (0 bytes);
Output stream #0:14 (subtitle): 0 packets muxed (0 bytes);
Output stream #0:15 (subtitle): 0 packets muxed (0 bytes);
Output stream #0:16 (subtitle): 0 packets muxed (0 bytes);
Output stream #0:17 (subtitle): 0 packets muxed (0 bytes);
Output stream #0:18 (subtitle): 0 packets muxed (0 bytes);
Total: 178 packets (220685 bytes) muxed

0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x27d2fa0] Statistics: 0 seeks, 70 writeouts
[AVIOContext @ 0x27b6520] Statistics: 4608144 bytes read, 3 seeks

comment:4 in reply to: ↑ 3 Changed 6 years ago by cehoyos

Replying to dalongra:

But I don't manage to get subtitle Stream #0:10[0xd4a](dut,nor,dan,swe,por) of FILE_1 in the output (-map 0 option crashes).

Don't you agree that this is an important issue that should be reported?
Or did you report the crash and I missed it?

comment:5 Changed 6 years ago by dalongra

You are right: This is a different issue not reported at first. That's why I asked about opening new ticket.

Freezing issue solved when using file input. It seems to be caused by processing UDP multicast.

Should I open new ticket for "I don't manage to get subtitle Stream #0:10[0xd4a](dut,nor,dan,swe,por) (-map 0 option crashes)" Or can we continue in this thread?

Please find below complete command used. Regards.

ffmpeg -v 9 -loglevel 99 -fix_sub_duration -y -re -i "$path_in/FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts" -acodec copy -vcodec copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 -map 0:6 -map 0:7 -map 0:8 -map 0:9 -map 0:10 -map 0:11 -map 0:12 -map 0:13 -map 0:14 -map 0:15 -map 0:16 -map 0:17 -map 0:18 -c:s:0 copy -c:s:1 copy -c:s:2 copy -c:s:3 copy -c:s:3 copy -c:s:4 copy -c:s:5 copy -c:s:6 copy -c:s:7 copy -c:s:8 copy -c:s:9 copy -f mpegts $path_out/FILE_6_TICKET_3514_Output_stream_SD_mpeg2video_1_video_8_audios_1_subs_copying_stream10.ts

comment:6 follow-up: Changed 6 years ago by cehoyos

You write above "-map 0 crashes": Please provide gdb output for the crash.
(Crashes are always important.)

comment:7 in reply to: ↑ 6 Changed 6 years ago by dalongra

Replying to cehoyos:

You write above "-map 0 crashes": Please provide gdb output for the crash.
(Crashes are always important.)

It may be not a "crash" technically speaking (I don't get a "segmentation fault" or any other message from O.S) but ffmpeg stops working withing a few seconds after launching, showing error:

[mpegts @ 0x2631a60] Application provided invalid, non monotonically increasing dts to muxer in stream 10: 44818 >= 44818
av_interleaved_write_frame(): Invalid argument

The error is easy to reproduce using File1 uploaded to the FTP. Just copy all the codecs, video, audio and subs and use -map 0. Please see complete command below:

ffmpeg -v 9 -loglevel 99 -fix_sub_duration -y -re -i "$path_in/FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts" -acodec copy -vcodec copy -scodec copy -map 0 -f mpegts $path_out/FILE_7_TICKET_3514_Output_stream_SD_mpeg2video_map0.ts

I found Stream #0:10[0xd4a](dut,nor,dan,swe,por) to be causing the error, because I get the same error if I select only Stream #0:10. Everything OK with the rest of streams.

Do you still need GDB output?

Regards.

comment:8 Changed 6 years ago by cehoyos

  • Description modified (diff)
  • Keywords av_interleaved_write_frame added
  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from Image freezes when copying DVB subtitles from input to the output TS to Remuxing a dvb teletext stream fails

Remuxing the second teletext streams fails (remuxing video and audio and dvbsub and the first teletext stream works fine afaict):

$ ffmpeg -i FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts -vcodec copy -scodec copy -map 0:0 -map 0:10 out.ts
ffmpeg version N-62025-g909757f Copyright (c) 2000-2014 the FFmpeg developers
  built on Apr  1 2014 22:56:40 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 71.100 / 52. 71.100
  libavcodec     55. 56.107 / 55. 56.107
  libavformat    55. 36.100 / 55. 36.100
  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 @ 0x19b6c40] Invalid frame dimensions 0x0.
    Last message repeated 1 times
[NULL @ 0x19d88e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x19d9400] start time is not set in estimate_timings_from_pts
[NULL @ 0x19d9fc0] start time is not set in estimate_timings_from_pts
[NULL @ 0x19daae0] start time is not set in estimate_timings_from_pts
[NULL @ 0x19db700] start time is not set in estimate_timings_from_pts
[NULL @ 0x19dc220] start time is not set in estimate_timings_from_pts
[NULL @ 0x19dcde0] start time is not set in estimate_timings_from_pts
[NULL @ 0x19dd900] start time is not set in estimate_timings_from_pts
[mpegts @ 0x19b29c0] PES packet size mismatch
    Last message repeated 7 times
Input #0, mpegts, from 'FILE_1_TICKET_3514_Input_stream_SD_mpeg2video_1_video_8_audios_10_subs.ts':
  Duration: 00:00:33.72, start: 86484.364989, bitrate: 19873 kb/s
  Program 1002
    Metadata:
      service_name    : Nat Geo Wild
      service_provider: Overon
    Stream #0:0[0xc81]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 3485 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0xc8a](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 186 kb/s
    Stream #0:2[0xc8c](dut): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
    Stream #0:3[0xc92](cze): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
    Stream #0:4[0xc94](hun): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 62 kb/s
    Stream #0:5[0xc95](tur): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
    Stream #0:6[0xc9a](rus): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
    Stream #0:7[0xca0](heb): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 77 kb/s
    Stream #0:8[0xca7](bul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 248 kb/s
    Stream #0:9[0xd49](spa): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:10[0xd4a](dut,nor,dan,swe,por): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:11[0xd54](dut): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:12[0xd57](nor): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:13[0xd5e](gre): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:14[0xd5f](por): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:15[0xd70](slv): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:16[0xd71](heb): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:17[0xd72](hrv): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:18[0xd73](srp): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Output #0, mpegts, to 'out.ts':
  Metadata:
    encoder         : Lavf55.36.100
    Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, max. 3485 kb/s, 25 fps, 90k tbn, 25 tbc
    Stream #0:1(dut,nor,dan,swe,por): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:10 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x1b76c80] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 44818 >= 44818
av_interleaved_write_frame(): Invalid argument
frame=    8 fps=0.0 q=-1.0 Lsize=     182kB time=00:00:00.72 bitrate=2056.9kbits/s
video:161kB audio:0kB subtitle:4kB other streams:0kB global headers:0kB muxing overhead: 10.184698%

comment:9 Changed 5 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.