[FFmpeg-trac] #11534(undetermined:new): Copying dvd subtitles from mp4 to mp4 alters size

FFmpeg trac at avcodec.org
Mon Mar 31 06:40:57 EEST 2025


#11534: Copying dvd subtitles from mp4 to mp4 alters size
-------------------------------------+-------------------------------------
             Reporter:  y2krankor    |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
  dvb_subtitle                       |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 When copying from an mp4 to another mp4 using -c copy, dvd subtitles are
 having their size reset to 720x480, regardless of the original size (I've
 tested this against subtitles that were 720x576 and 1920x1080). [This does
 not happen if the source file is an mkv.]

 The input file shows this:

 {{{
 Stream #0:3[0x4](eng): Subtitle: dvd_subtitle (dvdsub) (mp4s /
 0x7334706D), 720x576, 4 kb/s (default)
 }}}
 but the output is:
 {{{
 Stream #0:1(eng): Subtitle: dvd_subtitle (mp4s / 0x7334706D), 720x480, 4
 kb/s (default)
 }}}

 Using -canvas_size doesn't make any difference.  (I didn't necessarily
 expect that it would, but I tried it anyway.)

 How to reproduce:
 {{{
 ffmpeg -i "tv_episode.mp4" -c copy -map 0:v -map 0:s:0 "tv_episode (first
 sub).mp4"
 ffmpeg version N-118915-g8b2372cac7 Copyright (c) 2000-2025 the FFmpeg
 developers
   built with gcc 14 (GCC)
   configuration: --enable-nonfree --enable-shared --enable-static
 --disable-avisynth --enable-gpl --enable-libaom --enable-libass --enable-
 libbluray --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype
 --enable-libharfbuzz --enable-libfribidi --enable-libmp3lame --enable-
 libopus --enable-libvorbis --enable-libx264 --enable-libx265 --enable-
 openssl --enable-version3 --enable-libxml2 --enable-libvpx --enable-
 libopenh264 --extra-ldflags='-L /usr/local/lib'
   libavutil      59. 60.100 / 59. 60.100
   libavcodec     61. 33.102 / 61. 33.102
   libavformat    61.  9.107 / 61.  9.107
   libavdevice    61.  4.100 / 61.  4.100
   libavfilter    10.  9.100 / 10.  9.100
   libswscale      8. 13.103 /  8. 13.103
   libswresample   5.  4.100 /  5.  4.100
   libpostproc    58.  4.100 / 58.  4.100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1f5729c0] Referenced QT chapter track not
 found
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tv_episode.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf61.9.106
   Duration: 00:46:51.68, start: 0.000000, bitrate: 1097 kb/s
   Chapters:
     Chapter #0:0: start 0.000000, end 22.160000
       Metadata:
         title           :
     Chapter #0:1: start 22.160000, end 850.960000
       Metadata:
         title           :
     Chapter #0:2: start 850.960000, end 1666.560000
       Metadata:
         title           :
     Chapter #0:3: start 1666.560000, end 2318.160000
       Metadata:
         title           :
     Chapter #0:4: start 2318.160000, end 2811.680000
       Metadata:
         title           :
   Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
 yuv420p(progressive), 720x576 [SAR 16:15 DAR 4:3], 825 kb/s, 50 fps, 50
 tbr, 12800 tbn (default)
     Metadata:
       handler_name    : VideoHandler
       vendor_id       : [0][0][0][0]
       encoder         : Lavc61.31.101 libx264
   Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
 5.1, fltp, 128 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
       vendor_id       : [0][0][0][0]
   Stream #0:2[0x3](fre): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 128 kb/s
     Metadata:
       handler_name    : SoundHandler
       vendor_id       : [0][0][0][0]
   Stream #0:3[0x4](eng): Subtitle: dvd_subtitle (dvdsub) (mp4s /
 0x7334706D), 720x576, 4 kb/s (default)
     Metadata:
       handler_name    : SubtitleHandler
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:3 -> #0:1 (copy)
 Output #0, mp4, to 'tv_episode (first sub).mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf61.9.107
   Chapters:
     Chapter #0:0: start 0.000000, end 22.160000
       Metadata:
         title           :
     Chapter #0:1: start 22.160000, end 850.960000
       Metadata:
         title           :
     Chapter #0:2: start 850.960000, end 1666.560000
       Metadata:
         title           :
     Chapter #0:3: start 1666.560000, end 2318.160000
       Metadata:
         title           :
     Chapter #0:4: start 2318.160000, end 2811.680000
       Metadata:
         title           :
   Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661),
 yuv420p(progressive), 720x576 [SAR 16:15 DAR 4:3], q=2-31, 825 kb/s, 50
 fps, 50 tbr, 12800 tbn (default)
     Metadata:
       handler_name    : VideoHandler
       vendor_id       : [0][0][0][0]
       encoder         : Lavc61.31.101 libx264
   Stream #0:1(eng): Subtitle: dvd_subtitle (mp4s / 0x7334706D), 720x480, 4
 kb/s (default)
     Metadata:
       handler_name    : SubtitleHandler
 Press [q] to stop, [?] for help
 [out#0/mp4 @ 0x1fbabfc0] video:283283KiB audio:0KiB subtitle:1502KiB other
 streams:0KiB global headers:0KiB muxing overhead: 0.581792%
 frame=140584 fps=9205 q=-1.0 Lsize=  286442KiB time=00:46:09.43 bitrate=
 847.3kbits/s speed= 181x


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


More information about the FFmpeg-trac mailing list