Spliting bilingual audio into separate streams
Hi all, I hope that this is not a stupid question, having looked around a bit the answer is not too easy to find. A mpeg stream recorded from the television sometimes has bilingual audio, i.e. the left channel is English and the right channel is German, rather than two audio streams. Is it possible to separate the audio with mencoder into to separate streams with one language coming out from both speakers? And if so what are the correct options? TIA Duncan
Hi, On 12/20/06, Duncan Webb <duncan-mp@linuxowl.com> wrote:
Hi all,
I hope that this is not a stupid question, having looked around a bit the answer is not too easy to find.
A mpeg stream recorded from the television sometimes has bilingual audio, i.e. the left channel is English and the right channel is German, rather than two audio streams. Is it possible to separate the audio with mencoder into to separate streams with one language coming out from both speakers?
And if so what are the correct options?
You should be able to get what you want with audio filters -af channels and -af pan Guillaume -- An association of men who will not quarrel with one another is a thing which has never yet existed, from the greatest confederacy of nations down to a town meeting or a vestry. -- Thomas Jefferson (when interviewed about MPlayer ML flamewars) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html
Guillaume POIRIER wrote:
Hi,
On 12/20/06, Duncan Webb <duncan-mp@linuxowl.com> wrote:
Hi all,
I hope that this is not a stupid question, having looked around a bit the answer is not too easy to find.
A mpeg stream recorded from the television sometimes has bilingual audio, i.e. the left channel is English and the right channel is German, rather than two audio streams. Is it possible to separate the audio with mencoder into to separate streams with one language coming out from both speakers?
And if so what are the correct options?
You should be able to get what you want with audio filters -af channels and -af pan
Must admit, I had already figure out channels. I didn't realise that the pan filter could do this though. Something like, for channels: -af channels=2:2:0:0:0:1 pan 2:0 -af channels=2:2:1:1:1:0 pan 2:1 I just don't understand the pan option, who can read and understand this, and what do negative value mean? pan=2:.32:.32:.39:.06:.06:.39:.17:-.17:-.17:.17:.33:.33 Thanks, Duncan
Duncan Webb wrote:
Guillaume POIRIER wrote:
Hi,
On 12/20/06, Duncan Webb <duncan-mp@linuxowl.com> wrote:
Hi all,
I hope that this is not a stupid question, having looked around a bit the answer is not too easy to find.
A mpeg stream recorded from the television sometimes has bilingual audio, i.e. the left channel is English and the right channel is German, rather than two audio streams. Is it possible to separate the audio with mencoder into to separate streams with one language coming out from both speakers?
And if so what are the correct options?
You should be able to get what you want with audio filters -af channels and -af pan
Must admit, I had already figure out channels. I didn't realise that the pan filter could do this though.
Something like, for channels: -af channels=2:2:0:0:0:1 pan 2:0 -af channels=2:2:1:1:1:0 pan 2:1
I just don't understand the pan option, who can read and understand this, and what do negative value mean? pan=2:.32:.32:.39:.06:.06:.39:.17:-.17:-.17:.17:.33:.33
maybe -af pan=1:1:0 and -af pan=1:0:1
Nico Sabbi wrote:
Duncan Webb wrote:
Guillaume POIRIER wrote:
Hi,
On 12/20/06, Duncan Webb <duncan-mp@linuxowl.com> wrote:
Hi all,
I hope that this is not a stupid question, having looked around a bit the answer is not too easy to find.
A mpeg stream recorded from the television sometimes has bilingual audio, i.e. the left channel is English and the right channel is German, rather than two audio streams. Is it possible to separate the audio with mencoder into to separate streams with one language coming out from both speakers?
And if so what are the correct options?
You should be able to get what you want with audio filters -af channels and -af pan
Must admit, I had already figure out channels. I didn't realise that the pan filter could do this though.
Something like, for channels: -af channels=2:2:0:0:0:1 pan 2:0 -af channels=2:2:1:1:1:0 pan 2:1
I just don't understand the pan option, who can read and understand this, and what do negative value mean? pan=2:.32:.32:.39:.06:.06:.39:.17:-.17:-.17:.17:.33:.33
maybe -af pan=1:1:0 and -af pan=1:0:1
1: one output channel 1: 100% of channel 1 0: 0% of channel 2 That will split out mono on one speaker? How about mono on two or more speakers? Thanks again, Duncan
Duncan Webb wrote:
maybe -af pan=1:1:0 and -af pan=1:0:1
1: one output channel 1: 100% of channel 1 0: 0% of channel 2
That will split out mono on one speaker?
How about mono on two or more speakers?
maybe -af pan=2:1:0:1:1 or -af pan=2:0:1:1:1 -- "Without a frontend, mplayer is useless" - someone in mplayer-users
Nico Sabbi wrote:
Duncan Webb wrote:
maybe -af pan=1:1:0 and -af pan=1:0:1
1: one output channel 1: 100% of channel 1 0: 0% of channel 2
That will split out mono on one speaker?
How about mono on two or more speakers?
maybe -af pan=2:1:0:1:1 or -af pan=2:0:1:1:1
Thanks, if I'm reading it correctly: Naming the channels from 1 rather than 0. 2: two channels, 1: 100% of channel 1 -> channel 1 0: 0% of channel 2 -> channel 1 1: 100% of channel 1 -> channel 2 1: 100% of channel 2 -> channel 2 Doesn't look quite correct so I must be reading this incorrectly :( Thanks Duncan
Duncan Webb wrote:
Thanks, if I'm reading it correctly: Naming the channels from 1 rather than 0.
2: two channels, 1: 100% of channel 1 -> channel 1 0: 0% of channel 2 -> channel 1 1: 100% of channel 1 -> channel 2 1: 100% of channel 2 -> channel 2
Doesn't look quite correct so I must be reading this incorrectly :(
uhm, -af pan=2:1:1:0:0 or -af pan=2:0:0:1:1 input is 2 channels, so the map is 2 channels as output 100% of left to output 0 (left) 100% of left to output 1 (right) 0% of right to output 0 (left) 0% of right to output 1 (right)
Nico Sabbi wrote:
Duncan Webb wrote:
Thanks, if I'm reading it correctly: Naming the channels from 1 rather than 0.
2: two channels, 1: 100% of channel 1 -> channel 1 0: 0% of channel 2 -> channel 1 1: 100% of channel 1 -> channel 2 1: 100% of channel 2 -> channel 2
Doesn't look quite correct so I must be reading this incorrectly :(
uhm, -af pan=2:1:1:0:0 or -af pan=2:0:0:1:1
input is 2 channels, so the map is
2 channels as output 100% of left to output 0 (left) 100% of left to output 1 (right)
0% of right to output 0 (left) 0% of right to output 1 (right)
Oh thanks, I will test this out with mplayer and a pair of headphones. Would be good to add this break down to the man page examples, it makes it easier to understand. :) Cheers, Duncan
Duncan Webb wrote:
Nico Sabbi wrote:
Duncan Webb wrote:
Thanks, if I'm reading it correctly: Naming the channels from 1 rather than 0.
2: two channels, 1: 100% of channel 1 -> channel 1 0: 0% of channel 2 -> channel 1 1: 100% of channel 1 -> channel 2 1: 100% of channel 2 -> channel 2
Doesn't look quite correct so I must be reading this incorrectly :(
uhm, -af pan=2:1:1:0:0 or -af pan=2:0:0:1:1
input is 2 channels, so the map is
2 channels as output 100% of left to output 0 (left) 100% of left to output 1 (right)
0% of right to output 0 (left) 0% of right to output 1 (right)
Oh thanks, I will test this out with mplayer and a pair of headphones.
Thanks again these options worked and so did: -af channels=2:2:0:0:0:1 same as -af pan=2:1:1:0:0 -af channels=2:2:1:1:1:0 same as -af pan=2:0:0:1:1 Took longer than expected to do this, early recordings had both languages on both channels and had to wait until it was fixed in the ivtv driver. Duncan
participants (3)
-
Duncan Webb -
Guillaume POIRIER -
Nico Sabbi