Quote:
Originally Posted by dhdurgee
I just took a shot at this with a few variations. It appears ffmpeg isn't on the pw4, but I believe I was able to accomplish the same thing with mplayer as:
Code:
[root@kindle mplayer]# ./mplayer -v -ao pcm -format s16le -af resample=48000 /mnt/us/music/01-Diamond_Star.mp3
MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
CPU: ARM
get_path('codecs.conf') -> '/tmp/root/.mplayer/codecs.conf'
Reading /tmp/root/.mplayer/codecs.conf: Can't open '/tmp/root/.mplayer/codecs.conf': No such file or directory
Reading /opt/kindle/etc/mplayer/codecs.conf: Can't open '/opt/kindle/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --prefix=/opt/kindle --enable-cross-compile --enable-armv6 --target=arm-linux --host-cc=gcc --cc=arm-kindle-linux-gnueabi-cc --as=arm-kindle-linux-gnueabi-as --nm=arm-kindle-linux-gnueabi-nm --ranlib=arm-kindle-linux-gnueabi-ranlib --disable-mencoder --disable-libdvdcss-internal --disable-dvdread-internal --disable-tv --disable-tga --disable-dvb --disable-v4l2 --disable-yuv4mpeg
CommandLine: '-v' '-ao' 'pcm' '-format' 's16le' '-af' 'resample=48000' '/mnt/us/music/01-Diamond_Star.mp3'
get_path('font/font.desc') -> '/tmp/root/.mplayer/font/font.desc'
font: can't open file: /tmp/root/.mplayer/font/font.desc
font: can't open file: /opt/kindle/share/mplayer/font/font.desc
Using Unoptimized OnScreenDisplay
Using nanosleep() timing
get_path('input.conf') -> '/tmp/root/.mplayer/input.conf'
Can't open input config file /tmp/root/.mplayer/input.conf: No such file or directory
Can't open input config file /opt/kindle/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('01-Diamond_Star.mp3.conf') -> '/tmp/root/.mplayer/01-Diamond_Star.mp3.conf'
Playing /mnt/us/music/01-Diamond_Star.mp3.
get_path('sub/') -> '/tmp/root/.mplayer/sub/'
[file] File size is 4975194 bytes
STREAM: [file] /mnt/us/music/01-Diamond_Star.mp3
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
LAVF_check: MPEG audio layer 2/3
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename /mnt/us/music/01-Diamond_Star.mp3 ext: .mp3
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: seeking from 0x4BEA5A to start pos 0x1184
demux_audio: audio data 0x1184 - 0x4BE9DA
Audio only file format detected.
Clip info:
Title: Diamond Star
Artist: Point Valid with Catherine A..
Album: Diamond Star
Year: 2009
Comment: Track 1
Track: 1
Genre: Alternative Rock
get_path('sub/') -> '/tmp/root/.mplayer/sub/'
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using generic C decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 128 kbit Joint-Stereo, BPF: 417
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/s16le...
[libaf] Adding filter resample
[resample] Changing sample rate to 48000Hz
[resample] Using integer processing and inexact frequecy conversion.
[resample] New filter designed up: 160 down: 147
[resample] Using integer processing and inexact frequecy conversion.
Trying preferred audio driver 'pcm', options '[none]'
[AO PCM] File: audiodump.wav (WAVE)
PCM: Samplerate: 48000Hz Channels: Stereo Format s16le
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).
AO: [pcm] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: RAW PCM/WAVE file writer audio output
AO: Author: Atmosfear
Building audio filter chain for 44100Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[resample] Using integer processing and inexact frequecy conversion.
[resample] Using integer processing and inexact frequecy conversion.
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module resample, old len = 0, new len = 67714
Increasing filtered audio buffer size from 0 to 67712
Increasing filtered audio buffer size from 67712 to 67724
Increasing filtered audio buffer size from 67724 to 67740
Increasing filtered audio buffer size from 67740 to 67752
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
EOF code: 1 26.9) of 310.0 (05:10.0) 22.4%
Uninit audio filters...
[libaf] Removing filter resample
Uninit audio: mp3lib
Exiting... (End of file)
So I believe I had a good file to try, but unfortuantely when I did:
Code:
[root@kindle mplayer]# cat audiodump.wav | /usr/bin/gst-launch filesrc location=/dev/stdin ! rawaudioparse use-sink-caps=false forma
t=pcm pcm-format=s16le sample-rate=48000 ! audioconvert ! audioresample ! mixersink
WARNING: erroneous pipeline: no element "rawaudioparse"
[root@kindle mplayer]#
What next?
Dave
PS: I thought to try editing down the pipeline and got:
Code:
[root@kindle mplayer]# cat audiodump.wav | /usr/bin/gst-launch filesrc location=/dev/stdin ! mixersink
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/MixerSink:mixersink0: The stream is in the wrong format.
Additional debug info:
gstbaseaudiosink.c(836): gst_base_audio_sink_preroll (): /GstPipeline:pipeline0/MixerSink:mixersink0:
sink not negotiated.
Execution ended after 4387667 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
[root@kindle mplayer]#
|
Ok, that looks promising. I guess gstreamer is too old for rawaudioparse. Try converting it to wav instead of raw PCM audio (it can be from a computer), then replacing the"! rawaudioparse ... !" with "! wavparse !".