Skip to main content
Recent Posts
1
Opus / Re: Suggestion for a simple psychoacoustic improvement: transient bit-boost.
Last post by jmvalin -
Thanks Jmvalin, if you could give me some direction that would be much appreciated.
You want to look at the celt/celt_encoder.c file. The transient_analysis() function returns 1 when the current frame is a transient and 0 otherwise. It also computes an estimate how how "strong" the transient is, which it returns in tf_estimate. That value gets used in compute_vbr() to boost the bitrate. To change the behaviour, you'd have to change the value of that estimate, and then update tf_calibration so that the average bitrate doesn't change.

Quote
That's curious -- I assumed that when "tonality estimation" was implemented in v1.1 for tonally rich content, the final bitrate did actually increase when averaged over a large collection, compared to v1.0. Further boosting transients wouldn't work the same way?
No, when tonality estimation was added, the bitrate of the (vast majority of) non-tonal files decreased slightly to ensure that the average over a large collection stayed the same. Of course, you can argue how representative my collection is, but I try to make sure any change I make to VBR does not change the overall average. One note about 1.0 though. While it did have transient boosting in VBR mode, the VBR was tuned to always produce the same average over an individual file. Truly unconstrained VBR only arrived with 1.1.

Quote
In any case, I wasn't making the case for this boosting feature to become the default behaviour of the encoder, just that it would be useful to be able to have it as an option if needed (much like the ability to define framesize).
If a VBR change is good, if should be on by default. If it's only good in some files, then you might as well just increase the value you pass to --bitrate.
2
General - (fb2k) / Re: Reading codec info in some video files
Last post by zeremy -
Rollin, I have thousands of video files, located in hundreds of folders.
There is ONE root folder, but I can't move all video files to the same folder. That's impossible.
So I need a recursive script.

Here's the current state of my recursive script. What do you think ?

Code: [Select]
CALL :treeProcess
GOTO :eof

:treeProcess
FOR %%F IN (*.mkv, *.mp4, *.avi, *.wmv, *.mpg, *.ts) DO (
    ECHO "@" : "%%F", >> index.txt
    "C:\Program Files\FFmpeg\bin\ffprobe.exe" "%%F" -v error -of flat=s=_ -select_streams v:0 -show_entries stream=width -print_format xml >> index.txt
    "C:\Program Files\FFmpeg\bin\ffprobe.exe" "%%F" -v error -of flat=s=_ -select_streams v:0 -show_entries stream=height -print_format xml >> index.txt
)
FOR /D %%d IN (*) DO (
    CD %%d
    cALL :treeProcess
    CD ..
)

EXIT /b

Modified it a bit , I think this is what you asked for.

Code: [Select]
setlocal enableDelayedExpansion

CALL :treeProcess
GOTO :eof

:treeProcess
FOR %%f IN (*.mkv, *.mp4, *.avi, *.wmv, *.mpg, *.ts) DO (
ECHO [ > "%%~nf.tags"
ECHO { >> "%%~nf.tags"
    ECHO "@" : "%%f", >> "%%~nf.tags"
"C:\Program Files\FFmpeg\bin\ffprobe.exe" -v error -select_streams v:0 -show_entries stream=width -of csv=s=x:p=0 "%%f"  > "%%~nf.width.txt"
set /p width= < "%%~nf.width.txt"
"C:\Program Files\FFmpeg\bin\ffprobe.exe" -v error -select_streams v:0 -show_entries stream=height -of csv=s=x:p=0 "%%f"  > "%%~nf.height.txt"
set /p height= < "%%~nf.height.txt"
ECHO "WIDTH": "!width!", >> "%%~nf.tags"
ECHO "HEIGHT": "!height!", >> "%%~nf.tags"
del "%%~nf.width.txt"
del "%%~nf.height.txt"
ECHO } >> "%%~nf.tags"
ECHO ] >> "%%~nf.tags"
)
FOR /D %%d IN (*) DO (
    CD %%d
    CALL :treeProcess
    CD ..
)

EXIT /b
3
Support - (fb2k) / Re: (FB2k v1.4) Random crashes
Last post by Case -
Are those at the end of the logs? I was hoping that the logs would pinpoint a directory or a file that causes problems. For example if last line showed 'Opening track for playback: "E:\SteamLibrary\SteamApps\common\Red Orchestra 2\Engine\Shaders\TerrainVertexFactory.usf"' testing opening the mentioned track alone might be helpful.
9
Opus / Re: Suggestion for a simple psychoacoustic improvement: transient bit-boost.
Last post by Photon -
Even in mp3 there are long & short blocks - you can spend given amount of bits on a short block to encode temporally demanding transient with less tonal resolution, or you can encode with a long block a rich sustained sound for higher tonal resolution at the cost of temporal resolution. I doubt opus would be so efficient if it hadn't similar mechanisms.
I'm already aware that OPUS encodes transients differently just by skimming through the paper: https://arxiv.org/pdf/1602.04845.pdf

I'm talking about boosting bitrate for transient frames beyond the default behaviour (either by tweaking an existing parameter, or adding a new one).

OPUS is already excellent, don't get me wrong -- just interested in slightly different tunings to squeeze a little more out of it.
SimplePortal 1.0.0 RC1 © 2008-2018