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.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th January 2019, 06:31   #21  |  Link
EmKayVe
Registered User
 
EmKayVe's Avatar
 
Join Date: Dec 2018
Posts: 18
Quote:
Originally Posted by Selur View Post
I used the default values there for desat&peak, see: https://www.ffmpeg.org/ffmpeg-all.html#tonemap-1
While at is has anyone tested tonemap_opencl ? (see: https://www.ffmpeg.org/ffmpeg-all.ht...map_005fopencl)
Got it ok I'll give it a shot thanks.

So my output files (from the code I used in #14) for a UHD/HDR to HD/SDR are approximately 2-3GB in size. This is unusually low compared to the output files I get from Handbrake (HEVC/CRF18/Slow) with a normal HD Blu Ray rip (same file). Is FFmpeg compressing more heavily than Handbrake?

Edit: also, I tried using the code you provided with no luck. CMD said it wasn't a command. Again, new to FFmpeg and trying to understand each command and its structure.

Last edited by EmKayVe; 8th January 2019 at 17:01.
EmKayVe is offline   Reply With Quote
Old 12th February 2019, 05:51   #22  |  Link
EmKayVe
Registered User
 
EmKayVe's Avatar
 
Join Date: Dec 2018
Posts: 18
Subtitles? Yep... I just realized I have a movie that needs English subs for Spanish speaking parts and the encoder didn't include them. Anyway to mux these back in? Perhaps there is a guide?
EmKayVe is offline   Reply With Quote
Old 22nd February 2019, 15:42   #23  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,042
Quote:
Originally Posted by qyot27 View Post
I don't know if/how well FFmpeg can handle LFE mixing. Most of the time when I process my (4K or not) Blu-ray rips for watching on my desktop, I use eac3to to downmix and mix the LFE channel into the stereo signal (then encode the result to Opus and remux with the original video stream) so that when watching it back with mpv it doesn't cause nasty clipping when I try to use any volume boosting.

Of course, if you've got the right speaker setup, this is probably a completely moot point, but it is something to consider if not.

Usually LFE is ignored during downmixing (Dolby recommendation - personally i think this is due high risk of over-ranging but sane amount of LFE should be fine). Personally i use private down-mix:

for more than 5.1 to 5.1 scheme (critical feedback appreciated - didn't found anything on this topic - also Dolby documentation not very helpful)

Code:
"pan=5.1(side)|FL<1.414FL+FLC|FR<1.414FR+FRC|FC<2.828FC+FLC+FRC|LFE=LFE|SL<SL+BL|SR<SR+BR,aresample=resampler=soxr:osr=48000:cutoff=0.990:dither_method=0"
or quite classic 5.1 (compatible with 5.1 side and rear) to 2.0 downmixing (additional dynamic normalizer and resampler to 48k active)

Code:
"pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE,dynaudnorm=p=1/sqrt(2):m=100:s=20,aresample=resampler=soxr:osr=48000:cutoff=0.990:precision=20"

or quite interesting HRTF based downmixed (main intention is headphone listening for example on your portable audio device
7.1 to 2.0@HRTF:

Code:
"[0:a:0]aformat=channel_layouts=7.1,aresample=resampler=soxr:osr=48000:cutoff=0.990:dither_method=0,asplit[71][sofai];[sofai]sofalizer=sofa=dodeca_and_7channel_3DSL_HRTF.sofa:gain=11:lfegain=9[sofao]"
File 'dodeca_and_7channel_3DSL_HRTF.sofa' is a HRTF coefficient set available for example in VLC distribution
pandy is offline   Reply With Quote
Old 22nd February 2019, 15:50   #24  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,042
Quote:
Originally Posted by EmKayVe View Post
Subtitles? Yep... I just realized I have a movie that needs English subs for Spanish speaking parts and the encoder didn't include them. Anyway to mux these back in? Perhaps there is a guide?
Same as adding audio track to existing set

https://superuser.com/questions/1140...-existing-file

However you may wish to add additional metadata info (for example language descriptor) about this sub.
It can be done like this:
Code:
-map 1? -c:s copy -metadata:s:s:0 language=eng
question mark perform conditional processing - i.e. if input is not present ffmpeg will continue without error - useful thing for large scripts doing universal (many files) processing
pandy is offline   Reply With Quote
Old 22nd February 2019, 15:54   #25  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,042
Quote:
Originally Posted by EmKayVe View Post
Got it ok I'll give it a shot thanks.

So my output files (from the code I used in #14) for a UHD/HDR to HD/SDR are approximately 2-3GB in size. This is unusually low compared to the output files I get from Handbrake (HEVC/CRF18/Slow) with a normal HD Blu Ray rip (same file). Is FFmpeg compressing more heavily than Handbrake?

Edit: also, I tried using the code you provided with no luck. CMD said it wasn't a command. Again, new to FFmpeg and trying to understand each command and its structure.
Asking such details you need to provide your command set - it may be case where default values used by ffmpeg are different than desired - x265/x264 are using private settings and not all ffmpeg global commands are mapped to external libraries (as ffmpeg use many external libraries side to own codecs).

for example my command line (script) may look like this:

Code:
@SET x264opts="crf=%vq%:level=4.1:qpmin=8:cabac=1:keyint=infinite:no-deblock=1:no-mbtree=1:me=dia:rc-lookahead=5:ref=3:subme=0:no-weightb=1:weightp=0:trellis=0:no-scenecut=1:no_psnr=1:no_ssim=1:fullrange=on:overscan=show:colorprim=bt709:transfer=bt709:colormatrix=bt709"

@ffmpeg.exe -hide_banner -v 32 -stats -y -color_range 2 -loop 1 -r 1 -i "%fimage%" -i "%faudio%" -vf %vproc% -c:v libx264 -preset faster -tune stillimage -profile:v high -level:v 4.1 -x264opts %x264opts% -x264-params %x264opts% -color_range 2 -c:a libfdk_aac -b:a 8k -af %aproc% -sn -dn -shortest -movflags faststart -f mp4 "%~n2_%~n1.mp4"
pandy is offline   Reply With Quote
Old 8th March 2019, 02:24   #26  |  Link
EmKayVe
Registered User
 
EmKayVe's Avatar
 
Join Date: Dec 2018
Posts: 18
Quote:
Originally Posted by pandy View Post
Asking such details you need to provide your command set
Thanks pandy, here is my code:

Code:
ffmpeg.exe -i D:\Videos\Media\Temp\video.mkv -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p,zscale=s=1920x1080 -map 0:v:0 -map 0:a:0 -map 0:a:0 -c:a:0 ac3 -c:a:1 aac -ac:a:1 2 -c:v libx265 -crf 20 -preset slower D:\Videos\Media\Temp\output.mp4
Looking for a "burn in" (since the output container is .mp4) of the 3rd subtitle track which is English.
EmKayVe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.