Re: [PLUG] Help with v4l2 Video Driver

2016-12-19 Thread Erik Lane
Thank you everyone!

it looks like I have it solved. It still has issues sometimes, especially
when there are breaks in the tape. (I mean where one recording stops and
the other starts. Looks like it loses tracking and that confuses it.)

So sometimes I have to redo a tape, but eventually I manage to get a
working version. Or I can input the audio in audacity and then merge it
back with ffmpeg.

I had issues getting ffmpeg to bring in the audio from the card. Even
selecting the hardware channel as specified in various pages I found online
doesn't do it. Using VLC I can record the video and audio usually, and once
I had to do it separately, but it worked. So while it might not be ideal
and it will take a bit longer this way, I'm done with trying to get it done
more efficiently. It will be quicker to just get it done now. Knock on
wood, but I think I have my specific problem fixed well enough to get the
job done.

Thanks for the input!
Erik

On Sat, Dec 17, 2016 at 2:39 PM, Tom  wrote:

> This is what I use for v4l webcams - which maybe be identical to your
> video capture card:
> * Finding webcam (part of v4l-utils package) :
> v4l2-ctl --list-devices
> Integrated Camera (usb-:00:14.0-8):
> /dev/video0
> * list formats available for the device:
> ffmpeg -f v4l2 -list_formats all -i /dev/video0
> [video4linux2,v4l2 @ 0xcc7740] Raw   : yuyv422 : YUV 4:2:2
> (YUYV) : 640x480 320x180 320x240 352x288 424x240 640x360 848x480
> 960x540 1280x720
> [video4linux2,v4l2 @ 0xcc7740] Compressed:   mjpeg :
>  MJPEG : 640x480 320x180 320x240 352x288 424x240 640x360 848x480
> 960x540 1280x720
> * play the video:
> mplayer tv:// -tv driver=v4l2:width=640:height=480
> * capturing the video:
> ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0
> video.mkv
> * playing captured video:
> mplayer video.mkv
> Hope this helps you some way, Tomas
> On Sat, 2016-12-17 at 00:02 -0800, Erik Lane wrote:
> > On Fri, Dec 16, 2016 at 7:54 PM, King Beowulf 
> > wrote:
> >
> > > On Thu, Dec 15, 2016 at 08:25 Erik Lane  wrote:
> > >
> > > [snip...]
> > > >
> > > >
> > > >
> > > No one is an expert until you ask questions and fiddle around...
> > >
> > > I haven't used tvtime so not sure of the underlying caoture
> > > libraries.
> > >
> > > I would try ffmpeg.  mplayer/mencoder can be cranky unless the
> > > video format
> > > is absolutely correct - also depends how you distro compiled the
> > > package.
> > >
> > > ffmpeg is more flexible and gives lots of feedback on the CLI. If
> > > the
> > > capture card runs via v4l2 it should work.
> > >
> >
> > >
> > Thanks for the suggestion! I wasn't aware that ffmpeg would take
> > input
> > straight from a card, but I guess it makes sense. This box is
> > reasonably
> > powerful, with 4 cores, but I'm a little worried that transcoding
> > would
> > cause it to miss a frame here or there. I really don't know what kind
> > of
> > power it might take to handle the stream. I know that ffmpeg has a
> > command
> > to simply copy the input to the output with a wrapper around it for
> > some
> > formats at least, so I'll have to see what it can do with a raw
> > stream. I
> > see an example of a simple command to save the input as 'cat
> > /dev/video0 >
> > filename.ts' and if that works then I might do ffmpeg afterwards to
> > turn it
> > into mp4. Though if ffmpeg can save straight to .ts with raw data,
> > that
> > will be another thing I can try.
> >
> > To give added info, since my last post I found out VLC could record
> > from a
> > capture card, as well as stream from one. When I tried it the
> > recording
> > worked well for a while, but ended up with errors in the video file
> > that
> > spit out errors on the command line of missing timestamps and the
> > audio
> > went AWOL somewhere in there. (I started VLC from the command line to
> > easily see the errors.) It actually worked well for about half an
> > hour each
> > time before failing, so I suspect that it might be running out of
> > memory. I
> > have no evidence for that, though. The streaming option looked like
> > everything was good from the GUI, but the command line spit out some
> > errors
> > about missing files, and the video never got sent to a file that I
> > could
> > find. Of course I tried many times with different options and
> > different
> > file names in different directories.
> >
> > I also wiped out the box and started over with mythbuntu, thinking an
> > all
> > in one solution would 'just work' and then I could get this done. It
> > failed. It found the card, but then when I got to a screen where it
> > was
> > going to scan for channels, it couldn't initialize the card. I tried
> > for
> > hours with every variation I could come up with, but no luck.
> >
> > I'll try a bit more in the morning before reinstalling my old system
> > and
> > then seeing if the simple cat or ffmpeg will grab it. I only need 

