VideoHelp Forum




+ Reply to Thread
Page 2 of 3
FirstFirst 1 2 3 LastLast
Results 31 to 60 of 71
  1. Originally Posted by overlookmotel View Post
    Horace did you ever get to the bottom of this? I'm having exactly the same problem, with a 5.1 MOV file created in FFMPEG playing back in VLC with the centre channel coming through the left speaker only. (this is with VLC downmixing the 5.1 to stereo - I only have 2 speakers).
    In Horace's case the problem was re-mapping the channels when they didn't need remapping.

    Originally Posted by overlookmotel View Post
    I've tried setting FFMPEG's output layout to 5.1 and 5.1(side) and it makes no difference. In VLC it plays back with the centre channel being played through left only.
    Here's my FFMPEG command:
    ffmpeg -i input.mov -filter_complex "[0:1]pan=FL|c0=c0[ch0];[0:1]pan=FR|c0=c1[ch1];[0:2]pan=FC|c0=c0[ch2];[0:2]pan=LFE|c0=c1[ch3];[0:3]pan=SL|c0=c0[ch4];[0:3]pan=SR|c0=c1[ch5];[ch0][ch1][ch2][ch3][ch4][ch5]amerge=inputs=6[aout]" -c:v copy -c:a pcm_s16le -map 0:0 -map [aout] output.mov
    # NB stream 0 is video, streams 1-3 the 3 x stereo audio streams
    If this helps at all, as an experiment I created 3 wave files. The first Front left/right, the second Centre and LFE, and the third, Surround left/right. I muxed them as an MKA in that order and then used this command line to output an MKA containing a single 5.1ch PCM audio stream with the channels in the correct order.

    ffmpeg -i 3.mka -filter_complex amerge=inputs=3 -c:a pcm_s16le output.mka

    Click image for larger version

Name:	ffmpeg.gif
Views:	1227
Size:	18.8 KB
ID:	36970

    Originally Posted by overlookmotel View Post
    Cornucopia mentioned earlier in this thread that "MOV container (and by extension, MP4) has NAMED channels and so will tell you exactly how (in what order) those channels are listed, whether using industry convention order (SMPTE/AES/EBU) or not. Unless I'm mistaken, for those formats, the order does not matter, as they are retrieved by name, not number."
    I'll go on the record as still not agreeing with that one.

    For playback of multi-channel files, it might help to use a player that visually shows what's happening in each channel (given you're listening in stereo as I am). If you're using Windows, ffdshow displays the individual channel volumes in it's volume filter, or foobar2000's output meter adapts according to the number of channels being decoded and their layout. It can help to at least see where stuff is when it's not where it's supposed to be.

    Name:  foobar.gif
