[FFmpeg-trac] #2741(FFmpeg:new): How to overlay Teletext subtitles in ffmpeg?

FFmpeg trac at avcodec.org
Tue Jul 2 20:48:25 CEST 2013


#2741: How to overlay Teletext subtitles in ffmpeg?
-------------------------------------+-------------------------------------
             Reporter:               |                     Type:  defect
  wonmanfactory                      |                 Priority:  normal
               Status:  new          |                  Version:
            Component:  FFmpeg       |  unspecified
             Keywords:               |               Blocked By:
  dvb_subtitle, wtv, teletext        |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 How to reproduce: an mkv file with subtitles / a video overlaid with
 subtitles
 {{{
 % ffmpeg -i input.wtv -map 0 -map -0:3 -vcodec libx264 -acodec libmp3lame
 -scodec copy output.mkv
 }}}
 or
 {{{
 % ffmpeg -i input.wtv -filter_complex "[0:v][0:s]overlay[v]" -map [v] -map
 0:a output.mkv

 ffmpeg version N-54082-g96b33dd
 built on Jun 17 2013 02:10:21 with gcc 4.7.3
 }}}
 The first command get aborted. The error return is
 {{{
 ffmpeg version N-54082-g96b33dd Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jun 17 2013 02:10:21 with gcc 4.7.3 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
 librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
 --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-
 libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      52. 37.101 / 52. 37.101
   libavcodec     55. 16.100 / 55. 16.100
   libavformat    55.  8.103 / 55.  8.103
   libavdevice    55.  2.100 / 55.  2.100
   libavfilter     3. 77.101 /  3. 77.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 [wtv @ 000000000249b380] truncated file
     Last message repeated 3 times
 [mpeg2video @ 000000000263f620] Invalid frame dimensions 0x0.
     Last message repeated 26 times
 [wtv @ 000000000249b380] max_analyze_duration 5000000 reached at 5016000
 microseconds
 Input #0, wtv, from '16 and Pregnant_Viva_2013_06_13_20_00_00.wtv':
   Metadata:
     WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
     WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
     Title           : 16 and Pregnant
     WM/SubTitleDescription: Reality series following prospective teenage
 parents. An aspiring cage fighter strives to be an independent mother.
     genre           : Documentary;Reality TV
     WM/OriginalReleaseTime: 0
     WM/MediaCredits : ;;;
     service_provider: Viva
     service_name    : Viva
     WM/MediaOriginalChannel: 21
     WM/MediaOriginalChannelSubNumber: 0
     WM/MediaOriginalBroadcastDateTime: 2012-08-14T23:00:00Z
     WM/MediaOriginalRunTime: 35984082205
     WM/MediaIsStereo: false
     WM/MediaIsRepeat: true
     WM/MediaIsLive  : false
     WM/MediaIsTape  : false
     WM/MediaIsDelay : false
     WM/MediaIsSubtitled: false
     WM/MediaIsMovie : false
     WM/MediaIsPremiere: false
     WM/MediaIsFinale: false
     WM/MediaIsSAP   : false
     WM/MediaIsSport : false
     WM/Provider     : MediaCenterDefault
     WM/VideoClosedCaptioning: false
     WM/WMRVEncodeTime: 2013-06-13 19:00:01
     WM/WMRVSeriesUID: !GenericSeries!16 and Pregnant
     WM/WMRVServiceID: !Generated!45f9cf3444c149a4b3532ce756741d6a
     WM/WMRVProgramID: !MCProgram!46241323
     WM/WMRVRequestID: 0
     WM/WMRVScheduleItemID: 0
     WM/WMRVQuality  : 0
     WM/WMRVOriginalSoftPrePadding: 300
     WM/WMRVOriginalSoftPostPadding: 0
     WM/WMRVHardPrePadding: -300
     WM/WMRVHardPostPadding: 0
     WM/WMRVATSCContent: false
     WM/WMRVDTVContent: true
     WM/WMRVHDContent: false
     Duration        : 35994188749
     WM/WMRVEndTime  : 2013-06-13 20:00:01
     WM/WMRVBitrate  : 2.168572
     WM/WMRVKeepUntil: 0
     WM/WMRVActualSoftPrePadding: 298
     WM/WMRVActualSoftPostPadding: 1
     WM/WMRVContentProtected: false
     WM/WMRVContentProtectedPercent: 0
     WM/WMRVExpirationSpan: 9223372036854775807
     WM/WMRVInBandRatingSystem: 255
     WM/WMRVInBandRatingLevel: 255
     WM/WMRVInBandRatingAttributes: 0
     WM/WMRVWatched  : false
     WM/MediaThumbWidth: 352
     WM/MediaThumbHeight: 372
     WM/MediaThumbStride: 1056
     WM/MediaThumbRet: 0
     WM/MediaThumbRatingSystem: 255
     WM/MediaThumbRatingLevel: 255
     WM/MediaThumbRatingAttributes: 0
     WM/MediaThumbAspectRatioX: 16
     WM/MediaThumbAspectRatioY: 9
     WM/MediaThumbTimeStamp: 4644939472175984804
   Duration: 01:00:03.21, start: 1.449767, bitrate: 2166 kb/s
     Stream #0:0[0x69](eng): Subtitle: dvb_subtitle
     Stream #0:1[0x6a](eng): Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz,
 stereo, s16p, 256 kb/s
     Stream #0:2[0x6b]: Video: mpeg2video (Main), yuv420p, 544x576 [SAR
 32:17 DAR 16:9], 25 fps, 25 tbr, 10000k tbn, 50 tbc
     Stream #0:3[0x0]: Video: mjpeg, yuvj420p, 189x200 [SAR 96:96 DAR
 189:200], 90k tbr, 90k tbn, 90k tbc
     Metadata:
       title           : TV Thumbnail
 File 'test.mkv' already exists. Overwrite ? [y/N] [libx264 @
 000000000457f8e0] using SAR=32/17
 [libx264 @ 000000000457f8e0] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX
 [libx264 @ 000000000457f8e0] profile High, level 3.0
 [libx264 @ 000000000457f8e0] 264 - core 133 r2334 a3ac64b - H.264/MPEG-4
 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html -
 options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7
 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, matroska, to 'test.mkv':
   Metadata:
     WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
     WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
     Title           : 16 and Pregnant
     WM/SubTitleDescription: Reality series following prospective teenage
 parents. An aspiring cage fighter strives to be an independent mother.
     genre           : Documentary;Reality TV
     WM/OriginalReleaseTime: 0
     WM/MediaCredits : ;;;
     service_provider: Viva
     service_name    : Viva
     WM/MediaOriginalChannel: 21
     WM/MediaOriginalChannelSubNumber: 0
     WM/MediaOriginalBroadcastDateTime: 2012-08-14T23:00:00Z
     WM/MediaOriginalRunTime: 35984082205
     WM/MediaIsStereo: false
     WM/MediaIsRepeat: true
     WM/MediaIsLive  : false
     WM/MediaIsTape  : false
     WM/MediaIsDelay : false
     WM/MediaIsSubtitled: false
     WM/MediaIsMovie : false
     WM/MediaIsPremiere: false
     WM/MediaIsFinale: false
     WM/MediaIsSAP   : false
     WM/MediaIsSport : false
     WM/Provider     : MediaCenterDefault
     WM/VideoClosedCaptioning: false
     WM/WMRVEncodeTime: 2013-06-13 19:00:01
     WM/WMRVSeriesUID: !GenericSeries!16 and Pregnant
     WM/WMRVServiceID: !Generated!45f9cf3444c149a4b3532ce756741d6a
     WM/WMRVProgramID: !MCProgram!46241323
     WM/WMRVRequestID: 0
     WM/WMRVScheduleItemID: 0
     WM/WMRVQuality  : 0
     WM/WMRVOriginalSoftPrePadding: 300
     WM/WMRVOriginalSoftPostPadding: 0
     WM/WMRVHardPrePadding: -300
     WM/WMRVHardPostPadding: 0
     WM/WMRVATSCContent: false
     WM/WMRVDTVContent: true
     WM/WMRVHDContent: false
     Duration        : 35994188749
     WM/WMRVEndTime  : 2013-06-13 20:00:01
     WM/WMRVBitrate  : 2.168572
     WM/WMRVKeepUntil: 0
     WM/WMRVActualSoftPrePadding: 298
     WM/WMRVActualSoftPostPadding: 1
     WM/WMRVContentProtected: false
     WM/WMRVContentProtectedPercent: 0
     WM/WMRVExpirationSpan: 9223372036854775807
     WM/WMRVInBandRatingSystem: 255
     WM/WMRVInBandRatingLevel: 255
     WM/WMRVInBandRatingAttributes: 0
     WM/WMRVWatched  : false
     WM/MediaThumbWidth: 352
     WM/MediaThumbHeight: 372
     WM/MediaThumbStride: 1056
     WM/MediaThumbRet: 0
     WM/MediaThumbRatingSystem: 255
     WM/MediaThumbRatingLevel: 255
     WM/MediaThumbRatingAttributes: 0
     WM/MediaThumbAspectRatioX: 16
     WM/MediaThumbAspectRatioY: 9
     WM/MediaThumbTimeStamp: 4644939472175984804
     encoder         : Lavf55.8.103
     Stream #0:0(eng): Subtitle: dvb_subtitle
     Stream #0:1(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000
 Hz, stereo, s16p
     Stream #0:2: Video: h264 (libx264) (H264 / 0x34363248), yuv420p,
 544x576 [SAR 32:17 DAR 16:9], q=-1--1, 1k tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (mp2 -> libmp3lame)
   Stream #0:2 -> #0:2 (mpeg2video -> libx264)
 Press [q] to stop, [?] for help
 [matroska @ 000000000255fa60] Application provided invalid, non
 monotonically increasing dts to muxer in stream 0: 3532 >= 3461
 av_interleaved_write_frame(): Invalid argument
 }}}
 This program is made in America and broadcast on a British TV channel. I
 don't know what's happening inside. I have tried to translate many
 episodes of this program and get the same return and abort at different
 progress level.

 I don't know what "Application provided invalid, non montonically
 increasing av_interleaved_write_frame(): Invalid argument mean. What can I
 do with it?

 So I try to overlay the subtitles on my video using the command provided
 in the tutorial. I have never made a successful attempt once. The output
 file is a regular video file which does not contain any subtitles overlaid
 on it.

 During the translation, the return contains a yellow line.
 {{{
 sub2video: rectangle overflowing
 }}}
 How do I tackle this problem?

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2741>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list