Question about file size changes

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about file size changes

David Shuman
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?


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Fw: Question about file size changes

David Shuman
 

   ----- Forwarded Message ----- From: David Shuman <[hidden email]>To: "[hidden email]" <[hidden email]>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@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@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@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



 
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Question about file size changes

Brainiarc7
In reply to this post by David Shuman
On Sun, 16 Jun 2019 at 22:26, David Shuman <[hidden email]> wrote:

> 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?
>
>
>
Most likely you're seeing the effects of muxer overheads.

From your console: muxing overhead: 9.707805%
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Question about file size changes

David Shuman
 From what I understand, I am doing a copy that should not alter the original content except to add dropped frames as necessary to sync the video and audio due to transmission errors.  Why is  the KB/S changing and by two different values depending solely on the suffix for the files.  Which conversion is more valid in this case?  MTS or M2TS?
    On Sunday, June 16, 2019, 06:36:01 PM EDT, Dennis Mungai <[hidden email]> wrote:  
 
 On Sun, 16 Jun 2019 at 22:26, David Shuman <[hidden email]> wrote:

> 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?
>
>
>
Most likely you're seeing the effects of muxer overheads.

From your console: muxing overhead: 9.707805%
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".  
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Question about file size changes

Moritz Barsnick
On Tue, Jun 18, 2019 at 10:25:45 +0000, David Shuman wrote:
>  From what I understand, I am doing a copy that should not alter the
> original content except to add dropped frames as necessary to sync
> the video and audio due to transmission errors.

That's correct. That's also what is happening. The stream's bandwith /
bitrate is not changed. But what ffmpeg does (by nature) is to remux,
and muxing adds overhead. This may be more or less depending on how
ffmpeg is implemented, but also depending on the target format.

>  Why is  the KB/S changing and by two different values depending solely on the suffix for the files.

If you use the suffix .m2ts, ffmpeg muxes the resulting file as M2TS,
otherwise as MPEG-TS. The difference is - as far as I can tell - that
each packet gets an additional header in M2TS mode.

See your own info:
> MEDIAINFO for original file
[...]
> Complete name                            : D:\Dave\Videos\010-raw\mts\Charge-05082019-2255.mts
> Format                                   : BDAV
> Format/Info                              : Blu-ray Video
> File size                                : 1.87 GiB
[...]
> Overall bit rate                         : 2 064 kb/s
> Video
[...]
> Bit rate                                 : 1 778 kb/s

> Mediainfo for output (MTS)
[...]
> Complete name                            : D:\Dave\Videos\020-fix\mts\Charge-05082019-2255.mts
> Format                                   : MPEG-TS
> File size                                : 1.92 GiB
[...]
> Overall bit rate                         : 2 116 kb/s
> Video
[...]
> Bit rate                                 : 1 817 kb/s

> M2TS output MediaINFO
[...]
> Complete name                            : D:\Dave\Videos\020-fix\m2ts\Charge-05082019-2255.m2ts
> Format                                   : BDAV
> Format/Info                              : Blu-ray Video
> File size                                : 1.96 GiB
[...]
> Overall bit rate                         : 2 161 kb/s
> Video
> Bit rate                                 : 1 870 kb/s

The overall size isn't so much different (2%), and due to what I
explained above.

I don't know why mediainfo determines different video bit rates (1817 vs.
1870), ffmpeg claims to have copied exactly the same amount of video
into the target containers. I don't trust mediainfo on this.

>  Which conversion is more valid in this case?  MTS or M2TS?

Valid as what? What are you trying to achive?

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Question about file size changes

Jerome Martinez
On 18/06/2019 15:01, Moritz Barsnick wrote:
> I don't know why mediainfo determines different video bit rates (1817 vs.
> 1870), ffmpeg claims to have copied exactly the same amount of video
> into the target containers. I don't trust mediainfo on this.

As it is not possible to compute the bitrate per stream in MTS/M2TS
without parsing the whole file, MediaInfo does an estimation, and in
this case the estimation is unfortunately different depending on the
container used.
I'll fix that in MediaInfo for at least having the same video bitrate
output when one changes from MTS to M2TS (I plan to add "estimated"
later when relevant so more explicit that it could be different for the
same stream, but more complex in the code), so you would avoid such kind
of question about the video bitrate (the question about the overall
bitrate and file size change will stay though, due to the good reasons
you provided).

Jérôme, developer of MediaInfo.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Question about file size changes

Moritz Barsnick
On Tue, Jun 18, 2019 at 16:31:45 +0200, Jerome Martinez wrote:
> On 18/06/2019 15:01, Moritz Barsnick wrote:
> > I don't know why mediainfo determines different video bit rates (1817 vs.
>
> As it is not possible to compute the bitrate per stream in MTS/M2TS
> without parsing the whole file, MediaInfo does an estimation, and in
> this case the estimation is unfortunately different depending on the
> container used.

That's what I thought. I believe it's no different for ffmpeg, which
does warn regarding duration estimation for some codecs (notably MP3),
but otherwise does not indicate whether a displayed bitrate is from
metadata or from knowledge or from estimation. (I may be wrong here,
too lazy to check.)

> (I plan to add "estimated" later when relevant so more explicit that
> it could be different for the same stream, but more complex in the
> code),

As to not confuse people, that's probably better. But multimedia coding
is so complex anyway, it tends to confuse people. ;-)

