[FFmpeg-user] FFMPEG changes bitrate after splitting a file

Julian Docev j.docev at gmail.com
Mon Oct 14 03:24:36 EEST 2019


Hi,
I want to split a file by file size but as I can not find that option I
thought of  doing it by calculating the size using the bitrates. The
problem is that when I split a file with the command line tool i
receive different bitrates. I use this code to split the file:

*ffmpeg -i test.mp4 -ss 00:00:00 -to 00:20:00 -c copy test_output.mp4*

and this is my result:















































*D:\Desktop\ffmpeg\ffmpeg\bin>ffmpeg -i test.mp4 -ss 00:00:00 -to 00:20:00
-c copy test_output.mp4ffmpeg version git-2019-10-13-4f4334b Copyright (c)
2000-2019 the FFmpeg developers  built with gcc 9.2.1 (GCC) 20191010
configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --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-ffnvcodec --enable-cuvid --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
--enable-libopenmpt --enable-amf  libavutil      56. 35.100 / 56. 35.100
libavcodec     58. 59.102 / 58. 59.102  libavformat    58. 33.100 / 58.
33.100  libavdevice    58.  9.100 / 58.  9.100  libavfilter     7. 62.100 /
 7. 62.100  libswscale      5.  6.100 /  5.  6.100  libswresample   3.
 6.100 /  3.  6.100  libpostproc    55.  6.100 / 55.  6.100Input #0,
mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':  Metadata:    major_brand     :
mp42    minor_version   : 0    compatible_brands: isommp42    creation_time
  : 2019-03-13T11:57:44.000000Z  Duration: 00:01:28.49, start: 0.000000,
bitrate: 608 kb/s    Stream #0:0(und): Video: h264 (Main) (avc1 /
0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 477 kb/s, 25
fps, 25 tbr, 12800 tbn, 50 tbc (default)    Metadata:      creation_time
: 2019-03-13T11:57:44.000000Z      handler_name    : ISO Media file
produced by Google Inc. Created on: 03/13/2019.    Stream #0:1(und): Audio:
aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Metadata:      creation_time   : 2019-03-13T11:57:44.000000Z
handler_name    : ISO Media file produced by Google Inc. Created on:
03/13/2019.Output #0, mp4, to 'test_output.mp4':  Metadata:    major_brand
    : mp42    minor_version   : 0    compatible_brands: isommp42    encoder
        : Lavf58.33.100    Stream #0:0(und): Video: h264 (Main) (avc1 /
0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 477
kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)    Metadata:
creation_time   : 2019-03-13T11:57:44.000000Z      handler_name    : ISO
Media file produced by Google Inc. Created on: 03/13/2019.    Stream
#0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127
kb/s (default)    Metadata:      creation_time   :
2019-03-13T11:57:44.000000Z      handler_name    : ISO Media file produced
by Google Inc. Created on: 03/13/2019.Stream mapping:  Stream #0:0 -> #0:0
(copy)  Stream #0:1 -> #0:1 (copy)Press [q] to stop, [?] for helpframe=
2109 fps=0.0 q=-1.0 Lsize=    6033kB time=00:01:28.46 bitrate= 558.6kbits/s
speed= 279xvideo:4582kB audio:1383kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 1.139301%*


Is there anyway to conserve the origina bitrates or to split the file by
size?

Thank you in advance

Julien Dotsev


More information about the ffmpeg-user mailing list