Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #235618 > unrolled thread

Re: How to capture composite video

Started byCharlie Gibbs <cgibbs@surfnaked.ca>
First post2021-05-28 19:30 +0200
Last post2021-05-28 19:40 +0200
Articles 4 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  Re: How to capture composite video Charlie Gibbs <cgibbs@surfnaked.ca> - 2021-05-28 19:30 +0200
    Re: How to capture composite video Dan Ritter <dsr@randomstring.org> - 2021-05-28 19:50 +0200
      Re: How to capture composite video Joe <joe@jretrading.com> - 2021-05-28 23:40 +0200
    Re: How to capture composite video deloptes <deloptes@gmail.com> - 2021-05-28 19:40 +0200

#235618 — Re: How to capture composite video

FromCharlie Gibbs <cgibbs@surfnaked.ca>
Date2021-05-28 19:30 +0200
SubjectRe: How to capture composite video
Message-ID<CjOt4-7p1-13@gated-at.bofh.it>
[copy of posting to comp.os.linux.misc]

References: <s7pfr30196f@news1.newsguy.com> <atk9nh-fs1.ln1@aretha.foo>

On 2021-05-17, Peter 'Shaggy' Haywood <phaywood@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 <olschewski@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
\ /  <cgibbs@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

[toc] | [next] | [standalone]


#235619

FromDan Ritter <dsr@randomstring.org>
Date2021-05-28 19:50 +0200
Message-ID<CjOMp-7vI-3@gated-at.bofh.it>
In reply to#235618
Charlie Gibbs wrote: 
> [copy of posting to comp.os.linux.misc]
> 
> References: <s7pfr30196f@news1.newsguy.com> <atk9nh-fs1.ln1@aretha.foo>
> 
> On 2021-05-17, Peter 'Shaggy' Haywood <phaywood@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-

[toc] | [prev] | [next] | [standalone]


#235635

FromJoe <joe@jretrading.com>
Date2021-05-28 23:40 +0200
Message-ID<CjSmZ-1eO-7@gated-at.bofh.it>
In reply to#235619
On Fri, 28 May 2021 13:45:35 -0400
Dan Ritter <dsr@randomstring.org> wrote:

> Charlie Gibbs wrote: 
> > [copy of posting to comp.os.linux.misc]
> > 
> > References: <s7pfr30196f@news1.newsguy.com>
> > <atk9nh-fs1.ln1@aretha.foo>
> > 
> > On 2021-05-17, Peter 'Shaggy' Haywood <phaywood@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?

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

[toc] | [prev] | [next] | [standalone]


#235620

Fromdeloptes <deloptes@gmail.com>
Date2021-05-28 19:40 +0200
Message-ID<CjOCK-7sh-17@gated-at.bofh.it>
In reply to#235618
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web