[FFmpeg-user] Fw: Question about file size changes

David Shuman d.shuman at att.net
Mon Jun 17 01:30:33 EEST 2019


 

   ----- Forwarded Message ----- From: David Shuman <d.shuman at att.net>To: "ffmpeg-user at ffmpeg.org" <ffmpeg-user at ffmpeg.org>Sent: Sunday, June 16, 2019, 3:25:59 PM EDTSubject: Question about file size changes
 I have a video recorder that outputs files with an .mts suffix.  mediainfo identifies these files as BDAV more commonly .m2ts files  I attempt to copy these files with the following commands

ffmpeg           -i      "D:\Dave\Videos\010-raw\mts\Charge-05082019-2255.mts" -c copy                          "D:\Dave\Videos\020-fix\mts\Charge-05082019-2255.mts"                2>&1  | wtee    "D:\Dave\Videos\log\mts\ffFIX-Charge-05082019-2255.txt"
I renamed the file to have a .m2ts suffix and tried again
ffmpeg           -i      "D:\Dave\Videos\010-raw\m2ts\Charge-05082019-2255.m2ts" -c copy                          "D:\Dave\Videos\020-fix\m2ts\Charge-05082019-2255.m2ts"                2>&1  | wtee    "D:\Dave\Videos\log\m2ts\ffFIX-Charge-05082019-2255.txt"
The resulting output files according to mediainfo have had their video bit rates increased     The original is 1778 kb/s regardless of file suffix, the .mts copy is 1817 kb/s and the .m2ts copy is 1870 kb/s.  

Why do the copies have higher video bit rates?  Nothing else significant appears to have changed  the .mts claims format is mpeg-ts  on the output, all other formats both input and the .m2ts output claim to be BDAV.
Is there a way I can keep the bit rate the same so the copy matches the original except for corrections made during the copy for missing franes, etc?

ADDING LOG INFO


MEDIAINFO for original file
General
ID                                       : 1489 (0x5D1)
Complete name                            : D:\Dave\Videos\010-raw\mts\Charge-05082019-2255.mts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 1.87 GiB
Duration                                 : 2 h 10 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 064 kb/s

Video
ID                                       : 81 (0x51)
Menu ID                                  : 3 (0x3)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main at Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : Variable
Format settings, picture structure       : Frame
Codec ID                                 : 2
Duration                                 : 2 h 0 min
Bit rate mode                            : Variable
Bit rate                                 : 1 778 kb/s
Maximum bit rate                         : 15.0 Mb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Bottom Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.172
Stream size                              : 1.50 GiB (80%)
Color primaries                          : BT.601 NTSC
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.601

Audio
ID                                       : 84 (0x54)
Menu ID                                  : 3 (0x3)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : 129
Duration                                 : 2 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -544 ms
Stream size                              : 179 MiB (9%)
Language                                 : English
Service kind                             : Complete Main

Text #1
ID                                       : 81 (0x51)-CC1
Menu ID                                  : 3 (0x3)
Format                                   : EIA-608
Muxing mode                              : A/53 / DTVCC Transport
Muxing mode, more info                   : Muxed in Video #1
Duration                                 : 2 h 0 min
Bit rate mode                            : Constant
Stream size                              : 0.00 Byte (0%)
CaptionServiceName                       : CC1

Text #2
ID                                       : 81 (0x51)-1
Menu ID                                  : 3 (0x3)
Format                                   : EIA-708
Muxing mode                              : A/53 / DTVCC Transport
Muxing mode, more info                   : Muxed in Video #1
Duration                                 : 2 h 0 min
Bit rate mode                            : Constant
Stream size                              : 0.00 Byte (0%)

Menu
ID                                       : 80 (0x50)
Menu ID                                  : 3 (0x3)
Duration                                 : 2 h 10 min
List                                     : 81 (0x51) (MPEG Video) / 84 (0x54) (AC-3, English)
Language                                 :  / English


MTS copy LOG

ffmpeg           -i      "D:\Dave\Videos\010-raw\mts\Charge-05082019-2255.mts" -c copy                          "D:\Dave\Videos\020-fix\mts\Charge-05082019-2255.mts"                2>&1  | wtee    "D:\Dave\Videos\log\mts\ffFIX-Charge-05082019-2255.txt"
ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20190212
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[mpeg2video @ 0000013dc0cdc940] Invalid frame dimensions 0x0.
    Last message repeated 10 times
