Size: 1549
Comment:
|
Size: 2476
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 18: | Line 18: |
=== Capturing Raw Video === The best way I've found to capture raw video (e.g. from an analog TV station) is to use a named pipe to send the video frames to [[http://www.freshports.org/multimedia/ffmpeg|ffmpeg]] for encoding to an mpeg file. Future version of cx88 may have a live capture facility that can display the raw pixels directly to the screen (e.g. using SDL). The output from ffmpeg may also be piped into a player such as VLC for live viewing, but this is rather inefficient. |
|
Line 21: | Line 25: |
. ffmpeg -f oss -ar 48000 -ac 2 -i /dev/dsp2 -deinterlace -b 10000k -pix_fmt yuv422p -s 640x480 -r 30 -f rawvideo -i ${HOME}/vpipe -vcodec mpeg2video -acodec libmp3lame -y ch42.mpg | . ffmpeg -f oss -ar 48000 -ac 2 -i /dev/dsp1 -deinterlace -b 10000k -pix_fmt yuv422p -s 640x480 -r 30 -f rawvideo -i ${HOME}/vpipe -vcodec mpeg2video -acodec libmp3lame -y ch42.mpg |
Line 23: | Line 27: |
cx88 -c 42 -d /dev/cx88video0 -u file://${HOME}/vpipe -d /dev/cx88audio0 -x /usr/local/share/examples/cx88/cx88.xml.sample | cx88 -c 42 -d /dev/cx88video0 -u file://${PWD}/vpipe -d /dev/cx88audio0 -x /usr/local/share/examples/cx88/cx88.xml.sample As in the above example, ffmpeg can be used to multiplex the audio and video output. The ffmpeg command above uses the OSS-compatible cx88 audio interface, and assumes that /dev/dsp1 is the OSS audio device that corresponds to cx88audio0. It also assumes that cx88video0 and cx88audio0 are the video and audio functions of the same capture card. Note that in the cx88 command, only the video data is sent to the named pipe. |
Capture App Examples
- Tune to channel 4 in the default profile and send MPEG transport stream to VLC at port 8802 and to a file at ~/out.m2t:
- Shell 1:
- vlc udp://@127.0.0.1:8802
cx88 -d /dev/cx88mpeg0 -u udp://localhost:8802 -u file://${HOME}/out.m2t -x /usr/local/share/examples/cx88/cx88.xml.sample -c 4
cx88 -d /dev/cx88mpeg0 -u udp://localhost:8802 -u file:///home/user/out.m2t -x /usr/local/share/examples/cx88/cx88.xml.sample -c DVBT_EU_UHF:45 -n 28.7
cx88 -d /dev/cx88audio0 -u oss:///dev/dsp0 -x /usr/local/share/examples/cx88/cx88.xml.sample -c USA:42
cx88 -d /dev/cx88audio0 -x /usr/local/share/examples/cx88/cx88.xml.sample -c USA:42
- Shell 1:
Capturing Raw Video
The best way I've found to capture raw video (e.g. from an analog TV station) is to use a named pipe to send the video frames to ffmpeg for encoding to an mpeg file. Future version of cx88 may have a live capture facility that can display the raw pixels directly to the screen (e.g. using SDL). The output from ffmpeg may also be piped into a player such as VLC for live viewing, but this is rather inefficient. Capture video and audio from channel 42 in the USA profile and send to ffmpeg for encoding via a named pipe:
- Shell 1:
- mkfifo vpipe
- ffmpeg -f oss -ar 48000 -ac 2 -i /dev/dsp1 -deinterlace -b 10000k -pix_fmt yuv422p -s 640x480 -r 30 -f rawvideo -i ${HOME}/vpipe -vcodec mpeg2video -acodec libmp3lame -y ch42.mpg
cx88 -c 42 -d /dev/cx88video0 -u file://${PWD}/vpipe -d /dev/cx88audio0 -x /usr/local/share/examples/cx88/cx88.xml.sample
- Shell 1:
As in the above example, ffmpeg can be used to multiplex the audio and video output. The ffmpeg command above uses the OSS-compatible cx88 audio interface, and assumes that /dev/dsp1 is the OSS audio device that corresponds to cx88audio0. It also assumes that cx88video0 and cx88audio0 are the video and audio functions of the same capture card. Note that in the cx88 command, only the video data is sent to the named pipe.