> -----Original Message-----
> From: mythtv-users-bounces at mythtv.org> [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of adam wisely
> Sent: Monday, December 11, 2006 7:14 PM
> To: mythtv-users at mythtv.org> Subject: [mythtv-users] non-cable video source
>> hey guys,
>> my pvr-150 has the normal cable-in in the back of the card,
> but it also has an s-video and composite-in back there, too.
> i was wondering if it were possible (and how to do it) to use
> those second two to play video from an alternative source
> (say, my video camera) through my capture card, and have
> mythtv record it.
>> is there an easy way to do this? or i suppose i could just
> use a different combination of programs to import them to the
> box, outside of mythtv.
I am in the midst of writing this readme (to myself) documenting what I have
been trying.
I have this working for capturing the output from a VCR or Video Camera
outside of MythTV. I had just started adding the necessary gear in MythTV
setup, but haven't had a chance to test it.
Anyway, I found this from googling the gossamer site. Make use of it where
you can.
Dave
******
To capture videos from a video camera or other external source
this thread provides very good information:
http://www.gossamer-threads.com/lists/mythtv/users/232857?search_string=chan
ge%20capture%20resolution;#232857
Record shows outside of Myth, but using the video capture card:
So, basically, although you can do as you asked, doing so is probably
not what you want because Myth was designed as a PVR, not as an
interactive recording application. Therefore, it may actually make a
lot more sense to just find a time when a capture card isn't in use and
use "dd if=/dev/video4 of=/home/me/MySummerVacation.mpg". (This example
shows using capture card 5 because it's the least likely to be used for
recordings. If you only have 1 card, use "/dev/video0", or with 2 cards
use "/dev/video1", or ...) Note, though, that with this approach,
you'll have to run the appropriate ivtvctl commands to set the format,
resolution, and input before using dd to capture.
Something like:
Note, ivtvctl has been changed to v4l2-ctl in version 0.8.1
ivtvctl -u 0x3000
ivtvctl -p 6
ivtvctl -f width=720,height=480
dd if=/dev/video0 of=/tmp/myvideo.mpg
So this becomes:
Each tuner has multiple inputs. You can see this with:
v4l2-ctl -n
ioctl: VIDIOC_ENUMINPUT
Input : 0
Name : Tuner 1
Type : 0x00000001
Audioset: 0x00000007
Tuner : 0x00000000
Standard: 0x0000000000001000 ( NTSC )
Status : 0
Input : 1
Name : S-Video 1
Type : 0x00000002
Audioset: 0x00000007
Tuner : 0x00000000
Standard: 0x0000000000FFFFFF ( PAL NTSC SECAM )
Status : 0
Input : 2
Name : Composite 1
Type : 0x00000002
Audioset: 0x00000007
Tuner : 0x00000000
Standard: 0x0000000000FFFFFF ( PAL NTSC SECAM )
Status : 0
Input : 3
Name : S-Video 2
Type : 0x00000002
Audioset: 0x00000007
Tuner : 0x00000000
Standard: 0x0000000000FFFFFF ( PAL NTSC SECAM )
Status : 0
Input : 4
Name : Composite 2
Type : 0x00000002
Audioset: 0x00000007
Tuner : 0x00000000
Standard: 0x0000000000FFFFFF ( PAL NTSC SECAM )
Status : 0
You can set the input using:
v4l2-ctl --device=0 --set-format=width=480,height=480
v4l2-ctl --device=0 --set-standard=0x003000
v4l2-ctl --device=0 --set-input=2
Video input set to 2 (Composite 1)
dd if=/dev/video0 of=/tmp/myvideo.mpg
CTRL-C to stop recording
-- Make sure you set the input back to 0 when done!!!!
v4l2-ctl --device=0 --set-input=0
Transcoding the file when finished:
# Make sure mencoder has been installed
aptitude search mencoder
# http://www.mythtv.org/wiki/index.php/Transcoding_for_the_PDA
# Transcode Using lavc's mpeg4 (this is what I use)
mencoder -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=300:vhq:vpass=1 \
-vf scale=320:240 -oac lavc -lavcopts acodec=ac3:abitrate=128
-ffourcc \
DX50 -o $VIDEODIR/pda/$TITLE-$STARTTIME.avi $VIDEODIR/$FILENAME
# -ovc - encode using this video codec: mp3lame, lavc
# -oac - use this audio type: mp3lame, lavc
mencoder -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=300:vhq:vpass=1
-oac lavc -lavcopts acodec=ac3:abitrate=128 -ffourcc DX50 -o squash.avi
squash_20061130_JeffRoth.mpg
mencoder -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=400:vhq:vpass=1
-oac lavc -lavcopts acodec=mp3:abitrate=128 -ffourcc DX50 -o squash.avi
squash_20061130_JeffRoth.mpg
Should do. Submit the last command--the dd command--when you're ready
to start recording. Then, when finished, use Ctrl-C to stop the
recording (you may want to record a few seconds longer than necessary so
you can clean up the end of the recording with an MPEG editor).
Setup a channel in Myth to record input from a video camera
Shut down mythfrontend and mythbackend. Run mythtv-setup.
In "Video Sources", create a new video source (i.e. "VCR" or "Digital
Video Camera" or "External" or whatever--just make sure you give it a
name). For the grabber, select, "No grabber." Select "Finish". Hit
Escape to go back to the menu.
In "Channels", create a new channel. Give it a name (like "VCR" or
"Camera" or "External" or ...) and a unique channel number (one that
doesn't yet exist on your system) and callsign ("VCR", "Cam", "Ext",
"Other Stuff", ...). Select the video source you just created. While
you're at it, you'll probably want to mark the channel as commercial
free (depends on your home movies, I guess :). Select "Next." Do /not/
change the "Frequency or Channel" field--it should be exactly the same
as the channel number you specified previously. Select "Finish". Hit
Escape to go back to the menu.
In "Input Connections", associate the new source to the appropriate
input. Set the "External channel change command" to "/bin/true" (no
quotes). Do /not/ fill in a value for "Preset tuner to channel", do
/not/ "Scan for channels" or "Fetch channels from listings source".
Ensure the channel you just created is selected as the starting
channel. Select "Finish". Hit Escape to go back to the menu.
Exit mythtv-setup. You'll be told to run mythfilldatabase, but--since
your new source uses "No grabber", it's unnecessary. So, start up
mythbackend and mythfrontend. Then, create manual recording schedules
to record from your camera.
What? Manual recording schedules?
Yep.
Using manual recording schedules is not ideal because it's
non-interactive (as a PVR should be). So, when creating a manual
recording, you'll be able to specify a name (which is good), but you
must specify a start time and an end time (which isn't so good).
Therefore, you have to guess the content's length and specify a
longer-than-the-content recording time to allow for starting the video
sometime after the recording starts and ensuring it ends sometime before
the recording stops.
Note, though, that if you start watching LiveTV and hit record, Myth
will create a 30-minute manual recording starting at the time you press
record. If you need to extend the recording time, you will have to exit
LiveTV and modify the end time on the in-progress recording before the
recording finishes. Also, recordings made on "channels" with no guide
data will get terrible names if recorded from LiveTV with the record
button, so manual recordings--which allow specifying names for the
recordings--are much more appropriate.
If you just "watch" LiveTV to do the recordings, Myth will in fact
record input; however, you'll encounter similar issues as with the
record button. Since you have no guide data, the recordings will have
terrible names and will be broken into 30-minute segments. I think with
LiveTV, though, the first segment breaks on the half-hour--i.e. at the
top of or half-past an hour on the clock, regardless of when you started
watching LiveTV, so the first segment will be less than 30 minutes
long. Note, also, that it's critical that you change the recording
group from LiveTV to something else if you record the video this
way--otherwise, the recording will be autoexpired "tomorrow."
******