Views: 2948
Size:  5.7 KB
    Last edited by hello_hello; 10th May 2016 at 21:15.
    Quote Quote  
  2. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by hello_hello View Post
    ffmpeg decodes the following by mapping the surround channels to the back channels in wave file format. ie L, R, C, LFE, BL, BR
    AAC (M4A) - (FDKAAC, ffmpeg's AAC, NeroAAC, FhGAAC, QAAC)
    Apple Lossless (M4A)
    Opus
    Ogg
    WMA 9.2 (WMAEncode)
    WMA 10 (WMAEncode)
    ffmpeg decodes the following by mapping the surround channels to the side channels in wave file format ie L, R, C, LFE, SL, SR
    AC3
    DTS
    ffmpeg decodes the following by mapping the surround channels to the channels specified in the file (back or side)
    FLAC
    Wave
    Wavepack
    Helpful post.

    I have an MKV file with AC3-5.1 audio (layout: Channel layout: L R C LFE Ls Rs). When I run it through an AviSynth script, ffmpeg recognizes it as 5.1(side), but the layout in the outputted MP4 (encoder AAC) file is "Channel layout: L R C Cb Lb Rb".

    Is this 100% correct?
    I think if ffmpeg recognized the audio as 5.1(side), it should be "Ls Rs." The LFE channel is also labeled Cb, not LFE.
    Last edited by rgr; 2nd Sep 2025 at 03:43.
    Quote Quote  
  3. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    I added the following to the ffmpeg command line:

    -channel_layout "5.1"

    but instead of the expected "L R C LFE Ls Rs" I now have "C L R Ls Rs LFE". So it's worse than before. Do you have any advice?
    Quote Quote  
  4. Different codecs use different channel orders for encoding, but they're decoded and remapped to the wave file channel order. MediaInfo displays the encoded channel order these days, rather than the decoded channel order.

    L R C LFE Ls Rs
    is the correct encoding order for 5.1ch AC3, where "s" is "surround".

    C L R Ls Rs LFE
    is the correct encoding order for 5.1ch AAC, where once again "s" is "surround" unless there's a PCE (program configuration element) specifying the channels. The AAC spec says encoding should start with the front centre channel, if it exists, encode the stereo channels in pairs from front to back and end with the back centre channel, if there is one. LFE is a "special" type of channel, encoded individually.

    For 5.1ch AAC, ffmpeg uses PCE's to encode it as 5.1ch (side) by default (according to the ffmpeg log file), but from what I've been able to tell it doesn't follow the AAC spec for the encoded channel order, and as a result MediaInfo seems to be interpreting it as L R C Cb Lb Rb. Despite that, foobar2000 decodes it correctly as FL FR, C, LFE, BL BR (in wave file channel order).
    When you add -channel_layout "5.1" to the command line, ffmpeg doesn't use PCE's to specify the channel layout, but it seems to be encoded in the correct order according to the AAC spec, so it's always decoded correctly.

    There's an old thread on the topic here.
    https://forum.videohelp.com/threads/401826-FFMPEG-changing-audio-channel-position#post2621729
    Or try a google search using "L R C Cb Lb Rb".

    Drilling down with MediaInfo's debug mode, this is what I'd expect to see (and do see when -channel_layout "5.1" is used).
    It's also what you'd see when encoding 5.1ch audio with QAAC.

    Code:
    000000B8   raw_data_block (923 bytes)
    000000B8    SCE - single_channel_element (93 bytes)
    000000B8     id_syn_ele:                         0 (0x0) - (3 bits) - SCE - single_channel_element
    000000B9    CPE - channel_pair_element (521 bytes)
    00000115     id_syn_ele:                         1 (0x1) - (3 bits) - CPE - channel_pair_element
    000000B8    CPE - channel_pair_element (918 bytes)
    000002C2     id_syn_ele:                         1 (0x1) - (3 bits) - CPE - channel_pair_element
    000000BE    LFE - lfe_channel_element (915 bytes)
    0000044E     id_syn_ele:                         3 (0x3) - (3 bits) - LFE - lfe_channel_element
    000000B9    END - End (921 bytes)
    00000451     id_syn_ele:                         7 (0x7) - (3 bits) - END - End
    00000452    byte_alignment:                      0 (0x0) - (6 bits)
    Without -channel_layout "5.1" in the command line:

    Code:
    000003CC   raw_data_block (834 bytes)
    000003CC    CPE - channel_pair_element (261 bytes)
    000003CC     id_syn_ele:                         1 (0x1) - (3 bits) - CPE - channel_pair_element
    000003CF    SCE - single_channel_element (556 bytes)
    000004D1     id_syn_ele:                         0 (0x0) - (3 bits) - SCE - single_channel_element
    000003CC    SCE - single_channel_element (562 bytes)
    000005FB     id_syn_ele:                         0 (0x0) - (3 bits) - SCE - single_channel_element
    000003CF    CPE - channel_pair_element (830 bytes)
    000005FE     id_syn_ele:                         1 (0x1) - (3 bits) - CPE - channel_pair_element
    000003CC    END - End (833 bytes)
    0000070D     id_syn_ele:                         7 (0x7) - (3 bits) - END - End
    0000070D    byte_alignment:                      0 (0x0) - (5 bits)
    I don't know why ffmpeg seems to change the encoded channel order for 5.1ch (side), or why MediaInfo interprets it as L R C Cb Lb Rb. As I said, foobar2000 (and therefore ffmpeg) decodes it correctly.
    Last edited by hello_hello; 2nd Sep 2025 at 11:36.
    Quote Quote  
  5. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by rgr View Post
    I added the following to the ffmpeg command line:

    -channel_layout "5.1"

    but instead of the expected "L R C LFE Ls Rs" I now have "C L R Ls Rs LFE". So it's worse than before. Do you have any advice?
    OK, after reading the manual, I see that the "C L R Ls Rs LFE" layout is correct for AAC5.1. However, in foobar I see that the channel order doesn't change -- LFE is still in 4th position instead of 6th. Doesn't ffmpeg do the channel swapping automatically? Do I have to change it manually?
    Quote Quote  
  6. foobar2000's output meter always displays the decoded audio in the wave file channel order, not necessarily the channel order the codec used to encode it.

    Image
    [Attachment 88512 - Click to enlarge]


    Try this (Surround = side. Rear surround = back).
    Image Attached Files
    Quote Quote  
  7. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by hello_hello View Post
    L R C LFE Ls Rs
    is the correct encoding order for 5.1ch AC3, where "s" is "surround".

    C L R Ls Rs LFE
    is the correct encoding order for 5.1ch AAC
    Yes, I figured it out. OK.

    For 5.1ch AAC, ffmpeg uses PCE's to encode it as 5.1ch (side) by default (according to the ffmpeg log file), but from what I've been able to tell it doesn't follow the AAC spec for the encoded channel order, and as a result MediaInfo seems to be interpreting it as L R C Cb Lb Rb. Despite that, foobar2000 decodes it correctly as FL FR, C, LFE, BL BR (in wave file channel order).
    So by default it should be encoded correctly and played correctly? Only internally the order will be inconsistent with the recommendations?

    When you add -channel_layout "5.1" to the command line, ffmpeg doesn't use PCE's to specify the channel layout, but it seems to be encoded in the correct order according to the AAC spec, so it's always decoded correctly.
    But in the foobar on the oscillator, I saw that the channel order hadn't changed. Center in 3rd position, LFE in 4th.
    Last edited by rgr; 3rd Sep 2025 at 04:46.
    Quote Quote  
  8. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by hello_hello View Post
    MediaInfo displays the encoded channel order these days, rather than the decoded channel order.
    a) encoded mp4 without -channel-layout
    MediaInfo: L R C Cb Lb Rb
    Foobar: FL FR FC LFE BL BR (matches what I see on the oscilloscope -- center 3rd from the top, LFE 4th from the top)

    b) encoded mp4 WITH -channel-layout "5.1"
    MediaInfo: C L R Ls Rs LFE (looks perfect for AAC 5.1)
    Foobar: still FL FR FC LFE BL BR (matches what I see on the oscilloscope)

    c) encoded mp4 WITH -channel-layout "5.1(side)"
    MediaInfo: L R C Cb Lb Rb
    Foobar: still FL FR FC LFE BL BR (matches what I see on the oscilloscope)


    So Foobar will always show the channel order on the oscillator according to WAV? So if I always have the same order, does this mean that regardless of whether I use -channel_layout "5.1" / "5.1(side)" or not, the encoding is correct?

    -channel_layout "5.1" seems to be the best option, as MediaInfo shows the correct order for AAC5.1. However, the source MKV is "5.1(side)".
    Quote Quote  
  9. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    I've added a ticket to the ffmpeg bug tracker regarding this issue, It's here.
    https://trac.ffmpeg.org/ticket/7384#comment:14
    I see the ticket is still open. But the comments were helpful -- channel_layout "5.1" is recommended.
    Quote Quote  
  10. I'm only guessing about ffmpeg 5.1ch (side) not using the standard AAC channel order for encoding, based on what I see using MediaInfo in debug mode, but yes it does seem to change the encoding order. It uses PCEs to specify the channel layout though, so it should still be decoded correctly.

    Because there's no such thing as "surround" channels in the wave file channel layout, I think originally the back channels were used as surround when they're decoded, as "back" comes directly after LFE in the wave file channel order. That was before 7.1ch was a thing though. It added the extra surround channels to the rear, so for consistency it's becoming standard practice to decode the 5.1ch surround channels as "side". According to the "Use legacy 5.1ch layout" option in LAV filters, "back" as surround for 5.1ch is the legacy format.

    Having said that though, QAAC expects the input surround channels to be the back channels by default. https://github.com/nu774/qaac/wiki/Multichannel--handling

    Why, when 5.1ch AAC is encoded as "side" by ffmpeg, it's decoded as "back" by foobar2000, I do not know, but as foobar2000 uses ffmpeg to decode, it probably means ffmpeg decodes it that way. And I assume unless the 5.1ch AAC has a PCE to specify the side channels as surround, its up to the decoder to decide how those surround channels should be decoded, in respect to whether they're decoded as back or side channels.

    As a quick experiment I encoded a 5.1ch AC3 file, which fb2k decodes as side, as a wave file and the wave file used the side channels for surround. When I re-encoded the wave file as AAC with QAAC, the surround channels become "back". When I encoded it as flac with flac.exe it was encoded using the side channels, but when I encoded it as flac with ffmpeg (using fb2k) the flac file was decoded with the back channels as surround.

    I'm not sure why there's an inconsistency but I don't think it matters. Lossy encoders will accept either the side or back channels as surround when encoding 5.1ch, so it probably doesn't matter much which way those surround channels are decoded.
    Last edited by hello_hello; 3rd Sep 2025 at 13:13.
    Quote Quote  
  11. Originally Posted by hello_hello View Post
    foobar2000's output meter always displays the decoded audio in the wave file channel order, not necessarily the channel order the codec used to encode it.

    Image
    [Attachment 88512 - Click to enlarge]

    @ hello_hello
    I do not have foobar2000's output meter.
    At least I do not have anything like the picture you posted.
    My version is not too old but not the latest version.
    Quote Quote  
  12. The screenshot above is actually taken from the top of the Matrix Mixer DSP window, simply to show the wave file channel order.
    It's been abandoned by the author and it's not listed on the fb2k website for some reason, but for 32 bit fb2k it still works fine. It's handy if you want to downmix or remap channels or adjust channel volumes etc.
    https://www.softpedia.com/get/Multimedia/Audio/Audio-Plugins/foo-dsp-mm.shtml

    Image
    [Attachment 88545 - Click to enlarge]


    It was the Peak Meter UI element that I posted a screenshot of much earlier in this thread. You can add it as an element to the GUI in layout editing mode. I've added it twice. A small version under one tab, and a larger version under another for when I want to view the channel layout. Alternatively you can enable it separately via the "View/Visualisations/Peak Meter" menu. You can also right click on it somewhere to run it in full screen mode.

    Image
    [Attachment 88544 - Click to enlarge]
    Quote Quote  
  13. I just realised MediaInfo's debug mode displays both the encoded channel order, and the channels to which it thinks (I assume) the audio should be decoded.

    Code:
    Channel(s)                               : 6
    Channel(s)                               : 6 channels
    Channel positions                        : Front: L C R, Side: L R, LFE
    Channel positions                        : 3/2/0.1
    Channel layout                           : C L R Ls Rs LFE
    It still displays an odd layout for AAC 5.1ch (Side) encoded by ffmpeg though.

    Code:
    Channel(s)                               : 6
    Channel(s)                               : 6 channels
    Channel positions                        : Front: L C R, Side: C, Back: L R
    Channel positions                        : 3/1/2
    Channel layout                           : L R C Cb Lb Rb
    Quote Quote  
  14. @ hello_hello,
    Is there an easy way to enable Matrix Mixer in foobar2000 ?
    Like adding it to the View/DSP list.
    The only way I found was to go to File/Preferences/Playback/DSP Manager then double click on Matrix Mixer in the Active DSP's window.
    Quote Quote  
  15. cholla,
    There's no quicker way to open it that I'm aware of, but once it's added to the active DSPs list and opened you can leave it open while changing the MM configuration, then click Preview down the bottom. It might take a second or two, but your changes should be applied and the result will be reflected in a change to the Peak Meter display, assuming you've changed the number of channels, otherwise any volume change in the channels should be applied.

    You're probably aware you can create DSP presets. For instance I have a DSP preset for downmixing 5.1ch to stereo that simply looks like the screenshot below. Both the side and back channels are added for downmixing so it doesn't matter how the surround channels are decoded.
    When you check the "normalise" box the matrix mixer reduces the volume so the combined channels can't result in clipping. Its a "worst case scenario" reduction though, so the output audio can be quieter than it needs to be (the same presets can be applied when converting). Without the "Normalise" option checked, you can specify the volume reduction. A 6dB reduction is usually plenty, so for that you'd specify 0.5 as the multiplier value on the right, but it pays to scan the downmixed audio to check the peaks aren't clipped when "Normalise" is disabled.

    DSP presets can be added to the toolbar for playback. You can see the menu in the top left of my screenshot. I think adding DSPs to the View/DSP menu is done using a foobar2000 API and therefore DSPs have to be designed to use that menu, but I'm not really sure.

    Image
    [Attachment 88562 - Click to enlarge]


    Here's my preset for downmixing 7.1ch to stereo. I think it's similar to the way MeGUI uses Avisynth to do it.
    The first instance of MM combines the back and side channels into the side channels with a volume of 1, and without Normalising. The rest of the channels are passed through normally.
    The first instance of Amplify increases the volume by 1.5dB. The Advanced Limiter seems to need the peaks to be +1.5db in order to reduce them enough.
    The second instance of Amplify decreases the volume by 1.5dB, so hopefully any limited peaks in the side/surround channels will now be 0dB or less.
    The second instance of MM is configured to downmix 5.1ch to stereo, using the same sort of downmix as for 5.1ch, although it only needs to downmix the side channels as surround. "Normalise" is enabled for the second MM instance.

    Image
    [Attachment 88563 - Click to enlarge]


    By the way, fb2k comes with a DSP for automatic downmixing these days, but I don't know what sort of matrix is used or whether it normalises. I haven't played with it much.
    Last edited by hello_hello; 5th Sep 2025 at 03:51.
    Quote Quote  
  16. @ hello_hello,
    You are way beyond what I have done with foobar2000.
    I did update to the newest version & have the GUI set like the older version.
    The components added that I have from the older version.
    Keeping any that are newer.
    I do plan on doing some testing with what you posted & see what I get.
    Quote Quote  
  17. cholla,

    if you want to, try this:

    Install a second instance of fb2k as a portable version (it has to be 32 bit foobar2000) and while fb2k is closed, replace the profile folder with the one in the attached zip file. For the portable fb2k it's located in the same folder as foobar2000, so you should extract fb2k to somewhere it can write to it's own folder, or run it with administrator privileges. That way you can run the portable version with my configuration, without touching your current setup. The DSPs are 32 bit versions so you'll need to be using a 32 bit version of fb2k. You'll have to go into preferences and add your Media Library folder if you want fb2k to use it.

    My setup is configured to use two different fonts. One is Noto Sans and the other is Bitstream Vera Sans Mono. You should be able to download them from here. The text display area needs a mono space font to look nice, so if you install those fonts first it'll probably be easier than having to change them.
    https://www.1001fonts.com/noto-sans-font.html
    https://www.1001fonts.com/bitstream-vera-sans-font.html

    All the encoders I have presets for are saved in a "C:\Encoders" folder. The attached zip file also contains that folder. If you save it to the same location hopefully all of my conversion presets will work. The encoders folder contains 64 bit versions where applicable. FB2k uses a command line to run the encoders, so you can use them with 32 bit foobar2000, assuming you're running a 64 bit version of Windows. Oh... and the ffmpeg folder is empty so you'll have to put ffmpeg.exe and ffprobe.exe in there. I deleted them to keep the file size down as they're quite large.

    There may be a couple of other PC specific settings that need changing. I can't remember, but hopefully the above will be enough for everything to work.

    Edit: I said originally that ffmpeg and ffplay need to be added to the Encoders/ffmpeg folder, but it's actually ffmpeg.exe and ffprobe.exe that are needed, although it wont hurt to add all three.
    Image Attached Files
    Last edited by hello_hello; 6th Sep 2025 at 05:47.
    Quote Quote  
  18. @ hello_hello,
    My main computer is Windows 7 32-bit.
    My laptop is Windows 7 64-bit but I don't use it for conversions.
    I followed your instructions.
    I downloaded the two fonts but I'm not sure where I should put them.
    The font in your f2k portable looked OK & I could read them.
    I kept getting this error for any conversion I tried:
    Image
    [Attachment 88581 - Click to enlarge]


    Even though it said this"1 out of 1 files converted with major problems."
    No file was created.
    I believe the main problem is this: "Conversion failed: Could not start command line encoder: Machine type mismatch."
    Especially "Machine type mismatch".

    I was able to do some conversions. .mp3 , .wav , .some .ac3, some .aac but none of the apple related .aac.
    or qaac or Exhale .
    Also a small problem I fixed .The Encoder folder had a capital E in the .zip file.
    In the preferences the encoder folder had a small e. So fb2k could not find ffmpeg.
    Once changed it worked fine.

    Before I alter it any do you have any suggestions?
    Last edited by cholla; 6th Sep 2025 at 11:57.
    Quote Quote  
  19. Windows isn't case sensitive, so upper or lower case E for the folder name should be okay.

    If you're referring to Encoders in preferences somewhere like "Playback/Decoding/FFmpeg Decoder Wrapper", that's a decoding configuration and probably disabled for decoding anyway. The ffmpeg wrapper is mainly intended for decoding formats that fb2k doesn't natively support, and I discovered today (it was recently updated) that the way options for the codecs are specified has changed, so it won't work for many formats the way it is. It's easy to fix though, I'll explain it shortly.

    The conversion errors are no doubt due to many of the encoders being 64 bit while your OS is 32 bit. Ive attached another folder containing 32 bit versions. I've kept it updated along with the 64 bit versions but I haven't used any of them in quite a while. Hopefully they'll be fine.

    Once you've downloaded the fonts and unpacked them if need be, in Windows 11 you can open Settings, then go to Personalisation/Fonts. At the top of that page is a menu for installing fonts. Windows will copy them to it's fonts folder and probably add appropriate registry entries for them, so they'll be included in the list of available fonts for programs to use. The process is similar for Windows 7 but they're probably installed via the Control Panel. I can't remember. Try google if need be.

    The main difference you'll see is the text area. It probably looks something like this at the moment:

    Image
    [Attachment 88589 - Click to enlarge]


    But with the mono-space font it's configured to use:

    Image
    [Attachment 88590 - Click to enlarge]


    Back to the ffmpeg decoder wrapper....
    It should be near the top of the decoders list here and probably not checked.

    Image
    [Attachment 88583 - Click to enlarge]


    Double clicking on it's entry should take you here:

    Image
    [Attachment 88584 - Click to enlarge]


    The selected formats will be decoded by ffmpeg when the ffmpeg wrapper is enabled in the Decoders list instead of any native foobar2000 decoder.
    For AC3, EAC3, DTS, or a container that may contain a codec that uses dynamic range compression, you should double click on each entry to open the configuration and change it to look like this. For the AC3 entry it's:

    AC3
    *.AC3
    -drc_scale 0 -i %s

    For the moment, make sure only "show codec names from ffmpeg" is checked.

    Image
    [Attachment 88585 - Click to enlarge]


    For the remaining formats there should be nothing in the options section.

    Image
    [Attachment 88586 - Click to enlarge]


    None of that's important now as it's just extra decoding options, but I discovered there was a problem today so I thought I'd let you know how to fix it so there's no decoding errors when the ffmpeg decoder wrapper is enabled.

    The Command Line Decoder Wrapper can use any command line decoder. I've never had much need for it but I created a preset for decoding EAC3 with ffmpeg just to test it. The old command line doesn't work though, it needs to look like this.

    ffmpeg.exe -drc_scale 0 -i %s -c:a pcm_f32le -f W64 -

    or possibly this for 32 bit Windows:

    ffmpeg.exe -drc_scale 0 -i %s -c:a pcm_f32le -f wave -

    I hadn't intended to get side-tracked with all of that, but as I said, I only discovered there was a problem with the latest version of the ffmpeg decoder wrapper today. Below is a zip file with the 32 bit encoders, The ffmpeg folder is once again empty.
    Image Attached Files
    Last edited by hello_hello; 6th Sep 2025 at 14:32.
    Quote Quote  
  20. @ hello_hello,
    The fb2k you posted is working fine for the most part.
    I tried opening a .VOB & it said "unsupported format."
    I was just going to remove the .vob's audio so I would have a 5.1 to test with.
    I used mkvtoolnix to get the .ac3 file.
    It converted fine with .eac3 & most of the other formats.
    None of the .sox format works.Not a deal breaker for me.
    I added the fonts & fb2k is set to use them.
    I couldn't tell much if any difference on my os.
    The images you posted the newer fonts looked brighter.
    So maybe my os was using a brighter font already.
    Anyway I plan to leave the new fonts installed.

    I did not test any conversions with the 7.1 test file you posted .
    I believe it will also work on most of the conversions.
    Quote Quote  
  21. Originally Posted by cholla View Post
    I tried opening a .VOB & it said "unsupported format."
    You'll need the ffmpeg decoder wrapper enabled under the decoders list, with the "vob" format selected.
    Under the Console tab you should see something like this when you play the file, if you've updated the ffmpeg decoder wrapper formats as I suggested previously.
    Its possibly better to extract the raw streams first when re-encoding anyway, as fb2k doesn't account for any container audio delay.

    Code:
    Opening track for playback: "F:\testing.VOB"
    Launching ffprobe:
    "C:\encoders\ffmpeg\ffprobe.exe" -of xml -show_format -show_streams -show_chapters -hide_banner "F:\testing.VOB"
    Launching ffmpeg:
    "C:\encoders\ffmpeg\ffmpeg.exe" -drc_scale 0 -i "F:\testing.VOB" -map 0:3 -f w64 -acodec pcm_f32le -
    Originally Posted by cholla View Post
    None of the .sox format works.Not a deal breaker for me.
    What does it say in the Console when it fails? I tried both versions and both worked fine. (I have fb2k installed in a 64 bit Wine prefix on Linux, but also in a 32 bit Wine prefix so it can only use 32 bit encoders).
    64 bit encoders can make a fair difference to the speed. Not that it's painfully slow either way.

    Code:
    32 bit SoX:
    
    Converting: "Z:\home\Me\Music\MP3s\Oasis\Oasis - All Around The World.mp3"
    Destination: "O:\Oasis - All Around The World.flac"
    CLI encoder: sox.exe
    Destination file: O:\Oasis - All Around The World.flac
    Encoder stream format: 44100Hz / 2ch / 32bps floating-point
    Command line: sox.exe --ignore-length -t wav - -b 24 -C 8 "Oasis - All Around The World.flac" pitch -72.402796 rate -v
    Working folder: O:\
    
    Encoder process still running, waiting...
    Encoder process terminated cleanly.
    Track converted successfully.
    Total encoding time: 0:18.360, 31.39x realtime
    Code:
    64 bit SoX:
    
    Total encoding time: 0:10.548, 54.65x realtime
    Last edited by hello_hello; 8th Sep 2025 at 07:42.
    Quote Quote  
  22. @ hello_hello;
    First I would like to ask a few questions about post#50.
    In the "Ffmpeg Decoder Wrapper"
    If I understand correctly .Any codec that is checked should have this:
    "-loglevel 0 -drc_scale 0" in the "Additional arguments" box.
    If the format is unchecked the "Additional arguments" box should be blank.

    This :"ffmpeg.exe -drc_scale 0 -i %s -c:a pcm_f32le -f wave -" should be in the "Command Line Decoder Wrapper" ?
    I changed it to :"fmpeg.exe -drc_scale 0 -i %s -c:a pcm_f32le -f wav -".
    So far I can not tell it does anything
    Doe this look correct?
    Image
    [Attachment 88623 - Click to enlarge]


    For post#52:
    I used the Encoders for the 32-bit from the .zip file.
    I added the version of ffmpeg I have.
    It is the one posted by autodidact here:
    https://forum.videohelp.com/threads/414767-ffmpeg-7-0-1-and-Windows-7/page3#post2781425
    I believe I have followed all your directions.
    The .VOB I used is as it is ripped by CloneDVD 2.
    I have not converted it to raw streams.
    This is the repeating "Playback error" window:
    I have to select "Stop" for it to stop.
    Image
    [Attachment 88624 - Click to enlarge]

    This is the "Console" for this .Vob:
    Also I have to select "Stop" for it to stop.
    Code:
    "C:\Users\USER\Desktop\Temp\testing.VOB"
    Automatic resampling: using Resampler (dBpoweramp/SSRC): 48000 Hz, Resampler (RetroArch): 48000 Hz
    Device: Speakers (Realtek High Definition Audio)
    Mix format: 48000 Hz / 32-bit float / 2 channels (0x3)
    Sending stream: 48000 Hz / 32-bit float / 2 channels (0x3)
    Opening track for playback: "C:\Users\USER\Desktop\Temp\testing.VOB"
    Launching ffprobe:
    "C:\encoders\ffmpeg\ffprobe.exe" -of xml -show_format -show_streams -show_chapters -hide_banner "C:\Users\USER\Desktop\Temp\testing.VOB"
    Launching ffmpeg:
    "C:\encoders\ffmpeg\ffmpeg.exe" -i "C:\Users\USER\Desktop\Temp\testing.VOB" -loglevel 0 -drc_scale 0 -map 0:1 -f w64 -acodec pcm_f32le -
    Unable to open item for playback (Unsupported format or corrupted file):
    "C:\Users\USER\Desktop\Temp\testing.VOB"
    Opening track for playback: "C:\Users\USER\Desktop\Temp\testing.VOB"
    Launching ffprobe:
    "C:\encoders\ffmpeg\ffprobe.exe" -of xml -show_format -show_streams -show_chapters -hide_banner "C:\Users\USER\Desktop\Temp\testing.VOB"
    This is the SOX convereion. I use a .mp3 file as you did.
    "Converter Status Report"
    Code:
    1 out of 1 files converted with major problems.
    
    Source: "C:\Users\USER\Desktop\Temp\It's a Long Way to the Top (If You Wanna Rock 'n' Roll).mp3"
      An error occurred while writing to file (The encoder has terminated prematurely with code 2 (0x00000002); please re-check parameters) : "C:\Users\USER\Desktop\Temp\It's a Long Way to the Top (If You Wanna Rock 'n' Roll).flac"
      Additional information:
      Encoder stream format: 44100Hz / 2ch / 32bps floating-point
      Command line: sox.exe --ignore-length -t wav - -b 24 -C 8 "It's a Long Way to the Top (If You Wanna Rock 'n' Roll).flac" pitch -72.402796 rate -v
      Working folder: C:\Users\USER\Desktop\Temp\
      Conversion failed: The encoder has terminated prematurely with code 2 (0x00000002); please re-check parameters
    Console
    Code:
    Opening track for playback: "C:\Users\USER\Desktop\Temp\It's a Long Way to the Top (If You Wanna Rock 'n' Roll).mp3"
    Converting: "C:\Users\USER\Desktop\Temp\It's a Long Way to the Top (If You Wanna Rock 'n' Roll).mp3"
    Destination: "C:\Users\USER\Desktop\Temp\It's a Long Way to the Top (If You Wanna Rock 'n' Roll).flac"
    CLI encoder: sox.exe
    Destination file: C:\Users\USER\Desktop\Temp\It's a Long Way to the Top (If You Wanna Rock 'n' Roll).flac
    Encoder stream format: 44100Hz / 2ch / 32bps floating-point
    Command line: sox.exe --ignore-length -t wav - -b 24 -C 8 "It's a Long Way to the Top (If You Wanna Rock 'n' Roll).flac" pitch -72.402796 rate -v
    Working folder: C:\Users\USER\Desktop\Temp\
    
    An error occurred while writing to file (The encoder has terminated prematurely with code 2 (0x00000002); please re-check parameters) : "C:\Users\USER\Desktop\Temp\It's a Long Way to the Top (If You Wanna Rock 'n' Roll).flac"
    Additional information:
    Encoder stream format: 44100Hz / 2ch / 32bps floating-point
    Command line: sox.exe --ignore-length -t wav - -b 24 -C 8 "It's a Long Way to the Top (If You Wanna Rock 'n' Roll).flac" pitch -72.402796 rate -v
    Working folder: C:\Users\USER\Desktop\Temp\
    
    Conversion failed: The encoder has terminated prematurely with code 2 (0x00000002); please re-check parameters
    Total encoding time: 0:01.406, 0.18x realtime
    Quote Quote  
  23. Originally Posted by cholla View Post
    @ hello_hello;
    First I would like to ask a few questions about post#50.
    In the "Ffmpeg Decoder Wrapper"
    If I understand correctly .Any codec that is checked should have this:
    "-loglevel 0 -drc_scale 0" in the "Additional arguments" box.
    You can add -drc_scale 0 to any of the formats the ffmpeg decoder wrapper is decoding, but it's there to tell ffmpeg to ignore any dynamic range compression metadata (to decode the audio "as-is"). It only applies to Dolby formats (AC3, EAC3 etc) but the default for ffmpeg is to apply the DRC. If ffmpeg is decoding something else the option will just be ignored so you can add it to every format if you prefer. The foobar2000 AC3 decoder, is, I'm fairly sure, configured to ignore the DRC by default, but you can check that in advanced preferences (see the screenshot below).

    Image
    [Attachment 88580 - Click to enlarge]


    If you use the ffmpeg decoder wrapper to decode MKVs or vob files or a container that can contain Dolby formats, then you should add -drc_scale 0 to their command lines also. The remainder can have empty command lines.

    -loglevel 0 shouldn't be necessary. I can't even remember why I added it originally, but it's no longer in any of the command lines in my ffmpeg decoder wrapper configuration.

    You can configure each format with the above "rule of thumb"' whether its selected for decoding or not. If it contains something in the command line it'll be used when that format is selected and the ffmpeg wrapper is used for decoding.

    So you know, you can change the preferred decoder order in the decoder list by dragging them up or down in the list. For the example below:

    The "ffmpeg AC3 decoder" is built into fb2k. As I've dragged it up so it's above the "ffmpeg decoder wrapper" in the list, fb2k will attempt to decode AC3 files with it's own decoder and the ffmpeg decoder wrapper won't be used even if AC3 is one of the formats checked in its configuration. If the internal decoder fails to decode an AC3 file, I think then it'll try the ffmpeg decoder wrapper, assuming it's configured to decode AC3. You can check and uncheck decoders and drag them up or down the list as your prefer.

    Image
    [Attachment 88671 - Click to enlarge]


    Oh, and if you've noticed, there's a decoder labelled "AVS File" near the top of the list. It'll open Avisynth scripts so you can play or convert any audio in the script output. It's a 32 bit plugin so you must use the 32 bit version of Avisynth to open the script, and it tends to be a good idea to add KillVideo() to the end of any script also outputting video, otherwise it has a tendency to crash. Other than that it works just like opening any other type of audio.

    I changed it to :"fmpeg.exe -drc_scale 0 -i %s -c:a pcm_f32le -f wav -".
    If that doesn't work, try
    "fmpeg.exe -drc_scale 0 -i %s -c:a pcm_f32le -f W64 -"
    but for the command line decoder wrapper to do any decoding, it also has to be selected in the list of decoders.

    Sorry, but I've got to disappear for a bit. I'll think about the SoX problem and report back later. I'm not sure what the issue is there.
    Last edited by hello_hello; 11th Sep 2025 at 06:11.
    Quote Quote  
  24. @ hello_hello,
    I still can not play or convert a .vob file.
    I'm not concerned about playing a .vob but it would be convenient if I could extract the audio track or convert it.
    The recommendations I find online say to Demux the .vob & then convert just the audio track with foobar2000.
    I did this:
    Originally Posted by hello_hello View Post
    You'll need the ffmpeg decoder wrapper enabled under the decoders list, with the "vob" format selected.
    I still get the"unsupported format" message.
    Quote Quote  
  25. I always demux the audio from vob files with DGIndex before converting it, as DGIndex will make sure the correct delay is written to the file name. As far as I know foobar2000 doesn't account for any container audio delay.

    Is it possible the vob file your testing has issues? I've tested several since my last post and haven't had any problems.
    It might be interesting to check the audio stream, but fb2k should display the audio info in the text area anyway. This is what it's displaying for the vob file I'm currently playing.

    Image
    [Attachment 88795 - Click to enlarge]


    Does anything show in the stream selector window? It's the second last toolbar button at the top.

    Image
    [Attachment 88796 - Click to enlarge]


    You have both ffmpeg and ffprobe in the encoders/ffmpeg folder and foobar2000 knows where that folder is?
    I originally said ffmpeg and ffplay were required, but I corrected the post the following day as its ffmpeg and ffprobe that's needed.

    I haven't had a chance to think about your SoX problem yet, but the error message seems to indicate foobar2000 can't write to the selected output location for some reason. If I remember correctly it was Desktop/Temp but I don't think programs should have a problem writing to that location. Then again, I haven't used Windows much since I was running XP, so I'm not really sure.
    Quote Quote  
  26. I have not tested a DGIndex demuxed .vob file audio but I will give it a test.
    I have tested 3 other .vob files with the same results.
    2 of those I tested from C:\ just in case there was an access problem.
    The Stream Selector looks like the image you posted except for a slightly different bit rate.

    I have the ffmpeg.exe & ffprobe,exe in a C:\encoders\ffmpeg folder.
    f2k is set to use that folder.
    Image
    [Attachment 88797 - Click to enlarge]


    I also tested a .flac file in the C:\ & still got the same SoX message.
    The difference could be that I'm using a 32-bit OS.
    That the encoders for 32-bit do not support a .vob or SoX

    EDIT:
    I demuxed the audio from the .vob with DGIndex.
    foobar2000 did not give any error messages.
    I tried a conversion to Apple Lossless & it converted to a .m4a with no problem.
    So the video format has to be the problem.
    Last edited by cholla; 17th Sep 2025 at 10:50.
    Quote Quote  
  27. I tested the SoX conversion presets on Windows 11 in VirtualBox and they don't work. Bummer.
    They definitely work when fb2k is running in Wine on Linux and I'm sure they worked on XP.
    Maybe fb2k is doing some command line skulduggery behind the scenes. I'll test it again using the command line manually when I have time, but for now I've asked about the problem in the fb2k forum in case it's a fb2k issue.
    https://hydrogenaudio.org/index.php/topic,128439.0.html
    Quote Quote  
  28. At the moment, the SoX problem seems to be an issue with SoX itself, and the solution seems to be to download sox_ng, rename sox_ng.exe to sox.exe and use it as a replacement.
    https://codeberg.org/sox_ng/sox_ng/releases

    I also found an issue with a couple of the SoX conversion presets that didn't bother the build of SoX I'd been using, but sox_ng produces an error.
    The problem is some of the command lines use longer dashes for these options.

    −−ignore−length and −b
    instead of
    --ignore-length and -b

    It must have been the result of a copy and paste from somewhere, but double click on each SoX preset and change any long dashes you find in the command line. If you don't mind, let me know how you go with it.

    And....
    I just downloaded it again myself and realised I linked to the wrong font file. It's the one that should be used by the text area. I assumed the mono version of the font would be included in the file I linked to, but it's not. On the site I linked to at least, its a separate download.
    https://www.1001fonts.com/bitstream-vera-sans-mono-font.html
    Installing that one should allow the text in the text area to line up nicely.
    Last edited by hello_hello; 18th Sep 2025 at 23:00.
    Quote Quote  
  29. @ hello_hello,
    I deleted the Bitstream Vera Sans Font from the first link you posted.
    Should I delete the Noto Sans Font also ?

    I will be downloading & installing the Bitstream Vera Sans Mono Font.

    For the SoX I have not started on sox_ng but I will give it a try.
    I do not know how to do the longer dashes but I will see if I can figure it out.

    I also have a Windows XP partition on one computer.
    I have to boot into it separate but I plan to give it a test.
    I rarely use it & it is there for testing purposes.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!