|
Digital Video Archive
Status
- Gubbio's AIW card could probably be made to work, but the MythTV Howto says it doesn't have all the features needed
- Ordered the AverTV Stereo, on the recommendation of Top tuners
- See also TV-capture
Software and guides
Commands
- Play the video coming in on the capture device (see the video4linux-list for more hints):
- cat /dev/video0 | xine -
- cat /dev/video0 | mplayer -nocache -
- basically you can pipe it to any application
- Encode to mpeg-2 for DVD (see transcode 0.6.13 changelog from 26 October 2004):
- --export_prof dvd-ntsc for encoding using mpeg2enc/mp2enc or
- --export_prof dvd-ntsc -y ffmpeg for encoding using libavcodec/ffmpeg (fast!)
- "A new option to export_dvraw "static_qno" to supply this value to libdv (this seems to help to make encoding a lot faster)"
- Transcode likely won't have the amd64 asm optimizations until 0.6.14 (they've been submitted)
- Capture
- Encoding
- ffmpeg -i test-006.vob -aspect 16:9 -s 320x180 -f mov -vcodec h263p -acodec mp3 test-006.mov
- ffmpeg -i test-006.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 test-006.avi
- ffmpeg -formats (show full list of codecs)
- DE ac3 raw ac3
- DE dv DV video format
- D dv1394 dv1394 A/V grab
- E dvd MPEG2 PS format (DVD VOB)
- E vob MPEG2 PS format (VOB)
- DE h263 raw h263
- DE h264 raw H264 video format
- DE m4v raw MPEG4 video format
- E mov mov format
- DE mp3 MPEG audio layer 3
- E mp4 mp4 format
- DE ogg Ogg Vorbis
- E rtp RTP output format
- D rtsp RTSP input format
- DE swf Flash format
- MPEG4IP's mp4creator will take an xvid file and turn it into H.264 -- see commands and instructions
-
apt-get -t experimental install libpango1.0-0
(also installs libpango1.0-common)
-
apt-get install mpeg4ip-player mpeg4ip-server (also installs mpeg4ip-libs) (see repository)
- installed on sigillo 28 Oct 2004
- MPEG4IP forum (active)
- Encoding frontends
Codecs
- H.264 offers a method for compressing and decompressing video (codec
for short) and is used in the authoring of digital video streaming in
MPEG-4 formats, including for HD. The codec is slated to replace the
MPEG-2 format, commonly used by broadcasters and in multimedia
products, such as DVDs and video games, today. Developed by the DVD Forum. Ffmpeg got what looked like extensive support for playback in December 2004. VideoLAN hosts an encoder project still in CVS, but also used by mplayer; cf. mailing list.
Encoding mpeg2 to H.263 with ffmpeg -- borked audio
On 28 October 2004 I tried using clitunno for ffmpeg transcoding, going from mpeg2 to H.263, like this:
$ ffmpeg -i Imitation-of-Life-006.vob -aspect 16:9 -s 320x180 -f mov -vcodec h263p -acodec mp3 Imitation-of-Life-006.mov
ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice Bellard
The process takes up 100% of one of the CPUs, but does not use the
second (so I can keep running other programs without touching
it). The results? A jerky picture for a few seconds, but then
perfect -- but no audio in xine, and just intense squeaks in mplayer.
However, the sound is fine in ffplay -- just not in sync.
I suppose it might be a mistake to show the audio codec as .mp3 instead
of just mp3. I then tried this using "-acodec copy" and got a much
higher bitrate -- 400 kbits/s rather than 270 -- but the encoding was
also a lot faster:
$ ffmpeg -i Imitation-of-Life-006.vob -aspect 16:9 -s
320x180 -f mov -vcodec h263p -acodec copy
Imitation-of-Life-006-clitunno.mov
But no -- mplayer says "Cannot find codec for audio format 0x20736D" and xine finds no sound this time either.
Note audio is given as "ms". Again, ffmplay has no problems, though the audio is not in sync.
Marillat's ffmpeg is buggy so I installed his ffmpegcvs libavcodeccvs and retried:
$ ffmpeg -i Imitation-of-Life-006.vob -aspect 16:9 -s 320x180 -f mov -vcodec h263p -acodec mp3 Imitation-of-Life-006-sigillo.mov
ffmpeg version cvs, build 4725, Copyright (c) 2000-2004 Fabrice Bellard
Same results as for the other two. So the problem seems to be that ffmpeg creates an mp3 stream that other players cannot see.
Installation history
28 November 2004: Building MythTV on amd64.
- add this line to sources.list and run update:
deb-src http://dijkstra.csh.rit.edu/~mdz/debian unstable mythtv
- cd /share/software/tarballs
- just source mythtv
- cd mythtv-0.16
- pico debian/control -- add this to dependencies, after liblame-dev:
| liblame0-dev
- just install libqt3-mt-dev libmysqlclient-dev liblircclient-dev libartsc0-dev (this will also install mysql-common)
- fakeroot dpkg-buildpackage
This
builds fine -- but note that ubuntu also has an amd64 deb in their
"multiverse archives", and it may be worth using their lame package, as
well as other multimedia packages.
Hanno 'Rince' Wagner <wagner@rince.de> writes on 16 Feb 2005 to the debian-amd64 list,
After patching some of the pthread-functions it works like a charm.
His patches are here:
http://www.krose.org/~krose/static/RingBuffer.diff
Greg Grotsky <spikeygg@hotmail.com> writes on 14 February 2005 to debian-amd64,
if you want to compile MythTV with gcc-3.4 which is
what you'll need if you want the 64bit instruction set then you need to
add these lines to your settings.pro before you compile. (I found
them on a google search, they were on some Japanese page intermingled
with the forien characters.)
CONFIG += release /* this line exists */
QMAKE_CC = gcc-3.4 /* add this line */
QMAKE_CXX = g++-3.4 /* add this line */
QMAKE_LINK = g++-3.4 /* add this line */
isEmpty( PREFIX ) { /* this line exists */
Then it'll compile with the "good" instruction set.
If anyone is using the AMD64 port with a pcHDTV card and has it working
well, please email me. I'm struggling with this card trying to
get it working with Myth and 64 bits. I have it sorta working but
it's hit and miss for watching live TV. If I try to go watch live
TV it will work without sound 1 out of 10 times. The other times
it just gives me a black screen while I can hear the drives
working. It's like the frontend just freezes.
Also, if you guys want to compile with native ARTS support, the directory locations are as follows (also in settings.pro)
# For Debian
ARTS_LIBS = -L/usr/lib/kde3 -ldl -lartsc -lpthread
EXTRA_LIBS += -L/usr/lib/kde3 -ldl -lartsc -lpthread
INCLUDEPATH += /usr/include/kde
I found that the default settings and the Mandrake settings didn't make
sense with the Debian AMD64 port. I believe the locations above
are correct... at least it compiled on my machine. :P
I also downloaded the pcHDTV driver from
http://www.pchdtv.com/downloads.html, called HD-3000-CD-03.tar.gz. The driver is in
a directory called FedoraCore2-Kernel-2.6-systems -- a reason to get a
32-bit version of FedoraCore2 with the new machine ($90). The driver is
basically a patched subset of the kernel drivers in
/usr/src/kernel-source-2.6.8/drivers/media/video/ -- which means
building for Debian is likely doable, but going with FedoraCore2 is the
way to go for the pilot. This also means you should order the 32-bit
version of FedoraCore2 and let someone else do the job. That would
actually work! You can hand it over with a good conscience.
26 October
2004: I picked a tuner from the MythTV favorites list
-- I got the AverTV Stereo for $41 directly from AverMedia, in a
close-out sale. I picked it because it does 720x480 capture and has
coax.
I looked at the prices of CPUs -- PriceWatch has the AMD Athlon64 3000+
for $150 and the mobo combo (ASUS, GB LAN, SATA) for $240. According to
the guy adding amd64 assembler (asm/yasm) fixes to xvid:
"On my athlon64 3000+ box with the plain C version I
get ~6fps encoding a 720x576 with standard settings but qpel enabled.
With the new assembler code I get ~25fps." Source
So the new capture card does does 720x480, so you see we're right there
for realtime software encoding. The dual opteron should do it, though I
haven't tested the new code yet. I would guess we get realtime. But it
would be a box for every channel. For mass conversion of the archives
we should just wait for the H.264 encoder cards.
Here's a proposal for getting such a box:
For the news archive project, I suggest we get a
faster computer than my decrepit box to run tests on, and add one or
two TV tuner cards:
1. A frame grabber card -- compress the video with a software codec
2. A frame grabber card with an mpeg2 (DVD standard) hardware encoder
Advantage of the mpeg-2 encoder card: "WinTV-PVR-250 can record full
screen TV or video from a VCR or camcorder, using as little as 1.5GB of
hard disk space per hour."
For the test machine, I'd say something like this:
- CPU: AMD Athlon 64 3000
- MB : ABIT K8N w/ SATA (or ASUS K8V-X w/ GB LAN)
- HDD: 1 x 160GB IDE
- RAM: 512MB
Motherboard: http://usa.asus.com/products/mb/socket754/k8v-x/overview.htm
Infinity Systems in OH will ship for free:
ABIT K8N & AMD ATHLON 64 3000 $238.00
HDD:
160GB
$ 77.00
MEMY: 512MB
RAM
$ 85.00
CASE:
CSCOMET
$ 35.00
WARR: 1YEAR
ASSEMBLY:
$ 5.00
Total: $440.00
That's a bare bones box with no operating system or video card, but
powerful enough to let us test realtime video encoding (64-bit).
Project hardware expenses:
Hauppauge WinTV-Go -- $50
Hauppauge WinTV-PVR-250 -- $130
PC
-- $440
---------------------------------------------------
Total
$620
======================
We could leave out the Hauppauge WinTV-PVR-250 and go ahead with just $490 in hardware costs and no hardware encoder.
We'll use free software -- Linux and MythTV, combined in the KnoppMyth project, http://www.mysettopbox.tv/knoppmyth.html
20 October 2004: I installed ati.2 to drive Gubbio's AIW card, and
avview to watch, but so far no signal -- it could be a cable issue. It
disables DRI -- but note that TV-in and DRI are properly integrated in
the new Xorg tree, which Debian is switching to. So just leave it for
now. You might try Ubuntu next time -- they may use Xorg already.
|
|