[FFmpeg-trac] #5877(avformat:new): subrip always converted to mov_txt for mp4

FFmpeg trac at avcodec.org
Thu Oct 6 03:38:44 EEST 2016


#5877: subrip always converted to mov_txt for mp4
------------------------------------+--------------------------------------
             Reporter:  blacktrash  |                     Type:  defect
               Status:  new         |                 Priority:  important
            Component:  avformat    |                  Version:  git-master
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+--------------------------------------
 Summary of the bug:
 Subtitles are non-discardable when transcoding to mp4. `-sn` or mapping
 does not help.
 Variant of #5492.

 Setting to important. Similarly to #5492, I want ffmpeg to do what I tell
 it.
 To add insult to injury ffmpeg lies in its output by pretending to convert
 only video and audio.


 How to reproduce:
 {{{
 $ ffmpeg -i subrip-short.mkv -dn -sn -map 0:V -map 0:a test.mp4
 ffmpeg version N-81879-g3cc9d6d Copyright (c) 2000-2016 the FFmpeg
 developers
   built with Apple LLVM version 7.0.2 (clang-700.1.81)
   configuration: --enable-gpl --enable-nonfree --disable-ffserver
 --enable-shared --enable-libspeex --enable-libopus --enable-libfdk-aac
 --enable-libx265 --enable-libx264 --enable-libxvid --enable-libmp3lame
 --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libvidstab
 --extra-cflags=-I/sw/include --extra-libs=-L/sw/lib --enable-gnutls
   libavutil      55. 32.100 / 55. 32.100
   libavcodec     57. 60.101 / 57. 60.101
   libavformat    57. 51.102 / 57. 51.102
   libavdevice    57.  0.102 / 57.  0.102
   libavfilter     6. 63.100 /  6. 63.100
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  2.100 /  2.  2.100
   libpostproc    54.  0.100 / 54.  0.100
 Input #0, matroska,webm, from 'subrip-short.mkv':
   Metadata:
     ENCODER         : Lavf57.51.102
   Duration: 00:00:03.38, start: 0.000000, bitrate: 4970 kb/s
     Chapter #0:0: start 0.000000, end 3.000000
     Metadata:
       title           : Chapter 2
     Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x534, SAR 1:1 DAR
 640:267, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
     Metadata:
       DURATION        : 00:00:03.086000000
     Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
     Metadata:
       DURATION        : 00:00:03.006000000
     Stream #0:2(fre): Subtitle: subrip
     Metadata:
       DURATION        : 00:00:03.379000000
 [libx264 @ 0x7f879c0e5200] using SAR=1/1
 [libx264 @ 0x7f879c0e5200] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX
 [libx264 @ 0x7f879c0e5200] profile High, level 3.1
 [libx264 @ 0x7f879c0e5200] 264 - core 148 r2721 72d53ab - H.264/MPEG-4 AVC
 codec - Copyleft 2003-2016 - 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=12
 lookahead_threads=2 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=23
 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, mp4, to 'test.mp4':
   Metadata:
     encoder         : Lavf57.51.102
     Chapter #0:0: start 0.000000, end 3.000000
     Metadata:
       title           : Chapter 2
     Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
 yuv420p, 1280x534 [SAR 1:1 DAR 640:267], q=-1--1,23.98 fps, 24k tbn, 23.98
 tbc (default)
     Metadata:
       DURATION        : 00:00:03.086000000
       encoder         : Lavc57.60.101 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
     Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz,
 5.1(side), fltp, 341 kb/s
     Metadata:
       DURATION        : 00:00:03.006000000
       encoder         : Lavc57.60.101 aac
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
 Press [q] to stop, [?] for help
 frame=   74 fps= 58 q=-1.0 Lsize=     550kB time=00:00:03.01
 bitrate=1492.5kbits/s speed=2.37x
 video:420kB audio:125kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.725212%
 [libx264 @ 0x7f879c0e5200] frame I:3     Avg QP:20.25  size: 31525
 [libx264 @ 0x7f879c0e5200] frame P:21    Avg QP:23.35  size:  8062
 [libx264 @ 0x7f879c0e5200] frame B:50    Avg QP:25.10  size:  3317
 [libx264 @ 0x7f879c0e5200] consecutive B-frames:  6.8%  5.4% 12.2% 75.7%
 [libx264 @ 0x7f879c0e5200] mb I  I16..4: 19.3% 62.0% 18.7%
 [libx264 @ 0x7f879c0e5200] mb P  I16..4:  4.4% 10.7%  1.4%  P16..4: 32.3%
 6.8%  3.4%  0.0%  0.0%    skip:41.1%
 [libx264 @ 0x7f879c0e5200] mb B  I16..4:  0.7%  1.0%  0.1%  B16..8: 37.3%
 4.1%  0.6%  direct: 1.4%  skip:54.8%  L0:45.4% L1:49.7% BI: 4.8%
 [libx264 @ 0x7f879c0e5200] 8x8 transform intra:62.8% inter:87.5%
 [libx264 @ 0x7f879c0e5200] coded y,uvDC,uvAC intra: 55.2% 60.7% 22.3%
 inter: 9.1% 9.6% 0.1%
 [libx264 @ 0x7f879c0e5200] i16 v,h,dc,p: 46% 36%  3% 14%
 [libx264 @ 0x7f879c0e5200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 23% 14%  4%
 4%  5%  4%  5%  6%
 [libx264 @ 0x7f879c0e5200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 28% 10%  4%
 5%  6%  5%  4%  4%
 [libx264 @ 0x7f879c0e5200] i8c dc,h,v,p: 43% 29% 25%  3%
 [libx264 @ 0x7f879c0e5200] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 0x7f879c0e5200] ref P L0: 66.8% 17.0% 10.6%  5.6%
 [libx264 @ 0x7f879c0e5200] ref B L0: 93.4%  5.5%  1.1%
 [libx264 @ 0x7f879c0e5200] ref B L1: 98.0%  2.0%
 [libx264 @ 0x7f879c0e5200] kb/s:1113.88
 [aac @ 0x7f879c0e8600] Qavg: 121.899
 $ ffprobe -select_streams s -show_entries stream=codec_name test.mp4
 ffprobe version N-81879-g3cc9d6d Copyright (c) 2007-2016 the FFmpeg
 developers
   built with Apple LLVM version 7.0.2 (clang-700.1.81)
   configuration: --enable-gpl --enable-nonfree --disable-ffserver
 --enable-shared --enable-libspeex --enable-libopus --enable-libfdk-aac
 --enable-libx265 --enable-libx264 --enable-libxvid --enable-libmp3lame
 --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libvidstab
 --extra-cflags=-I/sw/include --extra-libs=-L/sw/lib --enable-gnutls
   libavutil      55. 32.100 / 55. 32.100
   libavcodec     57. 60.101 / 57. 60.101
   libavformat    57. 51.102 / 57. 51.102
   libavdevice    57.  0.102 / 57.  0.102
   libavfilter     6. 63.100 /  6. 63.100
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  2.100 /  2.  2.100
   libpostproc    54.  0.100 / 54.  0.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf57.51.102
   Duration: 00:00:03.09, start: 0.000000, bitrate: 1458 kb/s
     Chapter #0:0: start 0.000000, end 3.000000
     Metadata:
       title           : Chapter 2
     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 1280x534 [SAR 1:1 DAR 640:267], 1115 kb/s, 23.98fps, 23.98 tbr, 24k tbn,
 47.95 tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1,
 fltp, 342 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
     Stream #0:2(eng): Subtitle: mov_text (text / 0x74786574), 0 kb/s
     Metadata:
       handler_name    : SubtitleHandler
 [STREAM]
 codec_name=mov_text
 [/STREAM]
 }}}

 Sample attached.

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


More information about the FFmpeg-trac mailing list