Input #0, mpegts, from 'D:\Dave\Videos\010-raw\mts\Charge-05082019-2255.mts':
  Duration: 02:10:00.83, start: 94884.847256, bitrate: 2064 kb/s
  Program 1
  Program 2
  Program 3
    Stream #0:0[0x51]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, smpte170m, bottom first), 720x480 [SAR 32:27 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x54](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
  Program 4
Output #0, mpegts, to 'D:\Dave\Videos\020-fix\mts\Charge-05082019-2255.mts':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, smpte170m, bottom first), 720x480 [SAR 32:27 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
    Stream #0:1(eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=26667 fps=0.0 q=-1.0 size=  226048kB time=00:14:50.49 bitrate=2079.5kbits/s speed=1.75e+03x    frame=53791 fps=52471 q=-1.0 size=  481536kB time=00:29:55.53 bitrate=2197.0kbits/s speed=1.75e+03x    frame=83029 fps=54128 q=-1.0 size=  745984kB time=00:46:11.10 bitrate=2205.3kbits/s speed=1.81e+03x    [mpegts @ 0000013dc0cd9140] PES packet size mismatch
frame=112967 fps=55350 q=-1.0 size= 1013760kB time=01:02:50.10 bitrate=2202.8kbits/s speed=1.85e+03x    frame=143946 fps=56307 q=-1.0 size= 1277696kB time=01:20:03.76 bitrate=2178.9kbits/s speed=1.88e+03x    [mpegts @ 0000013dc0cd9140] PES packet size mismatch
frame=174804 fps=56903 q=-1.0 size= 1541888kB time=01:37:13.39 bitrate=2165.3kbits/s speed=1.9e+03x    frame=206442 fps=57791 q=-1.0 size= 1795328kB time=01:54:49.05 bitrate=2134.9kbits/s speed=1.93e+03x    frame=233764 fps=58529 q=-1.0 Lsize= 2014662kB time=02:10:00.69 bitrate=2115.7kbits/s speed=1.95e+03x
video:1653570kB audio:182819kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.707805%

Mediainfo for output (MTS)
General
ID                                       : 1 (0x1)
Complete name                            : D:\Dave\Videos\020-fix\mts\Charge-05082019-2255.mts
Format                                   : MPEG-TS
File size                                : 1.92 GiB
Duration                                 : 2 h 9 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 116 kb/s
FileExtension_Invalid                    : ts m2t m2s m4t m4s tmf ts tp trp ty

Video
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main at Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : Variable
Format settings, picture structure       : Frame
Codec ID                                 : 2
Duration                                 : 2 h 10 min
Bit rate mode                            : Variable
Bit rate                                 : 1 817 kb/s
Maximum bit rate                         : 15.0 Mb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Bottom Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.175
Stream size                              : 1.65 GiB (86%)
Color primaries                          : BT.601 NTSC
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.601

Audio
ID                                       : 257 (0x101)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : 129
Duration                                 : 2 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -805 ms
Stream size                              : 179 MiB (9%)
Language                                 : English
Service kind                             : Complete Main

Text #1
ID                                       : 256 (0x100)-CC1
Menu ID                                  : 1 (0x1)
Format                                   : EIA-608
Muxing mode                              : A/53 / DTVCC Transport
Muxing mode, more info                   : Muxed in Video #1
Duration                                 : 2 h 10 min
Bit rate mode                            : Constant
Stream size                              : 0.00 Byte (0%)
CaptionServiceName                       : CC1

Text #2
ID                                       : 256 (0x100)-1
Menu ID                                  : 1 (0x1)
Format                                   : EIA-708
Muxing mode                              : A/53 / DTVCC Transport
Muxing mode, more info                   : Muxed in Video #1
Duration                                 : 2 h 10 min
Bit rate mode                            : Constant
Stream size                              : 0.00 Byte (0%)

Menu
ID                                       : 4096 (0x1000)
Menu ID                                  : 1 (0x1)
Duration                                 : 2 h 9 min
List                                     : 256 (0x100) (MPEG Video) / 257 (0x101) (AC-3, English)
Language                                 :  / English
Service name                             : Service01
Service provider                         : FFmpeg
Service type                             : digital television


m2ts copy output
ffmpeg           -i      "D:\Dave\Videos\010-raw\m2ts\Charge-05082019-2255.m2ts" -c copy                          "D:\Dave\Videos\020-fix\m2ts\Charge-05082019-2255.m2ts"                    2>&1  | wtee    "D:\Dave\Videos\log\m2ts\ffFIX-Charge-05082019-2255.txt"
ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20190212
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[mpeg2video @ 0000012df012c940] Invalid frame dimensions 0x0.
    Last message repeated 10 times
