[FFmpeg-trac] #1482(undetermined:new): FFMPEG fails to create a SRT file when extracting Subtitles

FFmpeg trac at avcodec.org
Mon Aug 27 18:01:22 CEST 2012


#1482: FFMPEG fails to create a SRT file when extracting Subtitles
-------------------------------------+-------------------------------------
             Reporter:  ramitbhalla  |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:  cc           |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by reimar):

 Concerning Test1.wtv: a fix for the DVB subs is sent.
 The other subtitle stream is indeed teletext, in 3/4ths processed form, as
 this hack shows:
 {{{
 Index: mpcommon.c
 ===================================================================
 --- mpcommon.c  (revision 35108)
 +++ mpcommon.c  (working copy)
 @@ -276,6 +276,15 @@
              if (type == 'd') {
                  if (d_dvdsub->demuxer->teletext) {
                      uint8_t *p = packet;
 +                            teletext_control(d_dvdsub->demuxer->teletext,
 +                                TV_VBI_CONTROL_RESET, NULL);
 +while (len >= 42) {
 +                            teletext_control(d_dvdsub->demuxer->teletext,
 +                                TV_VBI_CONTROL_DECODE_DVB, p);
 +                        p   += 42;
 +                        len -= 42;
 +}
 +return;
                      p++;
                      len--;
                      while (len >= 46) {Index: libmpcodecs/dec_teletext.c
 ===================================================================
 --- libmpcodecs/dec_teletext.c  (revision 35108)
 +++ libmpcodecs/dec_teletext.c  (working copy)
 @@ -1546,11 +1546,12 @@
      uint8_t data[42];

      mp_msg(MSGT_TELETEXT,MSGL_DBG3, "vbi: vbi_decode_dvb\n");
 +memcpy(data, buf, 42);

      /* Reverse bit order, skipping the first two bytes (field parity,
 line
         offset and framing code). */
 -    for (i = 0; i < sizeof(data); i++)
 -        data[i] = av_reverse[buf[2 + i]];
 +//    for (i = 0; i < sizeof(data); i++)
 +//        data[i] = av_reverse[buf[2 + i]];

      vbi_decode_line(priv, data);
      if (priv->cache_reset)
 @@ -1683,6 +1684,8 @@
      priv_vbi_t* priv=(priv_vbi_t*)p;
      tt_page* pgc;

 +if (cmd == TV_VBI_CONTROL_RESET)
 +        clear_cache(priv);
      if (!priv && cmd!=TV_VBI_CONTROL_START)
          return VBI_CONTROL_FALSE;
      if (!arg && cmd!=TV_VBI_CONTROL_STOP &&
 cmd!=TV_VBI_CONTROL_MARK_UNCHANGED)
 }}}
 However all those formats are just slightly off from the standard format
 that I just don't know what to do about it.
 Should the demuxer convert them? Should it be a different codec? Should
 there be some auto-detection?
 Some extradata to mark them?

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1482#comment:23>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list