Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: How to capture composite video

105 views
Skip to first unread message

Charlie Gibbs

unread,
May 28, 2021, 1:30:06 PM5/28/21
to
[copy of posting to comp.os.linux.misc]

References: <s7pfr...@news1.newsguy.com> <atk9nh-...@aretha.foo>

On 2021-05-17, Peter 'Shaggy' Haywood <phay...@alphalink.com.au> wrote:

> mencoder tv:// -tv \
> driver=4vl2:input=1:norm=pal:width=720:height=576:fps=25 \
> -endpos 1:30:00 -ovc lavc -oac copy -lavcopts vcodec=mpeg4 \
> -o filename.avi

I finally found the time to do some more experimenting. The example
above is a good starting point. I found that I can watch VHS tapes
(or whatever else is plugged into the composite video input) on my
machine with the following command:

mplayer tv:// -tv driver=v4l2:input=1:norm=NTSC-M:width=720:height=480

Here's what gets written when I tee stdout:

MPlayer 1.3.0 (Debian), built with gcc-8 (C) 2000-2016 MPlayer Team

Playing tv://.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olsch...@zpr.uni-koeln.de>
comment: first try, more to come ;-)
Selected device: pcHDTV HD5500 HDTV
Tuner cap: STEREO LANG1 LANG2
Tuner rxs: MONO
Capabilities: video capture VBI capture device tuner read/write
streaming
supported norms: 0 = NTSC-M; 1 = NTSC-M-JP; 2 = NTSC-443; 3 = PAL-BG;
4 = PAL-I; 5 = PAL-DK; 6 = PAL-M; 7 = PAL-N; 8 = PAL-Nc; 9 = PAL-60; 10
= SECAM-B; 11 = SECAM-G; 12 = SECAM-H; 13 = SECAM-DK; 14 = SECAM-L;
inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
Current input: 1
Current format: UYVY
v4l2: current audio mode is : MONO
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 720x480 => 720x480 Packed UYVY
Selected video codec: [rawuyvy] vfm: raw (RAW UYVY)
==========================================================================
Audio: no sound
Starting playback...
V: 0.0 1/ 1 ??% ??% ??,?% 0 0 [counts up]

v4l2: 137 frames successfully processed, 0 frames dropped.

Exiting... (Quit)

Note the "Audio: no sound" line. I still have to figure that one out
to get beyond silent movies. Any hints?

If I get the parameters wrong (which I did a lot while trying to get
the aspect ratio right), my screen and keyboard lock up. The machine
is still alive, though; I can ssh in from another machine and send
a kill -HUP to mplayer's PID, and it does an orderly shutdown and
releases everything.

Once I get sound working, the next step is to persuade mencoder
to write the video to a file. I tried adding the other parameters
you mentioned above, starting with -ovc, but I get the message:

Unable to open '/dev/dsp': No such file or directory.

It's really upset about this; the message appears three times.
And indeed, /dev/dsp doesn't exist. How do I get one?

--
/~\ Charlie Gibbs | They don't understand Microsoft
\ / <cgi...@kltpzyxm.invalid> | has stolen their car and parked
X I'm really at ac.dekanfrus | a taxi in their driveway.
/ \ if you read it the right way. | -- Mayayana

deloptes

unread,
May 28, 2021, 1:40:05 PM5/28/21
to
Charlie Gibbs wrote:

> Note the "Audio: no sound" line.  I still have to figure that one out
> to get beyond silent movies.  Any hints?

mplayer is complex application - you need some time to study the
documentation

for audio you are missing the audio driver, you can try adding

-ao alsa:noblock:audiorate=48000:device=duplex

or for TV

mplayer tv:// -tv
driver=v4l2:input=1:norm=NTSC-M:width=720:height=480:forceaudio:immediatemode=0:adevice=/dev/dsp1:amode=1:forcechan=2:audiorate=44100:audioid=1:volume=75

it all depends how the hardware is set

these are some ideas I used successfully in the past

Dan Ritter

unread,
May 28, 2021, 1:50:04 PM5/28/21
to
Charlie Gibbs wrote:
> [copy of posting to comp.os.linux.misc]
>
> References: <s7pfr...@news1.newsguy.com> <atk9nh-...@aretha.foo>
>
> On 2021-05-17, Peter 'Shaggy' Haywood <phay...@alphalink.com.au> wrote:
>
> > mencoder tv:// -tv \
> > driver=4vl2:input=1:norm=pal:width=720:height=576:fps=25 \
> > -endpos 1:30:00 -ovc lavc -oac copy -lavcopts vcodec=mpeg4 \
> > -o filename.avi
>
> I finally found the time to do some more experimenting. The example
> above is a good starting point. I found that I can watch VHS tapes
> (or whatever else is plugged into the composite video input) on my
> machine with the following command:
>
> mplayer tv:// -tv driver=v4l2:input=1:norm=NTSC-M:width=720:height=480
>
> Tuner cap: STEREO LANG1 LANG2
> Tuner rxs: MONO
> Capabilities: video capture VBI capture device tuner read/write
> streaming
> inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
> Current input: 1
> Current format: UYVY
> v4l2: current audio mode is : MONO
> Audio: no sound
>
> Note the "Audio: no sound" line. I still have to figure that one out
> to get beyond silent movies. Any hints?

