[Theora] v4l audio

Ralph Giles giles at xiph.org
Sat Dec 31 11:14:46 PST 2005

On Sat, Dec 31, 2005 at 12:55:23PM -0600, James Clark wrote:

> I've a pchdtv-3000 card I am trying to record from.  I can successfully
> record audio/video using streamer or watch television with audio using
> tvtime, so I know the audio is there.

Most capture cards, for reasons that have never been clear to me, don't 
contain an audio digitizer. So they decode the audio signal, and then 
send it out through an external cable to your sound card, which does
the actual digitization (causing all sorts of sync issues). It looks 
like the PCHTDV-3000 works this way?

> ffmpeg2theora --v4l /dev/video0 -o test.ogg
> This records video but no audio.  

Yes. Likewise, the v4l kernel interface only provides video, not audio.

> Should I be able to do this? Do I need to stream the audio separately? 

It would be nice if ffmpeg2theora could also read from the sound card 
for the audio track, but I don't believe it currently does. I think 
you can use something like mencoder (which can) to stream some 
multiplexed, not-very-compressed A/V format to ffmpeg2theora, but 
obviously that's wasteful.

You can also encode theora video as above, and use sox | oggenc to 
encode vorbis audio from the soundcard and use oggzmerge after the fact 
to combine the two files, but see above about sync problems.

Probably the best option (if you don't want to write something) is the 
flumotion(.net) media server. It can record from both v4l and the sound 
card and encode to Ogg Theora+Vorbis.


More information about the Theora mailing list