> (the question about the overall bitrate and file size change will
> stay though, due to the good reasons you provided).

Yes, it wasn't 100 % clear from the original posting what the complaint
was.

> Jérôme, developer of MediaInfo.

Thanks for pitching in,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Question about file size changes

David Shuman
 In terms of which conversion is more valid which play quality would be closer to the original -- does the m2ts change less of the content when remixing than the mts as BDAV does not change to mpeg-ts  our would one consider the additional headers from m2ts to more of a quality change so mts provides a file more like the original again in terms of play quality?

    On Tuesday, June 18, 2019, 1:11:21 PM EDT, Moritz Barsnick <[hidden email]> wrote:  
 
 On Tue, Jun 18, 2019 at 16:31:45 +0200, Jerome Martinez wrote:
> On 18/06/2019 15:01, Moritz Barsnick wrote:
> > I don't know why mediainfo determines different video bit rates (1817 vs.
>
> As it is not possible to compute the bitrate per stream in MTS/M2TS
> without parsing the whole file, MediaInfo does an estimation, and in
> this case the estimation is unfortunately different depending on the
> container used.

That's what I thought. I believe it's no different for ffmpeg, which
does warn regarding duration estimation for some codecs (notably MP3),
but otherwise does not indicate whether a displayed bitrate is from
metadata or from knowledge or from estimation. (I may be wrong here,
too lazy to check.)

> (I plan to add "estimated" later when relevant so more explicit that
> it could be different for the same stream, but more complex in the
> code),

As to not confuse people, that's probably better. But multimedia coding
is so complex anyway, it tends to confuse people. ;-)

> (the question about the overall bitrate and file size change will
> stay though, due to the good reasons you provided).

Yes, it wasn't 100 % clear from the original posting what the complaint
was.

> Jérôme, developer of MediaInfo.

Thanks for pitching in,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".  
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Question about file size changes

Carl Eugen Hoyos-2
Am Mi., 19. Juni 2019 um 02:54 Uhr schrieb David Shuman <[hidden email]>:
>  In terms of which conversion is more valid which play quality would be
> closer to the original -- does the m2ts change less of the content when
> remixing than the mts as BDAV does not change to mpeg-ts  our would
> one consider the additional headers from m2ts to more of a quality
> change so mts provides a file more like the original again in terms of
> play quality?

There are several misunderstandings in this thread, I will try to explain
some of them (and repeat other explanations):
When you remux, you cannot change the quality of the media in the file,
this is simply not possible.
FFmpeg is not a file editor, so contrary to what some comments here
imply, you simply cannot remux and expect that the resulting file is
very similar to the original file, with only the changes you wanted. On
the contrary, the output file is always a new file with new properties,
some of them will be identical to the original file, others won't.
You already know that MediaInfo is not an ideal tool to find issues in
FFmpeg.
While there is indeed some BDAV writing support in the mpegts muxer,
I don't think it is complete.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Question about file size changes

David Shuman
 Carl;
MediaInfo may not be good for some things but it does appear to identify the details of the closed captioning streams/content? better than ffmpeg or ffprobe have with the options I have found to date.
In this case it also appears to have identified (for me at least) a conversion from BDAV to mpegts because of a file suffix (mts) suggesting the prefix to be invalid triggered a web search by me that suggested a means to prevent that conversion (by changing the file type to m2ts).  MediaINFO appears to have confirmed for me that the m2ts suffix prevented the change from BDAV to mpegts.

This statement "When you remux, you cannot change the quality of the media in the file, this is simply not possible." confuses me because this statement "While there is indeed some BDAV writing support in the mpegts muxer, I don't think it is complete."  Seems to indicate a remux operation that changes from BDAV to mpegts may use incomplete BDAV interpretation code that may not be as good as a remux that maintains BDAV on both sides.
If I understand "While there is indeed some BDAV writing support in the mpegts muxer, I don't think it is complete." as noted above you appear to indicate that the conversion of the file suffix to m2ts should deliver either equivalent or better results by eliminating the change from BDAV to mpegts caused by the mts file suffix.  Thanks this appears to be the answer I was seeking.
Do I understand what you wrote?
    On Wednesday, June 19, 2019, 10:27:08 AM EDT, Carl Eugen Hoyos <[hidden email]> wrote:  
 
 Am Mi., 19. Juni 2019 um 02:54 Uhr schrieb David Shuman <[hidden email]>:
>  In terms of which conversion is more valid which play quality would be
> closer to the original -- does the m2ts change less of the content when
> remixing than the mts as BDAV does not change to mpeg-ts  our would
> one consider the additional headers from m2ts to more of a quality
> change so mts provides a file more like the original again in terms of
> play quality?

There are several misunderstandings in this thread, I will try to explain
some of them (and repeat other explanations):
When you remux, you cannot change the quality of the media in the file,
this is simply not possible.
FFmpeg is not a file editor, so contrary to what some comments here
imply, you simply cannot remux and expect that the resulting file is
very similar to the original file, with only the changes you wanted. On
the contrary, the output file is always a new file with new properties,
some of them will be identical to the original file, others won't.
You already know that MediaInfo is not an ideal tool to find issues in
FFmpeg.
While there is indeed some BDAV writing support in the mpegts muxer,
I don't think it is complete.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".  
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".