Ticket #2161 (new defect)
Only one of two dvbsub streams decoded
| Reported by: | cehoyos | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | undetermined |
| Version: | git-master | Keywords: | videolan mpegts dvbsub |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
(videolan ticket 8054)
A vlc user provided a sample that contains two dvbsub subtitle streams that can be shown with mplayer -demuxer mpegts:
$ mplayer mentalist-1min-singleprogram.ts -demuxer mpegts -sid 0x96
$ mplayer mentalist-1min-singleprogram.ts -demuxer mpegts -sid 0x97
FFmpeg only decodes the first subtitle, the following command line produces a file with subtitles that can be shown with FFmpeg and MPlayer:
$ ffmpeg -i mentalist-1min-singleprogram.ts -qscale 2 -mbd 2 -map 0:0 -map 0:2 -map 0:5 -scodec dvdsub out.mpg
But the next command line produces an output file that shows no subtitles:
$ ffmpeg -i mentalist-1min-singleprogram.ts -qscale 2 -mbd 2 -map 0:0 -map 0:2 -map 0:6 -scodec dvdsub out.mpg
ffmpeg version N-49059-gbc15fcb Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 20 2013 18:01:12 with gcc 4.7 (SUSE Linux)
configuration: --enable-gpl --disable-indev=jack
libavutil 52. 15.100 / 52. 15.100
libavcodec 54. 89.100 / 54. 89.100
libavformat 54. 61.101 / 54. 61.101
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.101 / 3. 32.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[mpeg2video @ 0x26bcea0] 0x0 is invalid
Last message repeated 7 times
[mpegts @ 0x2699060] max_analyze_duration 5000000 reached at 5016000 microseconds
[mpegts @ 0x2699060] PES packet size mismatch
Last message repeated 3 times
Input #0, mpegts, from 'mentalist-1min-singleprogram.ts':
Duration: 00:01:03.27, start: 74506.534033, bitrate: 2219 kb/s
Program 1537
Stream #0:0[0x78]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x82](fra): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:2[0x83](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:3[0x85](qad): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:4[0x8c](fra): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:5[0x96](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream #0:6[0x97](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Program 1538
Program 1539
Program 1540
Program 1541
Program 1542
Program 1543
Program 1790
Program 1791
Program 1792
Please use -q:a or -q:v, -qscale is ambiguous
[mpeg @ 0x269b8e0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out.mpg':
Metadata:
encoder : Lavf54.61.101
Stream #0:0: Video: mpeg1video (hq), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream #0:1(eng): Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s
Stream #0:2(eng): Subtitle: dvd_subtitle
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> mpeg1video)
Stream #0:2 -> #0:1 (mp2 -> mp2)
Stream #0:6 -> #0:2 (dvbsub -> dvdsub)
Press [q] to stop, [?] for help
Warning MVs not available size= 846kB time=00:00:25.08 bitrate= 276.3kbits/s dup=23 drop=0
[mpeg2video @ 0x26bcea0] concealing 15 DC, 15 AC, 15 MV errors in I frame
PES packet size mismatch0 size= 5464kB time=00:00:49.72 bitrate= 900.3kbits/s dup=23 drop=0
[mpeg2video @ 0x26bcea0] ac-tex damaged at 1 18
[mpeg2video @ 0x26bcea0] Warning MVs not available
[mpeg2video @ 0x26bcea0] concealing 810 DC, 810 AC, 810 MV errors in I frame
[mp2 @ 0x26c1540] incomplete frame
Error while decoding stream #0:2: Invalid data found when processing input
frame= 1535 fps=616 q=2.0 Lsize= 11394kB time=00:01:01.36 bitrate=1521.2kbits/s dup=25 drop=0
video:10370kB audio:946kB subtitle:0 global headers:0kB muxing overhead 0.683155%
$ ffmpeg -i out.mpg
ffmpeg version N-49059-gbc15fcb Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 20 2013 18:01:12 with gcc 4.7 (SUSE Linux)
configuration: --enable-gpl --disable-indev=jack
libavutil 52. 15.100 / 52. 15.100
libavcodec 54. 89.100 / 54. 89.100
libavformat 54. 61.101 / 54. 61.101
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.101 / 3. 32.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[mpeg @ 0x1e83460] max_analyze_duration 5000000 reached at 5000000 microseconds
Input #0, mpeg, from 'out.mpg':
Duration: 00:01:01.33, start: 0.529978, bitrate: 1521 kb/s
Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p, 720x576 [SAR 64:45 DAR 16:9], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 128 kb/s
At least one output file must be specified
Since mplayer -demuxer lavf -sid 2 shows no subtitles (-sid 1 works fine), this may be a demuxer issue.
Change History
comment:2 Changed 4 months ago by Cigaes
mplayer -demuxer lavf shows a lot of video artifacts too, while mplayer -demuxer mpegts does not, so there is definitely something fishy with the demuxer.
comment:3 Changed 4 months ago by cehoyos
I see the same artefacts at 74538 with mplayer -demuxer mpegts and mplayer -demuxer lavf - which other artefacts do you see?
comment:4 Changed 4 months ago by Cigaes
With -demuxer lavf, I see nothing but artifacts. The first line of macroblocks keeps blinking, and that is only the least of them. All parts with motion are blured as if error concealment happens. I am surprised you do not see them.
comment:5 Changed 4 months ago by cehoyos
No additional artefacts here with -demuxer lavf (you are not on vdpau, are you?)
comment:6 Changed 4 months ago by Cigaes
I was about to ask the same question; no, pure [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2), and I get a lot of artifacts. If I add the following line in vd_ffmpeg.c after the call to avcodec_decode_video2:
printf("decode packet size %d/%d\n", ret, pkt.size);
I get very different results depending on whether I use -demuxer lavf or -demuxer mpegts: 4553/4553, 4185/4185, 14116/14116, vs. 38035/38035, 2345/2345, 33803/33803, etc.
OTOH, the video decodes fines with avplay, so maybe this is a problem in MPlayer's use of the demuxer and here would not be the place to talk about it, but this whole thing is highly confusing.
comment:7 Changed 4 months ago by cehoyos
Still works fine here with mplayer -demuxer lavf - could you confirm which MPlayer version you are using and that you are calling it with "-noconfig all"?
comment:8 Changed 4 months ago by Cigaes
It is a fresh build of the SVN head + ffmpeg Git head. But I forgot the -noconfig all, I do not have anything in it that usually causes problems. But in this particular case -vf pp=hb:c/vb:c seems to be getting completely mad.
This is one problem solved, although I am still curious about the different packet sizes between the demuxers.



Sample uploaded to http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2161/