VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Hi,

    The plex app on android tv/shield tv is pretty shit at downmixing 5.1 to stereo with loud scenes being extra loud and quite scenes being barely audible. Right now I'm using the scripts on this thread as a solution, which tbh is near perfect when using the 3rd script (loudnorm). But I feel like it could still be better. I wanna know if there's a way to check how PotPlayer on my PC is handling the downmixing and edit the ffmpeg scripts to reproduce the same results? (I tried so many different solutions to make plex handle this issue but nothing worked)

    thank you.
    Quote Quote  
  2. Try my clever FFmpeg GUI. It contains a special command line for downmixing 5.1 to stereo.
    Load your video, click Main, click Modify Audio Stream, click Continue, select the output, select the bitrate, click 5.1 to 2 (Channels), click Convert. Done.
    If you like the new audio file, remux it with the video.
    Quote Quote  
  3. Member
    Join Date
    Mar 2011
    Location
    Nova Scotia, Canada
    Search Comp PM
    Unless you're looking at this as a scripting exercise, what you want to do is SO much easier using Audacity. That's a very solid and well documented program.
    Quote Quote  
  4. I've used Audacity before, but never like this, so I'm not sure. I'll have a look at both clever ffmpeg gui and audacity. But what I want is to edit the script (which is a batch script) in a way that makes it copy exactly what the PotPlayer ffmpeg built in decoder is doing when I'm playing 5.1 audio.
    Quote Quote  
  5. Originally Posted by xweel View Post
    I wanna know if there's a way to check how PotPlayer on my PC is handling the downmixing
    Preferences -> Audio (left pane) -> Mixer Level (right pane). But the defaults are simply 100 percent for each.
    Quote Quote  
  6. I did check that, but wasn't sure if that's what I was looking for because they were all at 100%, which I'm guessing is basically the first script on that plex thread I linked above.
    Click image for larger version

Name:	GbTrb.png
Views:	26
Size:	62.9 KB
ID:	54271
    Quote Quote  
  7. You're probably using the normalizer in addition to the mixer.

    I've use this to boost the center channel on some recordings:

    Code:
    ffmpeg -y -i %1 -vcodec copy -ac 2 -af "pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE+0.125BR|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE+0.125BL" -acodec aac -b:a 160k "%~dpn1.new.mp4"
    But that doesn't limit dynamic range.
    Quote Quote  
  8. This is the script I used
    Code:
    ffmpeg -y -i "%%A" -map 0:v -c:v copy -map 0:a:0? -c:a:0 copy -map 0:a:0? -c:a:1 aac -ac 2 -filter:a:1 "loudnorm" -ar:a:1 48000 -b:a:1 192k -metadata:s:a:1 title="Eng 2.0 Stereo" -metadata:s:a:1 language=eng -map 0:a:1? -c:a:2 copy -map 0:a:2? -c:a:3 copy -map 0:a:3? -c:a:4 copy -map 0:a:4? -c:a:5 copy -map 0:a:5? -c:a:6 copy -map 0:a:6? -c:a:7 copy -map 0:s? -c:s copy "ffmpegOut/%%~nA_Stereo_LoudNorm.mkv
    now I 'm thinking I should just use this one instead. Will try now

    Code:
    ffmpeg -y -i "%%A" -map 0:v -c:v copy -map 0:a:0? -c:a:0 copy -map 0:a:0? -c:a:1 aac -b:a:1 192k -ac 2 -metadata:s:a:1 title="Eng 2.0 Stereo" -map 0:a:1? -c:a:2 copy -map 0:a:2? -c:a:3 copy -map 0:a:3? -c:a:4 copy -map 0:a:4? -c:a:5 copy -map 0:a:5? -c:a:6 copy -map 0:a:6? -c:a:7 copy -map 0:s? -c:s copy "ffmpegOut/%%~nA_Stereo.mkv"
    Quote Quote  
  9. First one has the loudnorm filter included, which I liked at first, but I'm not sure anymore. I want it to be as close as to what potplayer is doing on my PC
    Quote Quote  
  10. I meant you are probably using potplayer's normalizer in addition to its mixer. It's the normalizer that's responsible for the reduced dynamic range, not the mixer.
    Quote Quote  
  11. Member
    Join Date
    Dec 2012
    Location
    Germany
    Search Comp PM
    here are the ffmpeg scripts, just rename .txt to .bat and execute the .bat with the ffmpeg.exe in the same folder
    https://www.dropbox.com/sh/rebtkv4wtd9i7ra/AAD9FM4IVM5-_T5TgWBRhnDia?dl=0

    "-ac 2" audio channels 2 bam it's downmixed

    Code:
    pushd "%2"
    
    for /R %%A in (*.mp4, *.avi, *.mov, *.wmv, *.ts, *.m2ts, *.webm, *.mkv) do (
        echo Processing %%A
        ffmpeg -i "%%A" -c:v copy -c:a libvorbis -ar 32000 -ac 2 -b:a 112k -map 0 "%%~dnpA-p.mkv"
        echo Processed %%A
    )
    pause
    Last edited by Zero-11; 28th Jul 2020 at 13:40.
    Quote Quote  
  12. This script seems perfect, but what does it do differently than the script I showed above? Is this closer to potplayer's downmixing? I don't think I'm using the normalizer in potplayer because it's not checked.
    Also it keeps processing the output file after finishing the original file resulting in a never ending script xD
    Quote Quote  
  13. Originally Posted by xweel View Post
    Also it keeps processing the output file after finishing the original file resulting in a never ending script xD
    Because the FOR loop sees the MKV file ffmpeg just created and proceeds to convert it too. Then when it's done with that there's another new MKV file to be processed, ad nauseam. It's stuck in an endless loop. You need to put the files in a different location. Or only convert non-MKV files to MKV files.
    Quote Quote  
  14. Originally Posted by Zero-11 View Post
    Code:
    pushd "%2"
    
    for /R %%A in (*.mp4, *.avi, *.mov, *.wmv, *.ts, *.m2ts, *.webm, *.mkv) do (
        echo Processing %%A
        ffmpeg -i "%%A" -c:v copy -c:a libvorbis -ar 32000 -ac 2 -b:a 112k -map 0 "%%~dnpA-p.mkv"
        echo Processed %%A
    )
    pause
    This script contains no downmix improvement...
    Quote Quote  
  15. I thought the script I used also had no improvements, but idk...
    Quote Quote  



Similar Threads