Input #0, mpegts, from 'D:\Dave\Videos\010-raw\m2ts\Charge-05082019-2255.m2ts':
  Duration: 02:10:00.83, start: 94884.847256, bitrate: 2064 kb/s
  Program 1
  Program 2
  Program 3
    Stream #0:0[0x51]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, smpte170m, bottom first), 720x480 [SAR 32:27 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x54](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
  Program 4
Output #0, mpegts, to 'D:\Dave\Videos\020-fix\m2ts\Charge-05082019-2255.m2ts':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, smpte170m, bottom first), 720x480 [SAR 32:27 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
    Stream #0:1(eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=26007 fps=0.0 q=-1.0 size=  224768kB time=00:14:28.47 bitrate=2120.2kbits/s speed=1.68e+03x    frame=52440 fps=50863 q=-1.0 size=  480512kB time=00:29:10.45 bitrate=2248.8kbits/s speed=1.7e+03x    frame=78704 fps=51393 q=-1.0 size=  722176kB time=00:43:46.79 bitrate=2252.2kbits/s speed=1.72e+03x    frame=107410 fps=52474 q=-1.0 size=  976640kB time=00:59:44.61 bitrate=2231.9kbits/s speed=1.75e+03x    [mpegts @ 0000012df0129140] PES packet size mismatch
frame=136130 fps=53142 q=-1.0 size= 1231616kB time=01:15:42.97 bitrate=2220.9kbits/s speed=1.77e+03x    frame=164182 fps=53371 q=-1.0 size= 1479936kB time=01:31:18.97 bitrate=2212.8kbits/s speed=1.78e+03x    [mpegts @ 0000012df0129140] PES packet size mismatch
frame=194306 fps=54103 q=-1.0 size= 1722368kB time=01:48:04.11 bitrate=2176.0kbits/s speed=1.81e+03x    frame=224172 fps=54584 q=-1.0 size= 1977344kB time=02:04:40.64 bitrate=2165.4kbits/s speed=1.82e+03x    frame=233764 fps=54834 q=-1.0 Lsize= 2057527kB time=02:10:00.69 bitrate=2160.7kbits/s speed=1.83e+03x
video:1653570kB audio:182819kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 12.042013%

M2TS output MediaINFO
General
ID                                       : 1 (0x1)
Complete name                            : D:\Dave\Videos\020-fix\m2ts\Charge-05082019-2255.m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 1.96 GiB
Duration                                 : 2 h 9 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 161 kb/s

Video
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main at Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : Variable
Format settings, picture structure       : Frame
Codec ID                                 : 2
Duration                                 : 2 h 10 min
Bit rate mode                            : Variable
Bit rate                                 : 1 870 kb/s
Maximum bit rate                         : 15.0 Mb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Bottom Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.181
Stream size                              : 1.70 GiB (87%)
Color primaries                          : BT.601 NTSC
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.601

Audio
ID                                       : 257 (0x101)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : 129
Duration                                 : 2 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -805 ms
Stream size                              : 179 MiB (9%)
Language                                 : English
Service kind                             : Complete Main

Text #1
ID                                       : 256 (0x100)-CC1
Menu ID                                  : 1 (0x1)
Format                                   : EIA-608
Muxing mode                              : A/53 / DTVCC Transport
Muxing mode, more info                   : Muxed in Video #1
Duration                                 : 2 h 10 min
Bit rate mode                            : Constant
Stream size                              : 0.00 Byte (0%)
CaptionServiceName                       : CC1

Text #2
ID                                       : 256 (0x100)-1
Menu ID                                  : 1 (0x1)
Format                                   : EIA-708
Muxing mode                              : A/53 / DTVCC Transport
Muxing mode, more info                   : Muxed in Video #1
Duration                                 : 2 h 10 min
Bit rate mode                            : Constant
Stream size                              : 0.00 Byte (0%)

Menu
ID                                       : 4096 (0x1000)
Menu ID                                  : 1 (0x1)
Duration                                 : 2 h 9 min
List                                     : 256 (0x100) (MPEG Video) / 257 (0x101) (AC-3, English)
Language                                 :  / English
Service name                             : Service01
Service provider                         : FFmpeg
Service type                             : digital television



  


More information about the ffmpeg-user mailing list