Tdarr
Tdarr copied to clipboard
Increasing audio volume reduces video size!
Maybe this is just a function of what plugins I have configured for Tdarr (I basically use the default plugins but have activated the one that uses the GPUs instead of the CPUs).
I often come across videos in my library that are low in volume. When watching them on my desktop I have to crank the volume a bit. Then some other event happens where audio is played and it's blaring! So I figured I'd raise the volume say 3db with:
ffmpeg -i input.mkv -filter:a "volume=3.0" output.mkv
Examining the input and output and the output has shrunk considerably:
Earth:ll -h /Videos/TV/The\ Orville/The\ Orville\ S03E01\ -\ Electric\ Sheep.*
-rwxrwxrwx 1 andrew defaria 1.3G Jun 2 12:39 '/Videos/TV/The Orville/The Orville S03E01 - Electric Sheep.louder.mkv'*
-rw-r--r-- 1 andrew defaria 2.1G Jun 1 21:37 '/Videos/TV/The Orville/The Orville S03E01 - Electric Sheep.mkv'
Earth:
My understanding is that all that should have been changed is that the audio volume would be increased by 3db and yet the file shrunk a lot. Why isn't this part of Tdarr's default configuration? Or is it just that my ffmpeg command above was done on CPUs instead of GPUs?
In case it's relevant here are the mediainfo outputs on the files:
/Videos/TV/The Orville/The Orville S03E01 - Electric Sheep.mkv
General
Unique ID : 67296608883335196770361940864908253700 (0x32A0DAFCD50ABB57732DE14A5ED5DA04)
Complete name : /Videos/TV/The Orville/The Orville S03E01 - Electric Sheep.mkv
Format : Matroska
Format version : Version 4
File size : 2.06 GiB
Duration : 1 h 9 min
Overall bit rate : 4 206 kb/s
Writing application : mkvmerge v67.0.0 ('Under Stars') 64-bit
Writing library : libebml v1.4.2 + libmatroska v1.6.4
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 9 min
Bit rate : 3 866 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.078
Stream size : 1.89 GiB (92%)
Default : Yes
Forced : No
Audio
ID : 2
Format : E-AC-3
Format/Info : Enhanced AC-3
Commercial name : Dolby Digital Plus
Codec ID : A_EAC3
Duration : 1 h 9 min
Bit rate mode : Constant
Bit rate : 256 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Stream size : 128 MiB (6%)
Language : English
Service kind : Complete Main
Default : Yes
Forced : No
Text #1
ID : 3
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title : English [SDH]
Language : English
Default : No
Forced : No
Text #2
ID : 4
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title : Spanish [SDH]
Language : Spanish
Default : No
Forced : No
/Videos/TV/The Orville/The Orville S03E01 - Electric Sheep.louder.mkv
General
Unique ID : 229201279511059349737980912414856157022 (0xAC6E8F8D5397C8CC7B3B0B674549975E)
Complete name : /Videos/TV/The Orville/The Orville S03E01 - Electric Sheep.louder.mkv
Format : Matroska
Format version : Version 4
File size : 1.26 GiB
Duration : 1 h 9 min
Overall bit rate mode : Variable
Overall bit rate : 2 572 kb/s
Writing application : Lavf58.76.100
Writing library : Lavf58.76.100
ErrorDetectionType : Per level 1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 9 min
Bit rate : 2 245 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.045
Stream size : 1.10 GiB (87%)
Writing library : x264 core 160 r3011 cde9a93
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / lookahead_threads=4 / 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=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
Audio
ID : 2
Format : Vorbis
Format settings, Floor : 1 / 16898
Codec ID : A_VORBIS
Duration : 1 h 9 min
Bit rate mode : Variable
Bit rate : 276 kb/s
Channel(s) : 6 channels
Sampling rate : 48.0 kHz
Compression mode : Lossy
Stream size : 138 MiB (11%)
Writing application : Lavc58.134.100
Writing library : libVorbis (Reducing Environment) (20200704 (Reducing Environment))
Language : English
Default : Yes
Forced : No
Text
ID : 3
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Duration : 1 h 8 min
Compression mode : Lossless
Title : English [SDH]
Writing library : Lavc58.134.100 ssa
Language : English
Default : Yes
Forced : No
I do notice that the audio format changed. I'd like to know why this is happening before I lease this louding script on the whole season.
Your video bitrate changed from 3866 kb/s to 2245 kb/s. If you modify your video bitrate to match in your command you may have better luck, but the resulting file may also be larger due to processing cycles. ffmpeg is likely using default settings in addition to changing your audio on the files.
Off topic but video editing is a trial and error process and I'm just going to get started with tdarr myself, but discrepancies like this are what are holding me back because while saving space is nice, I don't want to lose visible quality which of course is a drawback if you're pulling out 1500 kb/s from the resulting video.
Why did the video bitrate change? I didn't tell it to.
Why did the video bitrate change? I didn't tell it to.
Actually you did. You didn't specify how ffmpeg should deal with the other streams and it defaults to transcoding to h264. You'll need to specify with something like -c:v copy
for video to copy the stream.
I maintain that I didn't tell it to, though it does make sense that unspecified the default was different than the current video. It's not that I mind it getting smaller and I guess it could also get larger. I may change to use the -c:v copy to insure it doesnt' change.
Re-open if needed