[Libav-user] filtering_audio.c example not working

Ron Woods rwoods at vaytek.com
Tue Nov 13 23:26:13 CET 2012

I have tried it on AVI or MOV input file as well -- same result; so, no, it doesn't seem to depend on input file.
I am using same filter technique in another context to transcode audio from input movie to WAV output file, and it works fine there.
Maybe it is something to do with the piping to ffplay that is not working right in Windows?

-----Original Message-----
From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of Stefano Sabatini
Sent: Tuesday, November 13, 2012 4:19 PM
To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter.
Subject: Re: [Libav-user] filtering_audio.c example not working

On date Monday 2012-11-12 14:50:24 -0600, Ron Woods wrote:
> I am trying out the filtering_audio.c example provided with the ffmpeg libraries for Windows to extract the audio from a MP4 file, resample to 8 KHz and convert from stereo to mono. The example pipes the audio output via stdout to ffplay. I am using Visual Studio 2010 and the example successfully builds and runs but the result is clearly not the desired result. At the end of init_filters I added a call to avfilter_graph_dump() and it all looks correct and also the pipe to ffplay as in this trace:
> abuffer filter args: 
> time_base=1/24000:sample_rate=24000:sample_fmt=s16:channel_layout=0x4
> Output: srate:8000Hz fmt:s16 chlayout:mono
> +-----------+
> |    in     |default--[24000Hz s16:mono]--Parsed_aconvert_0:default
> | (abuffer) |
> +-----------+
>                                                       +-----------------+
> Parsed_aresample_1:default--[8000Hz s16:mono]--default|       out       |
>                                                       | (ffabuffersink) |
> +-----------------+
>                                        +-------------------+ 
> in:default--[24000Hz s16:mono]--default| Parsed_aconvert_0 |default--[24000Hz s16:mono]-Parsed_aresample_1:default
>                                        |    (aconvert)     |
>                                        +-------------------+
> +--------------------+ Parsed_aconvert_0:default--[24000Hz s16:mono]--default| Parsed_aresample_1 |default--[8000Hz s16:mono]--out:default
>                                                       |    (aresample)     |
> +--------------------+

> [s16le @ 003edda0] Invalid sample rate 0 specified using default of 
> 44100

This is fishy.

> [s16le @ 003edda0] Estimating duration from bitrate, this may be 
> inaccurate Input #0, s16le, from 'pipe:':
>   Duration: N/A, start: 0.000000, bitrate: 128 kb/s
>     Stream #0:0: Audio: pcm_s16le, 8000 Hz, 1 channels, s16, 128 kb/s
> If you have made this example run properly on Windows in VS 2010, would you please provide any tips or changes you made for it to work?

I just tried latest git and seems to work fine here (Linux). Does the problem depend on the input file?
FFmpeg = Funny and Fierce Merciless Practical Extended Goblin _______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org

More information about the Libav-user mailing list