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. |
18th December 2019, 21:31 | #1 | Link |
Registered User
Join Date: Dec 2008
Location: Germany
Posts: 173
|
Fix change of channels in ac3
Hi Guys, I have a recorded ac3 file here.
It starts as a 2.0 but changes to 5.1 after a while. So the problems begin, because I want to keep the 5.1 part and also the 2.0 part. But every program I tried fails. They only read the 2.0 header and progress unchanged on those 5.1 sections. So my question is: Is there a way on commandline to fix this, there are two prefered ways for me: 1. Insert empty channels into ac3 and change headers to simulate a 5.1 (with silent surround channels). 2. Demux to wav and fill up channels with silence to get a constant 6-channel-wav. |
18th December 2019, 22:04 | #2 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
|
Some TV broadcasting companies use this method as it prevents AVR's from flicking between 2 channel and multi-channel modes...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
18th December 2019, 22:14 | #3 | Link |
Registered User
Join Date: Dec 2008
Location: Germany
Posts: 173
|
Yes, and this is nice to do so, but my file uses the other method, that means I have both channel-configurations in same file which causes lots of problems using it.
But also bad to use this method, you think you get 6 channel, but its only stereo ... cheaters ;-))))) So any commandline program out there that can fix this to 6ch somehow? |
19th December 2019, 10:50 | #4 | Link | ||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
Quote:
Read this: https://forum.doom9.org/showthread.p...95#post1447695 https://forum.doom9.org/showthread.p...48#post1853648
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 19th December 2019 at 10:52. |
||
19th December 2019, 14:21 | #5 | Link |
Registered User
Join Date: Dec 2008
Location: Germany
Posts: 173
|
@tebasuna51:
Thank you very much for that hint, I will look into it. I finally got a solution. ffmpeg is able to handle it. The file starts with 2.0 and changes to 5.1. ffmpeg identifies it as 2.0 (stereo), but if I decode it to wav an explicit define a 6ch, it takes care of the changes and I get a correct result. It is all handeled correctly I dont loose audio anywhere. But there is no way to identify that is is a 6ch anywhere. No tool is capable to tell that there is a change inside. |
20th December 2019, 01:33 | #6 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
In the past I've resorted to DirectShow for that sort of thing. You can specify the number of channels with ffdshow's Mixer filter and that's what it'll output regardless of the input channel count. I know there's a plugin for loading ffdshow in Avisynth directly called ffavisynth.dll, but it's been so long since I've used it I can't remember if it's video-only.
You can achieve the same when converting with foobar2000 by using the Channel Mixer DSP. I recall there was an issue/oddity with it's up-mixing for a certain channel configuration (can't remember) but in this case you'd disable any up-mixing anyway and just tell it to output 6 channels. The Matrix Mixer DSP can do the same by adding the left and right channels to the surround/LFE channels at a volume close to silence (it doesn't create channels unless they contain audio). Edit: I just realised the bitrate for lossy encoding increases quite a bit when the channels have almost silent audio rather than silence, so I don't recommend the Matrix Mixer method any more. Last edited by hello_hello; 20th December 2019 at 01:41. |
|
|