[FFmpeg-trac] #3668(undetermined:new): Issues with subtitles removal

FFmpeg trac at avcodec.org
Fri May 23 15:34:43 CEST 2014


#3668: Issues with subtitles removal
-------------------------------------+-------------------------------------
             Reporter:  inkubux      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:  subtitles    |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 on 2 different machines i'm running
 ffmpeg version N-62765-g8120668 and
 ffmpeg version 2.2.1

 I have a file with streams specified like this:

 {{{
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
 smpte170m), 720x480 [SAR 853:720 DAR 853:480], 1525 kb/s, 29.97 fps, 29.97
 tbr, 90k tbn, 180k tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
 fltp, 296 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
     Stream #0:2(eng): Subtitle: mov_text (text / 0x74786574)
     Metadata:
       handler_name    : SubtitleHandler
 }}}

 I tried removing the subtitles with 3 different ways:
 {{{
 ffmpeg -i input.m4v -c copy -sn -f mp4 out.m4v

 ffmpeg -i input.m4v -c copy -map 0 -map -0:s -f mp4 out.m4v

 ffmpeg -i input.m4v -map 0:0 -c:v copy -map 0:1 -c:a:0 copy -f mp4 out.m4v
 }}}

 None of them works the subtitle is always in out.mp4.

 I tried with an older version bundled in the mp4tools:

 ffmpeg version 2.0.2-tessus

 And with this version the subtitle is removed with the 3 different ways.


 here is the full output of the command #1:

 {{{
 ffmpeg version 2.2.1 Copyright (c) 2000-2014 the FFmpeg developers
   built on Apr 22 2014 08:59:59 with Apple LLVM version 5.1
 (clang-503.0.40) (based on LLVM 3.4svn)
   configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.1 --enable-shared
 --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
 --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang
 --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-
 libmp3lame --enable-libxvid --enable-libfreetype --enable-libtheora
 --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-
 amrnb --enable-libopencore-amrwb --enable-libvo-aacenc --enable-libass
 --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-
 libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --extra-
 cflags='-I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 '
   libavutil      52. 66.100 / 52. 66.100
   libavcodec     55. 52.102 / 55. 52.102
   libavformat    55. 33.100 / 55. 33.100
   libavdevice    55. 10.100 / 55. 10.100
   libavfilter     4.  2.100 /  4.  2.100
   libavresample   1.  2.  0 /  1.  2.  0
   libswscale      2.  5.102 /  2.  5.102
   libswresample   0. 18.100 /  0. 18.100
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/Volumes/Users_Data/fbelang1/Downloads/Focus T25/tmp/Focus T25 - Disc 00
 - Alpha - Ab Intervals.m4v':
   Metadata:
     major_brand     : M4V
     minor_version   : 512
     compatible_brands: isomiso2avc1
     title           : Ab Intervals
     encoder         : Lavf55.37.101
   Duration: 00:29:30.87, start: 0.000000, bitrate: 1830 kb/s
     Chapter #0.0: start 0.000000, end 21.455000
     Metadata:
       title           : Chapter 2
     Chapter #0.1: start 21.455000, end 148.548000
     Metadata:
       title           : Chapter 3
     Chapter #0.2: start 148.548000, end 217.751000
     Metadata:
       title           : Chapter 4
     Chapter #0.3: start 217.751000, end 343.310000
     Metadata:
       title           : Chapter 5
     Chapter #0.4: start 343.310000, end 517.884000
     Metadata:
       title           : Chapter 6
     Chapter #0.5: start 517.884000, end 701.701000
     Metadata:
       title           : Chapter 7
     Chapter #0.6: start 701.701000, end 879.612000
     Metadata:
       title           : Chapter 8
     Chapter #0.7: start 879.612000, end 1061.694000
     Metadata:
       title           : Chapter 9
     Chapter #0.8: start 1061.694000, end 1243.142000
     Metadata:
       title           : Chapter 10
     Chapter #0.9: start 1243.142000, end 1430.763000
     Metadata:
       title           : Chapter 11
     Chapter #0.10: start 1430.763000, end 1550.516000
     Metadata:
       title           : Chapter 12
     Chapter #0.11: start 1550.516000, end 1770.869000
     Metadata:
       title           : Chapter 13
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
 smpte170m), 720x480 [SAR 853:720 DAR 853:480], 1525 kb/s, 29.97 fps, 29.97
 tbr, 90k tbn, 180k tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
 fltp, 296 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
     Stream #0:2(eng): Subtitle: mov_text (text / 0x74786574)
     Metadata:
       handler_name    : SubtitleHandler
 File 'output.mp4' already exists. Overwrite ? [y/N] y
 Output #0, mp4, to 'output.mp4':
   Metadata:
     major_brand     : M4V
     minor_version   : 512
     compatible_brands: isomiso2avc1
     title           : Ab Intervals
     encoder         : Lavf55.33.100
     Chapter #0.0: start 0.000000, end 21.455000
     Metadata:
       title           : Chapter 2
     Chapter #0.1: start 21.455000, end 148.548000
     Metadata:
       title           : Chapter 3
     Chapter #0.2: start 148.548000, end 217.751000
     Metadata:
       title           : Chapter 4
     Chapter #0.3: start 217.751000, end 343.310000
     Metadata:
       title           : Chapter 5
     Chapter #0.4: start 343.310000, end 517.884000
     Metadata:
       title           : Chapter 6
     Chapter #0.5: start 517.884000, end 701.701000
     Metadata:
       title           : Chapter 7
     Chapter #0.6: start 701.701000, end 879.612000
     Metadata:
       title           : Chapter 8
     Chapter #0.7: start 879.612000, end 1061.694000
     Metadata:
       title           : Chapter 9
     Chapter #0.8: start 1061.694000, end 1243.142000
     Metadata:
       title           : Chapter 10
     Chapter #0.9: start 1243.142000, end 1430.763000
     Metadata:
       title           : Chapter 11
     Chapter #0.10: start 1430.763000, end 1550.516000
     Metadata:
       title           : Chapter 12
     Chapter #0.11: start 1550.516000, end 1770.869000
     Metadata:
       title           : Chapter 13
     Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
 720x480 [SAR 853:720 DAR 853:480], q=2-31, 1525 kb/s, 29.97 fps, 90k tbn,
 90k tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz,
 stereo, 296 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 frame=53073 fps=2090 q=-1.0 Lsize=  395638kB time=00:29:30.85
 bitrate=1830.2kbits/s
 video:329674kB audio:64068kB subtitle:0 data:0 global headers:0kB muxing
 overhead 0.481462%
 }}}

 here is the probe of the output:


 {{{
 ffprobe version 2.2.1 Copyright (c) 2007-2014 the FFmpeg developers
   built on Apr 22 2014 08:59:59 with Apple LLVM version 5.1
 (clang-503.0.40) (based on LLVM 3.4svn)
   configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.1 --enable-shared
 --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
 --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang
 --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-
 libmp3lame --enable-libxvid --enable-libfreetype --enable-libtheora
 --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-
 amrnb --enable-libopencore-amrwb --enable-libvo-aacenc --enable-libass
 --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-
 libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --extra-
 cflags='-I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 '
   libavutil      52. 66.100 / 52. 66.100
   libavcodec     55. 52.102 / 55. 52.102
   libavformat    55. 33.100 / 55. 33.100
   libavdevice    55. 10.100 / 55. 10.100
   libavfilter     4.  2.100 /  4.  2.100
   libavresample   1.  2.  0 /  1.  2.  0
   libswscale      2.  5.102 /  2.  5.102
   libswresample   0. 18.100 /  0. 18.100
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     title           : Ab Intervals
     encoder         : Lavf55.33.100
   Duration: 00:29:30.87, start: 0.000000, bitrate: 1830 kb/s
     Chapter #0.0: start 0.000000, end 21.455000
     Metadata:
       title           : Chapter 2
     Chapter #0.1: start 21.455000, end 148.548000
     Metadata:
       title           : Chapter 3
     Chapter #0.2: start 148.548000, end 217.751000
     Metadata:
       title           : Chapter 4
     Chapter #0.3: start 217.751000, end 343.310000
     Metadata:
       title           : Chapter 5
     Chapter #0.4: start 343.310000, end 517.884000
     Metadata:
       title           : Chapter 6
     Chapter #0.5: start 517.884000, end 701.701000
     Metadata:
       title           : Chapter 7
     Chapter #0.6: start 701.701000, end 879.612000
     Metadata:
       title           : Chapter 8
     Chapter #0.7: start 879.612000, end 1061.694000
     Metadata:
       title           : Chapter 9
     Chapter #0.8: start 1061.694000, end 1243.142000
     Metadata:
       title           : Chapter 10
     Chapter #0.9: start 1243.142000, end 1430.763000
     Metadata:
       title           : Chapter 11
     Chapter #0.10: start 1430.763000, end 1550.516000
     Metadata:
       title           : Chapter 12
     Chapter #0.11: start 1550.516000, end 1770.869000
     Metadata:
       title           : Chapter 13
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
 smpte170m), 720x480 [SAR 853:720 DAR 853:480], 1525 kb/s, 29.97 fps, 29.97
 tbr, 90k tbn, 180k tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
 fltp, 296 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
     Stream #0:2(eng): Subtitle: mov_text (text / 0x74786574)
     Metadata:
       handler_name    : SubtitleHandler
 }}}

 As you see the stream mapping is done only with 0:0 and 0:1 , but the
 stream 0:2 (which is the subtitles) is still in the output.


 Thanks

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


More information about the FFmpeg-trac mailing list