[theora-dev] Bug(?) in the example encoder (details re: audio from fifo)

emaillist at dogphilosophy.net emaillist at dogphilosophy.net
Mon Sep 30 23:25:32 PDT 2002



I did a little poking about with the pcm-from-fifo problem I 
was having...

What I'm attempting to do is an on-the-fly export from one file
using mplayer to generate yuv4mpeg video frames and pcm audio, piped
through fifo's.  This DOES work with mpeg2enc/mp2enc, so I'm assuming
it's not a problem with, e.g., my filesystem...

the example encoder appears to successfully open and begin reading
the audio stream, but 'hangs' there.  I just ran a test using strace
on the example encoder, and it appears to be hanging after determining
the audio stream type but before finishing opening the video stream.

The behavior appears different depending on the type of source file, 
for some bizarre reason...

The relevant command lines I'm using are:

(in one terminal window):
mplayer -vo yuv4mpeg -ao pcm -aofile stream.wav -aop list=resample:fout=44100 
-vop scale=640:480 -sws 2 test.mpg

(in another):
strace encoder_example -a 1 -v 1 stream.wav stream.yuv > movie.ogg 2>enc.err

In this case, enc.err shows that it's unable(?) to open the stream:

--------------------------------------------------------
execve("/usr/local/bin/encoder_example", ["encoder_example", "-a", "1", "-v", 
"1", "stream.wav", "stream.yuv"], [/* 37 vars */]) = 0
shmat(0, 0, 0x1ptrace: umoven: Input/output error
)                        = ?
shmat(1, 0xbffff858, 0x1)               = 0xbffff878
shmat(2, 0, 0x1ptrace: umoven: Input/output error
)                        = ?
semop(3221223652, 0, 0)                 = 0
SYS_199(0, 0, 0x81b00c8, 0, 0x7)        = 0
semget(IPC_PRIVATE, 0, 0x81b00c8|0200)  = 0
ipc_subcall(0, 0, 0x81b00c8, 0)         = 0
brk(0)                                  = 0x81b0ce4
brk(0x81b0d04)                          = 0x81b0d04
brk(0x81b1000)                          = 0x81b1000
getpid()                                = 4009
brk(0x81b2000)                          = 0x81b2000
open("stream.wav", O_RDONLY|0x8000 <unfinished ...>
-------------------------------------------------------

Nearly identical, if I try this with a DivX file (same MPlayer
command line, other than the filename), enc.err shows:
-------------------------------------------------------
execve("/usr/local/bin/encoder_example", ["encoder_example", "-a", "1", "-v", 
"1", "stream.wav", "stream.yuv"], [/* 37 vars */]) = 0
shmat(0, 0, 0x1ptrace: umoven: Input/output error
)                        = ?
shmat(1, 0xbffff858, 0x1)               = 0xbffff878
shmat(2, 0, 0x1ptrace: umoven: Input/output error
)                        = ?
semop(3221223652, 0, 0)                 = 0
SYS_199(0, 0, 0x81b00c8, 0, 0x7)        = 0
semget(IPC_PRIVATE, 0, 0x81b00c8|0200)  = 0
ipc_subcall(0, 0, 0x81b00c8, 0)         = 0
brk(0)                                  = 0x81b0ce4
brk(0x81b0d04)                          = 0x81b0d04
brk(0x81b1000)                          = 0x81b1000
getpid()                                = 4014
brk(0x81b2000)                          = 0x81b2000
open("stream.wav", O_RDONLY|0x8000)     = 3
fstat64(0x3, 0xbffff11c)                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x40000000
read(3, "RIFF\0\0\0\0WAVEfmt \20\0\0\0\1\0\2\0D\254\0\0\20\261\2"..., 4096) = 
4096
write(2, "File stream.wav is 16 bit 2 chan"..., 61File stream.wav is 16 bit 2 
channel 44100 Hz RIFF WAV audio.
) = 61
open("stream.yuv", O_RDONLY|0x8000 <unfinished ...>
----------------------------------------------------------

In either case, if I leave out the stream.wav pipe, the example
encoder seems to work fine.  I was also able to include a 'pre-dumped'
regular .wav file instead of a fifo and that worked as well...

Any suggestions?
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Theora-dev mailing list