VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    I am trying to get the channel layout of a multi-channel file, rather than 5.1, I want to see the layout, such as:

    FL+FR+LFE+FLC+FRC+SL+SR


    Does anyone know how to get the layout via CLI??

    Thanks!
    Andrew
    Quote Quote  
  2. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    I don't know about a CLI, not part of my knowledge base but you could do it in Audacity or any other similar full sound editors.
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  3. Originally Posted by RogerTango View Post
    I am trying to get the channel layout of a multi-channel file, rather than 5.1, I want to see the layout, such as:

    FL+FR+LFE+FLC+FRC+SL+SR


    Does anyone know how to get the layout via CLI??

    Thanks!
    Andrew
    The Standard Layout for 5.1 is:
    FL+FR+FC+LFE+BL+BR

    You can change the channels position with clever FFmpeg-GUI.

    Image
    [Attachment 71906 - Click to enlarge]
    Last edited by ProWo; 22nd Jun 2023 at 09:10. Reason: picture added
    Quote Quote  
  4. You can do this indirectly - modified one of my scripts - you can modify it freely.
    It shows information for stream (track) but also on frame basis as some audio codecs may dynamically change channel layout during time.

    Code:
    @setlocal
    
    @REM Where to Find ffmpeg
    @set FFMPG=%CD%
    @set PATH=%FFMPG%;%PATH%
    
    @SET file=%1
    @SET fname=%~n1
    
    @echo off
    
    @ffprobe.exe -hide_banner -v 32 -select_streams a -i %file% -show_format > "%fname%.csv"
    @echo: >> "%fname%.csv"
    @echo - - - - - - - - - - - - - %file% - streams  - - - - - - - - >> "%fname%.csv"
    @echo: >> "%fname%.csv"
    @ffprobe.exe -hide_banner -v 32 -select_streams a -i %file% -show_streams >> "%fname%.csv"
    @echo: >> "%fname%.csv"
    @echo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> "%fname%.csv"
    @echo: >> "%fname%.csv"
    @ffmpeg.exe -hide_banner -layouts >> "%fname%.csv"
    @echo: >> "%fname%.csv"
    @echo - - - - - - - - - - - - - %file% - channels,channel_layout  >> "%fname%.csv"
    @echo: >> "%fname%.csv"
    @echo type,channels,channel_layout, >> "%fname%.csv"
    @echo: >> "%fname%.csv"
    @ffprobe -hide_banner -v 32 -select_streams a -i %file% -show_entries "frame=channels,channel_layout" -of csv >> "%fname%.csv"
    @echo - - - - - - - - - - - - - -EOF- - - - - - - - - - - - - - - >> "%fname%.csv"
    
    @endlocal
    @pause
    btw - information returned by ffprobe can be inaccurate as ffprobe shows only channel layout signaled by particular audio codec, ffprobe can't detect if this is accurate or not.

    btw 2 - seem character chr(255) (blank square i.e. (alt+255) ) is replaced by '*' sign
    never mind, replaced it by something compatible with forum engine
    Last edited by pandy; 22nd Jun 2023 at 16:22.
    Quote Quote  
  5. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    I ended up detecting the number of channels (1,2, 5.1, etc..) and then assigning channel layout that ffmpeg uses by default, did it in python.
    I got working what I needed, thanks for your help & input!! (excuse the pun)

    Andrew
    Quote Quote  



Similar Threads

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