Re: [PLUG] Help with v4l2 Video Driver

2016-12-17 Thread Tom
This is what I use for v4l webcams - which maybe be identical to your
video capture card:
* Finding webcam (part of v4l-utils package) :
v4l2-ctl --list-devices
Integrated Camera (usb-:00:14.0-8):
/dev/video0
* list formats available for the device:
ffmpeg -f v4l2 -list_formats all -i /dev/video0
[video4linux2,v4l2 @ 0xcc7740] Raw   : yuyv422 : YUV 4:2:2
(YUYV) : 640x480 320x180 320x240 352x288 424x240 640x360 848x480
960x540 1280x720
[video4linux2,v4l2 @ 0xcc7740] Compressed:   mjpeg :   
 MJPEG : 640x480 320x180 320x240 352x288 424x240 640x360 848x480
960x540 1280x720
* play the video:
mplayer tv:// -tv driver=v4l2:width=640:height=480
* capturing the video:
ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0
video.mkv
* playing captured video:
mplayer video.mkv
Hope this helps you some way, Tomas
On Sat, 2016-12-17 at 00:02 -0800, Erik Lane wrote:
> On Fri, Dec 16, 2016 at 7:54 PM, King Beowulf 
> wrote:
> 
> > On Thu, Dec 15, 2016 at 08:25 Erik Lane  wrote:
> > 
> > [snip...]
> > > 
> > > 
> > > 
> > No one is an expert until you ask questions and fiddle around...
> > 
> > I haven't used tvtime so not sure of the underlying caoture
> > libraries.
> > 
> > I would try ffmpeg.  mplayer/mencoder can be cranky unless the
> > video format
> > is absolutely correct - also depends how you distro compiled the
> > package.
> > 
> > ffmpeg is more flexible and gives lots of feedback on the CLI. If
> > the
> > capture card runs via v4l2 it should work.
> > 
> 
> > 
> Thanks for the suggestion! I wasn't aware that ffmpeg would take
> input
> straight from a card, but I guess it makes sense. This box is
> reasonably
> powerful, with 4 cores, but I'm a little worried that transcoding
> would
> cause it to miss a frame here or there. I really don't know what kind
> of
> power it might take to handle the stream. I know that ffmpeg has a
> command
> to simply copy the input to the output with a wrapper around it for
> some
> formats at least, so I'll have to see what it can do with a raw
> stream. I
> see an example of a simple command to save the input as 'cat
> /dev/video0 >
> filename.ts' and if that works then I might do ffmpeg afterwards to
> turn it
> into mp4. Though if ffmpeg can save straight to .ts with raw data,
> that
> will be another thing I can try.
> 
> To give added info, since my last post I found out VLC could record
> from a
> capture card, as well as stream from one. When I tried it the
> recording
> worked well for a while, but ended up with errors in the video file
> that
> spit out errors on the command line of missing timestamps and the
> audio
> went AWOL somewhere in there. (I started VLC from the command line to
> easily see the errors.) It actually worked well for about half an
> hour each
> time before failing, so I suspect that it might be running out of
> memory. I
> have no evidence for that, though. The streaming option looked like
> everything was good from the GUI, but the command line spit out some
> errors
> about missing files, and the video never got sent to a file that I
> could
> find. Of course I tried many times with different options and
> different
> file names in different directories.
> 
> I also wiped out the box and started over with mythbuntu, thinking an
> all
> in one solution would 'just work' and then I could get this done. It
> failed. It found the card, but then when I got to a screen where it
> was
> going to scan for channels, it couldn't initialize the card. I tried
> for
> hours with every variation I could come up with, but no luck.
> 
> I'll try a bit more in the morning before reinstalling my old system
> and
> then seeing if the simple cat or ffmpeg will grab it. I only need to
> save
> about 10 old VHS tapes from being lost to history, so manual
> processes are
> perfectly acceptable. Once I'm done with this, fingers crossed I
> won't need
> to do something like this again. (Well, until the next friend comes
> up with
> an old irreplaceable tape or whatever.) :)
> 
> Thanks for the suggestions!
> Erik
> ___
> PLUG mailing list
> PLUG@lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Help with v4l2 Video Driver

2016-12-17 Thread Erik Lane
On Fri, Dec 16, 2016 at 7:54 PM, King Beowulf  wrote:

> On Thu, Dec 15, 2016 at 08:25 Erik Lane  wrote:
>
> [snip...]
> >
> >
> >
> No one is an expert until you ask questions and fiddle around...
>
> I haven't used tvtime so not sure of the underlying caoture libraries.
>
> I would try ffmpeg.  mplayer/mencoder can be cranky unless the video format
> is absolutely correct - also depends how you distro compiled the package.
>
> ffmpeg is more flexible and gives lots of feedback on the CLI. If the
> capture card runs via v4l2 it should work.
>

