Opened 10 years ago

Closed 10 years ago

#3768 closed defect (fixed)

dvbsub to overlay get corrupt output

Reported by: Anshul Owned by:
Priority: important Component: ffmpeg
Version: git-master Keywords: dvbsub
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

linux-6jho:~/work/anshul/ffmpeg> ./ffmpeg -i ~/test_videos/dvbsubtest.ts -filter_complex "[0:v][0:s]overlay[v]" -map [v] -map 0:a -acodec copy -vcodec libx264 ~/test_videos/test.tsffmpeg version N-41104-g6d2df3c Copyright (c) 2000-2014 the FFmpeg developers

built on Jul 1 2014 13:24:08 with gcc 4.7 (SUSE Linux)
configuration: --disable-optimizations --enable-libx264 --enable-gpl --enable-memalign-hack
libavutil 52. 90.101 / 52. 90.101
libavcodec 55. 68.100 / 55. 68.100
libavformat 55. 44.100 / 55. 44.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 9.100 / 4. 9.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100

[NULL @ 0xb0fe7a0] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 0xb0f9520] PES packet size mismatch
Input #0, mpegts, from '/home/a141982112/test_videos/dvbsubtest.ts':

Duration: 00:00:34.64, start: 79677.098467, bitrate: 4842 kb/s
Program 1

Stream #0:0[0x1901](eng): Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x19a1](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 246 kb/s
Stream #0:2[0x19b1](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)

[mpegts @ 0xb0f9520] sub2video: using 720x576 canvas
File '/home/a141982112/test_videos/test.ts' already exists. Overwrite ? [y/N] y
[libx264 @ 0xb11e500] using SAR=64/45
[libx264 @ 0xb11e500] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0xb11e500] profile High, level 3.0
[mpegts @ 0xb11d760] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.

Last message repeated 1 times

Output #0, mpegts, to '/home/a141982112/test_videos/test.ts':

Metadata:

encoder : Lavf55.44.100
Stream #0:0: Video: h264 (libx264), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc (default)
Metadata:

encoder : Lavc55.68.100 libx264

Stream #0:1(eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, 246 kb/s

Stream mapping:

Stream #0:0 (mpeg2video) -> overlay:main
Stream #0:2 (dvbsub) -> overlay:overlay
overlay -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (copy)

Change History (5)

comment:1 by Anshul, 10 years ago

when compute_edt is off, this problem does not persist

comment:2 by Cigaes, 10 years ago

I had no time to check yet, but my gess would be that compute_edt introduces a huge latency: the subtitle frame is returned when the end marker is reached, and during that time, video were still decoding, accumulating in overlay's input queue.

comment:3 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedffmpeg
Keywords: ffmpeg removed
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Regression since 7e6cf364

comment:4 by Søren Hansen, 10 years ago

I am experiencing a simular problem after compute_edt was introduced in this commit http://git.videolan.org/?p=ffmpeg.git;a=commit;h=ca2f59e12108c1754d57a5614f6e38253268b916.

My dvb subtitles are either not shown, or only shown for about 1 frame. My command line is the follow:

ffmpeg.exe -y -i sample.ts -filter_complex "crop=w=1280:h=718:x=0:y=2 [vid];[vid]scale=720:404 [vid2]; [0:s:2]crop=w=720:h=576:x=0:y=0 [sub];[sub]scale=720:404 [sub2];[vid2] [sub2] overlay" -vcodec libx264 -x264opts -preset slow -level 3.1 -crf 21 -an -threads 0 -r 25 sample.mp4

The same command line works fine with a ffmpeg version from before the commit (eg. version 2.2.3).

I have uploaded a sample .ts file so its possible to reproduce here http://www.datafilehost.com/d/0832a220

And an output sample of the correct .mp4 file produced by an old ffmpeg version here http://www.datafilehost.com/d/ba2eb673

The .ts file has the following properties, im using the subtitles in stream 0:5 in my command line:

ffmpeg.exe -i sample.ts
ffmpeg version N-65126-gdc315cd Copyright (c) 2000-2014 the FFmpeg developers

built on Jul 30 2014 22:26:17 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av

isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis

--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-

libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib

libavutil 52. 94.100 / 52. 94.100
libavcodec 55. 71.100 / 55. 71.100
libavformat 55. 50.100 / 55. 50.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.102 / 4. 11.102
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100

[mp3 @ 02b378a0] Header missing

Last message repeated 3 times

[h264 @ 02b36f80] reference picture missing during reorder
[h264 @ 02b36f80] Missing reference picture, default is 65522
[h264 @ 02b36f80] mmco: unref short failure
[mp3 @ 02b378a0] Header missing

Last message repeated 16 times

Input #0, mpegts, from 'sample.ts':

Duration: 00:00:11.17, start: 0.085178, bitrate: 5000 kb/s
Program 1

Stream #0:0[0x907]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv,

bt709), 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc

Stream #0:1[0x911](dan): Audio: mp3 ([17][0][0][0] / 0x0011), 44100 Hz, ster

eo, s16p, 384 kb/s

Stream #0:2[0x915](dan): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz,

5.1, fltp

Stream #0:3[0x7ef](dan): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:4[0x91f](dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:5[0x920](dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hea

ring impaired)

Last a quick question. Is it possible to manually disable compute_edt using the command line, I can't seem to find it as an option for the dvbsub decoder.

comment:5 by Carl Eugen Hoyos, 10 years ago

Resolution: fixed
Status: openclosed

Fixed / worked around by Michael in b01d2a55

Note: See TracTickets for help on using tickets.