Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
31st August 2021, 12:20 | #1 | Link |
Registered User
Join Date: Apr 2013
Posts: 7
|
Strange, Video bitrate is changed after trim the video with ffmpeg
Original Video is mkv file :
Code:
Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings, CABAC : Yes Format settings, ReFrames : 5 frames Codec ID : V_MPEG4/ISO/AVC Duration : 2 h 11 min Bit rate : 9 173 kb/s Width : 1 920 pixels Height : 808 pixels Display aspect ratio : 2.40:1 Frame rate mode : Constant Frame rate : 24.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.246 Stream size : 8.44 GiB (86%) Writing library : x264 core 159 r2991 1771b55 Encoding settings : cabac=1 / ref=5 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=24 / 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=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=9173 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00 Language : English Default : Yes Forced : No Code:
ffmpeg -i "Parasite.mkv" -c:v libx265 -preset ultrafast -acodec ac3 -b:a 448k -map 0 ParasiteReduced.mkv ParasiteReduced.mkv Media Info : Code:
Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main@L4@Main Codec ID : V_MPEGH/ISO/HEVC Bit rate : 342 kb/s Width : 1 920 pixels Height : 808 pixels Display aspect ratio : 2.40:1 Frame rate mode : Variable Original frame rate : 24.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Writing library : x265 3.0_Au+10-74a8672ea4f7:[Windows][GCC 8.2.1][64 bit] 8bit+10bit Encoding settings : cpuid=1111039 / frame-threads=3 / numa-pools=8 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x808 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=1 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=250 / gop-lookahead=0 / bframes=3 / b-adapt=0 / b-pyramid / bframe-bias=0 / rc-lookahead=5 / lookahead-slices=5 / scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=32 / min-cu-size=16 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / no-signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=0 / no-limit-modes / me=0 / subme=0 / merange=57 / temporal-mvp / no-weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / no-sao / no-sao-non-deblock / rd=2 / early-skip / rskip / fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=28.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=0.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / qp-adaptation-range=1.00 Language : English Default : Yes Forced : No Statistics Tags Issue : mkvmerge v7.4.0 ('Circles') 64bit built on Dec 12 2014 12:19:56 2020-01-07 17:45:36 / Lavf58.26.101 FromStats_BitRate : 9168071 FromStats_Duration : 02:11:48.839000000 FromStats_FrameCount : 189812 FromStats_StreamSize : 9063594840 Code:
ffmpeg -ss 01:52:00 -i "ParasiteReduced.mkv" -t 00:03:00 -c copy output.mkv Code:
Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main@L4@Main Codec ID : V_MPEGH/ISO/HEVC Duration : 3 min 1 s Bit rate : 1 253 kb/s Width : 1 920 pixels Height : 808 pixels Display aspect ratio : 2.40:1 Frame rate mode : Constant Frame rate : 24.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Bits/(Pixel*Frame) : 0.034 Stream size : 27.1 MiB (72%) Writing library : x265 3.0_Au+10-74a8672ea4f7:[Windows][GCC 8.2.1][64 bit] 8bit+10bit Encoding settings : cpuid=1111039 / frame-threads=3 / numa-pools=8 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x808 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=1 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=250 / gop-lookahead=0 / bframes=3 / b-adapt=0 / b-pyramid / bframe-bias=0 / rc-lookahead=5 / lookahead-slices=5 / scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=32 / min-cu-size=16 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / no-signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=0 / no-limit-modes / me=0 / subme=0 / merange=57 / temporal-mvp / no-weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / no-sao / no-sao-non-deblock / rd=2 / early-skip / rskip / fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=28.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=0.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / qp-adaptation-range=1.00 Language : English Default : Yes Forced : No Statistics Tags Issue : mkvmerge v7.4.0 ('Circles') 64bit built on Dec 12 2014 12:19:56 2020-01-07 17:45:36 / Lavf58.26.101 FromStats_BitRate : 9168071 FromStats_Duration : 00:03:01.612000000 FromStats_FrameCount : 189812 FromStats_StreamSize : 9063594840 I wonder how is the code to trim it with the same video bitrate 342 kb/s ? (Also wonder, why the trimmed video bitrate is going up to almost 4 times than the original video bitrate). Any kind of help would be greatly appreciated. Thank you in advanced. |
31st August 2021, 12:36 | #2 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I aint no expert [nor hardly a newbie],
but should the -c copy not be -vcodec copy [and if suitable] -acodec copy I dont know what -c copy is supposed to do.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
31st August 2021, 13:52 | #5 | Link | |
Registered User
Join Date: Apr 2013
Posts: 7
|
Quote:
Thank you for your explanation. Make sense. So, because the source file (ParasiteReduced.mkv) has a variable bitrate, and the portion I choose (quite many movement - fast camera panning) consequently this portion get more bits spent. That's why the output.mkv also has more kbps. BTW, I see that the ParasiteReduced.mkv has a variable bitrate. I wonder why the output.mkv turn to constant bitrate ? Thank you once again, excellentswordfight. |
|
31st August 2021, 15:25 | #6 | Link | |
Lost my old account :(
Join Date: Jul 2017
Posts: 322
|
Quote:
As to why Frame rate mode is reported as variable in your first re-encode and not the trimmed copy of it, no idea. You are misunderstanding him, I'm pretty sure that he means that you should use -vcodec copy instead of -c copy. But its fine, -c copy works (and it did work). AFAIK -c copy will just try to copy every stream/component, most users usually specify this per stream type e.g. -vcodec/acodec. Last edited by excellentswordfight; 31st August 2021 at 15:39. |
|
7th September 2021, 07:25 | #7 | Link | |
Video Fanatic
Join Date: Jul 2021
Location: Surrey
Posts: 89
|
Quote:
I often trim segments using avidemux (still works great) and the output depends on the segment, even with 3-pass CBR. On a test 7,500 kbps encode, one segment came out with an average bitrate of under 4,000 kbps, and another at over 9,000 kbps.
__________________
PC: R9 5900X | 32GB 3600 MT/s RAM | 2*1TB NVMe | RTX 3080 | water-cooled NAS: SM 48-bay 240TB+ storage | Xeon 1220 | 32GB DDR4 ECC HTPC: Pentium J5005 | 16GB RAM | 256GB SSD | 15W |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|