Yes: composite video doesn't carry audio at all. Your VCR has
either mono or stereo RCA audio output jacks, and you can plug
them into a stereo RCA-> 1/8" stereo headphone plug or adapter
cable to bring it into your sound card. Possibly your video
capture card has a separate jack for that?

Input 0 is probably RF-frequency NTSC with a tuner to select
channels. That's low-quality, but includes audio.

Input 2 is S-Video, which is the best of the available video
connections if your VCR supports it. (I have one that does... if
it still powers up.)


-dsr-

Joe

unread,
May 28, 2021, 5:40:04 PM5/28/21
to
Typically red and white phono connectors are left and right audio,
yellow is composite video. The S-Video connector is normally a four-pin
mini-DIN connector, and also doesn't carry audio.
>
> Input 0 is probably RF-frequency NTSC with a tuner to select
> channels. That's low-quality, but includes audio.
>
> Input 2 is S-Video, which is the best of the available video
> connections if your VCR supports it. (I have one that does... if
> it still powers up.)

--
Joe

Charlie Gibbs

unread,
May 28, 2021, 8:20:04 PM5/28/21
to
On Fri May 28 16:18:42 2021 Dan Ritter <d...@randomstring.org> wrote:

> Charlie Gibbs wrote:
>
>> Note the "Audio: no sound" line. I still have to figure that one out
>> to get beyond silent movies. Any hints?
>
> Yes: composite video doesn't carry audio at all. Your VCR has
> either mono or stereo RCA audio output jacks, and you can plug
> them into a stereo RCA-> 1/8" stereo headphone plug or adapter
> cable to bring it into your sound card. Possibly your video
> capture card has a separate jack for that?
>
> Input 0 is probably RF-frequency NTSC with a tuner to select
> channels. That's low-quality, but includes audio.
>
> Input 2 is S-Video, which is the best of the available video
> connections if your VCR supports it. (I have one that does...
> if it still powers up.)

Yes, my card's inputs show up as RF, composite, and S-Video
respectively. I have composite video coming in just fine.

As for audio, I've run a triple RCA cable (red, white, and yellow) from
the jacks on the VCR to the corresponding jacks on the bracket attached
to my Hauppauge card. It's the same cable I used to hook the VCR to my
TV, where it worked fine. The VCR doesn't have S-Video output.

Presumably the Hauppauge card has an audio encoder somewhere;
I just have to find it. "ls -l /dev/ds*" shows nothing, and
"arecord -l" shows:

**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC892 Alt Analog [ALC892 Alt Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: CX8801 [Conexant CX8801], device 0: CX88 Digital [CX88 Digital]
Subdevices: 0/1
Subdevice #0: subdevice #0

None of those appear to be part of the Hauppauge card; they're probably
on the motherboard. Hmmm, maybe I could use one of them instead...

BTW there's no need to post copies to my e-mail; I see everything
on the list via the Usenet feed to linux.debian.user. Thanks.
--
/~\ Charlie Gibbs | "Some of you may die,
\ / <cgi...@kltpzyxm.invalid> | but it's a sacrifice
X I'm really at ac.dekanfrus | I'm willing to make."
/ \ if you read it the right way. | -- Lord Farquaad (Shrek)

Andrei POPESCU

unread,
May 29, 2021, 2:40:05 AM5/29/21
to
On Vi, 28 mai 21, 17:00:37, Charlie Gibbs wrote:
>
> Presumably the Hauppauge card has an audio encoder somewhere;
> I just have to find it. "ls -l /dev/ds*" shows nothing, and
> "arecord -l" shows:
>
> **** List of CAPTURE Hardware Devices ****
> card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 0: PCH [HDA Intel PCH], device 2: ALC892 Alt Analog [ALC892 Alt Analog]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 2: CX8801 [Conexant CX8801], device 0: CX88 Digital [CX88 Digital]
> Subdevices: 0/1
> Subdevice #0: subdevice #0
>
> None of those appear to be part of the Hauppauge card; they're probably
> on the motherboard. Hmmm, maybe I could use one of them instead...

It's probably the Conexant, unless you know for sure it's on the
motherboard. Maybe you can tell from the output of lspci with -t and -nn
or so.

Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser
signature.asc

Dan Ritter

unread,
May 29, 2021, 8:20:04 AM5/29/21
to
Andrei is correct.

-dsr-

Charlie Gibbs

unread,
May 29, 2021, 8:10:04 PM5/29/21
to
Indeed.

$ lspci | grep Conexant
04:00.0 Multimedia video controller: Conexant Systems, Inc.
CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)
04:00.1 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI
Video and Audio Decoder [Audio Port] (rev 05)
04:00.2 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI
Video and Audio Decoder [MPEG Port] (rev 05)
04:00.4 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI
Video and Audio Decoder [IR Port] (rev 05)

Maybe it's time to change the subject from "How to capture composite
video" to "How to capture audio", since that's where I am now.

--
cgi...@surfnaked.ca (Charlie Gibbs)
If your nose runs and your feet smell, you're built umop-apisdn.
0 new messages