[FFmpeg-devel] problem with encoding raw PCM stream from device

Tomas Härdin tomas.hardin
Thu Jul 29 18:48:32 CEST 2010


On Thu, 2010-07-29 at 09:55 +0800, xutm wrote:
> Hi all,
> 
>     I have a raw PCM file and it can be play with CoolEdit. Its parameters
> is following ( these parameters come from CoolEdit):
> 
> File format: PCM Raw Data / Raw PCM
> File type: 8000 Hz, 8-bit, Mono
> 
>     Now I use ffmpeg to encode this file , but fail and the logs are:
> 
> [video2 at localhost ffmpeg-0.5.1]$ ./ffmpeg -i test.3.pcm -acodec mp2 -ar
> 16000 new.mp2
> FFmpeg version 0.5.1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
>   configuration: --enable-memalign-hack --enable-shared --disable-static
> --disable-encoder=snow --disable-decoder=ac3 --disable-decoder=vorbis
> --disable-encoder=vorbis --disable-vhook --disable-ffplay --disable-ffserver
> --disable-mpegaudio-hp --enable-pthreads --enable-nonfree --enable-libvorbis
> --enable-libx264 --enable-gpl --enable-swscale --enable-avfilter
> --enable-avfilter-lavf --enable-demuxer=rm
>   libavutil     49.15. 0 / 49.15. 0
>   libavcodec    52.20. 1 / 52.20. 1
>   libavformat   52.31. 0 / 52.31. 0
>   libavdevice   52. 1. 0 / 52. 1. 0
>   libavfilter    0. 4. 0 /  0. 4. 0
>   libswscale     0. 7. 1 /  0. 7. 1
>   built on May 13 2010 08:23:58, gcc: 4.1.1 20070105 (Red Hat 4.1.1-52)
> test.3.pcm: Unknown format
> [video2 at localhost ffmpeg-0.5.1]$
> 
>     I think ffmpeg should support  "raw PCM unsigned 8 bit " and " raw PCM
> signed 8 bit " and so on. ( for the page :
> http://www.ffmpeg.org/general.html ), but why ffmpeg cannot know the PCM Raw
> Data? Can somebody help me? Thinks in advances!

Obviously ffmpeg failed to probe the input file, because raw data can't
be probed. IIRC you have to use -f rawaudio and manually set the sample
format.

/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100729/a600b0d7/attachment.pgp>



More information about the ffmpeg-devel mailing list