Number of channels

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Number of channels

Paul Figgiani
Syntax to display number of channels in audio input file?
Thank You.    
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Number of channels

Henk D. Schoneveld


Sent from my iPod

On 4 mrt. 2013, at 22:03, Paul Figgiani <[hidden email]> wrote:

> Syntax to display number of channels in audio input file?
ffmpeg -i yourfile.ext

> Thank You.                        
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Number of channels

Paul Figgiani
I'm looking to display just the audio file channel info, not the rest of the data. Is this possible?
Thanks again.

> From: [hidden email]
> Date: Mon, 4 Mar 2013 23:27:43 +0100
> To: [hidden email]
> Subject: Re: [FFmpeg-user] Number of channels
>
>
>
> Sent from my iPod
>
> On 4 mrt. 2013, at 22:03, Paul Figgiani <[hidden email]> wrote:
>
> > Syntax to display number of channels in audio input file?
> ffmpeg -i yourfile.ext
>
> > Thank You.                        
> > _______________________________________________
> > ffmpeg-user mailing list
> > [hidden email]
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
     
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Number of channels

Henk D. Schoneveld


Sent from my iPod

On 5 mrt. 2013, at 06:23, Paul Figgiani <[hidden email]> wrote:

> I'm looking to display just the audio file channel info, not the rest of the data. Is this possible?
Look for the grep command. It's à filter

> Thanks again.
>
>> From: [hidden email]
>> Date: Mon, 4 Mar 2013 23:27:43 +0100
>> To: [hidden email]
>> Subject: Re: [FFmpeg-user] Number of channels
>>
>>
>>
>> Sent from my iPod
>>
>> On 4 mrt. 2013, at 22:03, Paul Figgiani <[hidden email]> wrote:
>>
>>> Syntax to display number of channels in audio input file?
>> ffmpeg -i yourfile.ext
>>
>>> Thank You.                        
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> [hidden email]
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>                        
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Number of channels

Liam Condron-Farnos
>> I'm looking to display just the audio file channel info, not the rest of the data. Is this possible?
>Look for the grep command. It's à filter

I would recommend using ffprobe. To show information about the first
audio stream in a file:

ffprobe input.file -show_streams -select_streams a:0

As Henk wrote, you could use grep to find the information you wanted,
this is easier with ffprobe since it outputs a single key=value pair
per line. To find the number of audio channels (on Linux / OSX / other
Unix-like):

ffprobe input.file -show_streams -select_streams a:0 | grep 'channels='

or, to strip out the 'channels=' and get only the number of channels,
you could use sed instead:

ffprobe input.file -show_streams -select_streams a:0 | sed -n
'/channels=/s/channels=//p'
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Number of channels

Paul Figgiani
Thank You ...

> Date: Tue, 5 Mar 2013 20:54:04 +0000
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [FFmpeg-user] Number of channels
>
> >> I'm looking to display just the audio file channel info, not the rest of the data. Is this possible?
> >Look for the grep command. It's à filter
>
> I would recommend using ffprobe. To show information about the first
> audio stream in a file:
>
> ffprobe input.file -show_streams -select_streams a:0
>
> As Henk wrote, you could use grep to find the information you wanted,
> this is easier with ffprobe since it outputs a single key=value pair
> per line. To find the number of audio channels (on Linux / OSX / other
> Unix-like):
>
> ffprobe input.file -show_streams -select_streams a:0 | grep 'channels='
>
> or, to strip out the 'channels=' and get only the number of channels,
> you could use sed instead:
>
> ffprobe input.file -show_streams -select_streams a:0 | sed -n
> '/channels=/s/channels=//p'
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
     
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user