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 > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th June 2025, 20:45   #1  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,256
6ch FLAC to 4ch AC3

I have a 6-channel FLAC of a quadrophonic audio production. I know that Center and LFE are certainly empty.

I would like to encode a 4.0 channel AC3 with quad layout, so I only need to pass channels 1 (FL), 2 (FR), 5 (BL) and 6 (BR).

I guess it can be done in ffmpeg. Probably with a complex_filter string. Can you help me building a command line?

(Or maybe suggest a different workflow?)
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 4th June 2025, 20:52   #2  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,356
I seem to remember the last time I tried playing a 4-channel (quad) Dolby Digital stream, my Onkyo AVR didn't decode it correctly. Same to with 4-ch DTS...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 4th June 2025, 21:10   #3  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,256
Not my main concern so far, expecting libavcodec being able...
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 5th June 2025, 00:17   #4  |  Link
hellgauss
Registered User
 
hellgauss's Avatar
 
Join Date: Sep 2002
Location: Italy
Posts: 152
Code:
ffmpeg -i "file.flac" -af "pan=quad|c0=c0|c1=c2|c2=c4|c3=c5" -c:a ac3 -b:a 384k output.ac3
Perhaps you can try also pan=4.0 or pan=quad(side) . See

Code:
ffmpeg -h encoder=ac3
for possible inputs.
hellgauss is offline   Reply With Quote
Old 5th June 2025, 09:13   #5  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,267
@hellgauss, only one typo and work fine
ffmpeg -i "file.flac" -af "pan=quad|c0=c0|c1=c1|c2=c4|c3=c5" -c:a ac3 -b:a 384k output.ac3
tebasuna51 is offline   Reply With Quote
Old 5th June 2025, 11:47   #6  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,256
I already noticed that typo. Tried it and found that the result sounds strange in VLC (missing audio parts). A conversion to a 5.1 AC3 without channel manipulation sounds okay. Testing more when time permits... So far for all supporters:

__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 5th June 2025, 12:28   #7  |  Link
hellgauss
Registered User
 
hellgauss's Avatar
 
Join Date: Sep 2002
Location: Italy
Posts: 152
Sorry for typo, I somewhat overlap start_counter=0 with start_counter=1

I confirm that the output is wrong with vlc (no surround). However it sounds ok with audacity and foobar (using ffmpeg plugin).

With mpc-BE and mpv.net also is ok.
hellgauss 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 00:47.


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