[MPlayer-users] SVN-r32479: pcm:file=fifo does not work

sean darcy seandarcy2 at gmail.com
Sat Oct 30 03:07:44 CEST 2010


I trying to use the x264 encoding example at:

http://sites.google.com/site/linuxencoding/x264-encoding-guide

I've written this script:

#!/bin/sh
## from http://sites.google.com/site/linuxencoding/x264-encoding-guide

INFILE=$1

mkfifo video.y4m

x264 --crf 20 --profile baseline --level 31 \
  --partitions all --me umh --subme 7 \
  --vbv-bufsize 14000 --vbv-maxrate 14000 --threads auto \
  --no-fast-pskip --output output.264 video.y4m 2>x264.log \
  & mplayer $INFILE -nosound -benchmark -vo yuv4mpeg:file=video.y4m \
    -sws 9 -vf dsize=720:480:0,scale=0:0,expand=720:480,dsize=1.5

mkfifo audio.wav

/home/video/dvd/x264/NeroAACCodec/linux/neroAacEnc -ignorelength -q 0.5 
-if audio.wav -of audio.mp4 \
  2>nero.log & mplayer -nocorrect-pts -vo null -vc null -ao 
pcm:file=audio.wav $INFILE

MP4Box  -add output.264 -add audio.mp4 OUTFILE.mp4


The video portion work fine with a fifo output. But mplayer dies on the 
audio if I use fifo:

+ mkfifo audio.wav
+ mplayer -nocorrect-pts -vo null -vc null -ao pcm:file=audio.wav test.dv
+ /home/video/dvd/x264/NeroAACCodec/linux/neroAacEnc -ignorelength -q 
0.5 -if audio.wav -of audio.mp4
MPlayer SVN-r32479-4.4.4 (C) 2000-2010 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote 
control.

Playing test.dv.
Seek failed
libavformat file format detected.
[dv @ 0x1c05d20] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (dvvideo), -vid 0
[lavf] stream 1: audio (pcm_s16le), -aid 0
VIDEO:  [dvsd]  720x480  0bpp  29.970 fps  28771.2 kbps (3512.1 kbyte/s)
==========================================================================
Forced video codec: null
Opening video decoder: [null] Null video decoder
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [null] 720x480 => 720x540 Planar YV12
Selected video codec: [null] vfm: null (NULL codec (no decoding!))
==========================================================================
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
[AO PCM] File: audio.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).

And there it just hangs. Forever.

BUT, if I remove the fifo, and mplayer runs fine:

rm: remove fifo `audio.wav'? y
mplayer -nocorrect-pts -vo null -vc null -ao pcm:file=audio.wav test.dv
MPlayer SVN-r32479-4.4.4 (C) 2000-2010 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote 
control.

Playing test.dv.
Seek failed
libavformat file format detected.
[dv @ 0x314dd20] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (dvvideo), -vid 0
[lavf] stream 1: audio (pcm_s16le), -aid 0
VIDEO:  [dvsd]  720x480  0bpp  29.970 fps  28771.2 kbps (3512.1 kbyte/s)
==========================================================================
Forced video codec: null
Opening video decoder: [null] Null video decoder
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [null] 720x480 => 720x540 Planar YV12
Selected video codec: [null] vfm: null (NULL codec (no decoding!))
==========================================================================
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
[AO PCM] File: audio.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)
Starting playback...
A:  88.4 V:  88.5 A-V: -0.050 ct: -0.274 2652/2652  0%  0%  0.8% 1120 0


MPlayer interrupted by signal 2 in module: key_events
A:  88.7 V:  88.5 A-V:  0.258 ct: -0.273 2653/2653  0%  0%  0.8% 1121 0

Exiting... (Quit)

sean



More information about the MPlayer-users mailing list