>
Thanks for the suggestion! I wasn't aware that ffmpeg would take input
straight from a card, but I guess it makes sense. This box is reasonably
powerful, with 4 cores, but I'm a little worried that transcoding would
cause it to miss a frame here or there. I really don't know what kind of
power it might take to handle the stream. I know that ffmpeg has a command
to simply copy the input to the output with a wrapper around it for some
formats at least, so I'll have to see what it can do with a raw stream. I
see an example of a simple command to save the input as 'cat /dev/video0 >
filename.ts' and if that works then I might do ffmpeg afterwards to turn it
into mp4. Though if ffmpeg can save straight to .ts with raw data, that
will be another thing I can try.

To give added info, since my last post I found out VLC could record from a
capture card, as well as stream from one. When I tried it the recording
worked well for a while, but ended up with errors in the video file that
spit out errors on the command line of missing timestamps and the audio
went AWOL somewhere in there. (I started VLC from the command line to
easily see the errors.) It actually worked well for about half an hour each
time before failing, so I suspect that it might be running out of memory. I
have no evidence for that, though. The streaming option looked like
everything was good from the GUI, but the command line spit out some errors
about missing files, and the video never got sent to a file that I could
find. Of course I tried many times with different options and different
file names in different directories.

I also wiped out the box and started over with mythbuntu, thinking an all
in one solution would 'just work' and then I could get this done. It
failed. It found the card, but then when I got to a screen where it was
going to scan for channels, it couldn't initialize the card. I tried for
hours with every variation I could come up with, but no luck.

I'll try a bit more in the morning before reinstalling my old system and
then seeing if the simple cat or ffmpeg will grab it. I only need to save
about 10 old VHS tapes from being lost to history, so manual processes are
perfectly acceptable. Once I'm done with this, fingers crossed I won't need
to do something like this again. (Well, until the next friend comes up with
an old irreplaceable tape or whatever.) :)

Thanks for the suggestions!
Erik
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Help with v4l2 Video Driver

2016-12-16 Thread King Beowulf
On Thu, Dec 15, 2016 at 08:25 Erik Lane  wrote:

> Hello,
>
>
>
> I'm having a problem even figuring out how to word my question. I've tried
>
> many searches, but I haven't been able to find it.
>
>
>
> I'm trying to record a VHS tape to a video file. I have a Hauppauge
>
> internal video card (HVR-1255 it shows up as in dmesg, but the label says
>
> 1250.)
>
>
>
> When I try to use any video recorder, I have all kinds of issues. I finally
>
> managed to get mplayer to show some video, but it was black and white, and
>
> not even very good looking at that. I also tried in TvTime, and it shows a
>
> wonderful picture as well as good audio.
>
>
>
> So my question is, how do I get a look at what settings TvTime is sending
>
> to the video driver? If at all possible I would like to duplicate those so
>
> that mencoder can capture the video for me. If people know directly, great,
>
> but if someone can give me a clue stick on even what terms to search for,
>
> I'd be very grateful!
>
>
>
> If I've left out any important details, please let me know. I'm an
>
> engineer, not a linux or computing professional, so while I'm very
>
> comfortable with linux, I'm definitely no expert. I have Linux Mint 18 on
>
> here, and it's 64 bit.
>
>
>
No one is an expert until you ask questions and fiddle around...

I haven't used tvtime so not sure of the underlying caoture libraries.

I would try ffmpeg.  mplayer/mencoder can be cranky unless the video format
is absolutely correct - also depends how you distro compiled the package.

ffmpeg is more flexible and gives lots of feedback on the CLI. If the
capture card runs via v4l2 it should work.
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Help with v4l2 Video Driver

2016-12-15 Thread Erik Lane
Hello,

I'm having a problem even figuring out how to word my question. I've tried
many searches, but I haven't been able to find it.

I'm trying to record a VHS tape to a video file. I have a Hauppauge
internal video card (HVR-1255 it shows up as in dmesg, but the label says
1250.)

When I try to use any video recorder, I have all kinds of issues. I finally
managed to get mplayer to show some video, but it was black and white, and
not even very good looking at that. I also tried in TvTime, and it shows a
wonderful picture as well as good audio.

So my question is, how do I get a look at what settings TvTime is sending
to the video driver? If at all possible I would like to duplicate those so
that mencoder can capture the video for me. If people know directly, great,
but if someone can give me a clue stick on even what terms to search for,
I'd be very grateful!

If I've left out any important details, please let me know. I'm an
engineer, not a linux or computing professional, so while I'm very
comfortable with linux, I'm definitely no expert. I have Linux Mint 18 on
here, and it's 64 bit.

Thanks,
Erik
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug