Capture VHS and convert to DVD (DRAFT)

Discuss Linux and open source software (including development) here.

Capture VHS and convert to DVD (DRAFT)

New postby stmok on 10 Sep 2006, 01:58

PLEASE NOTE: THIS IS ONE LARGE ARTICLE. ITS NOT YET COMPLETE AS THERE IS ALOT TO DOCUMENT. I'M ACTUALLY DOCUMENTING THIS IN CASE I LOSE MY NOTES. IT WILL GIVE YOU A ROUGH IDEA ON WHAT TO EXPECT IN LINUX.

WARNING: This article is for informational purposes only. No one in this forum, including author and owners of the website are resposible for what you do with the information. They also are not responsible if it causes your systems to melt down, making you scream "Dammit!" in a Jack Bauer voice. You're a Linux user, and there's no one to blame but you, if you screw up. So read carefully and make backups where necessary.


Introduction
One of the coolest things about getting a capture card, is that you can convert your VHS tapes to DVD. (or any other format you wish). In this article, I'm going to show my experiences and such on how I set a system up with this capability. Bare in mind, this is not anything elegant or very user-friendly...To be honest, its down right half-arsed and a bit complicated, but it produces a surprisingly awesome result. (I didn't know until after I burnt the DVD and played it on a DVD player!)


Objectives of this project?
* Capture in MPEG2 at DVD quality. (9.6Mbit, PAL, etc)
* Convert VHS tapes to DVD form.
* Output from PC to TV for viewing.
* Capture TV shows, edit Ads out, to be viewed at a time of convenience.
* Software cost must be kept to a minimum. (Preferably $0)

Naturally, to satisfy the last objective, we're gonna use a Linux distro in this example. For simplicity, I just went with Ubuntu 6.06 LTS, and made the desktop look pleasant for the rest of the family to use. (As in I made sure the Home folder, My Computer and Garbage Bin was in the familiar location as found on Windows desktop, and applied the "Nuvola" theme...This is more of a psychological thing, to break some generalistic views about Linux being ugly command line stuff).


Hardware?
Hardware can be pretty much anything you want, but with a few conditions. (To narrow down the options and give you some direction).

Try to get a video card with a TV-encoder chip for its TV-OUT. (They're generally the way to go). Motherboards with the Geforce 6150 IGP with nForce 430 South Bridge will have such an encoder built into the IGP. I think such a mobo under the ASUS brand also has a S-VIDEO connection for TV-OUT. (Its on a separate bracket that occupies one of the PCI spaces in the PC case). The other alternative is look into getting a Geforce 6-series or 7-series video card. (As they both have TV-encoder integrated on the GPU...A GF6200 should do the trick! Nice and cheap, comes in PCI-Express and AGP versions).

NOTE: I'm only in favour of Nvidia products under Linux, as they're generally very easy to set up. Otherwise, I would go with any solution that works well. At this time, Nvidia video cards are considered better supported and have better OpenGL performance.

The next thing to look out for is the S-VIDEO connection. There's two types of connectors. One has 4-pins, while the other has 7-pins. (Don't ask me why that is, just accept it). Make sure your cabling, TV-OUT of Video card, and TV are all compatible in this sense. (In my case, the TV and the TV-OUT on the PC uses the 4-pin type. So I rocked up to Dick Smith Electronics and bought a pair of fairly long S-VIDEO cables. Also note your audio connectors!

CPU speed?...This depends on the content you're playing. I'm using DVD quality at most, as I'm not gonna bother with HD content. Generally, this will vary. But you definitely need something of at least 1.6Ghz or more for DVD quality MPEG2 video. I'm assuming you are unable to get XvMC properly working or that feature isn't supported on your video card (ATI video cards?). So you're using some lesser playback assisted solution with video playback and compensating with raw CPU grunt.

Side note:
XvMC or X-Video Motion Compensation is to Linux as DxVA or DirectX Video Acceleration is to Windows. The idea is to dump the load of video playback to your video card's GPU. (as that is actually far more powerful than your CPU, which is really just a general purpose processor...ie: Jack of all trades, master of none). Both XvMC and DxVA do Motion Compensation and iDCT (Inverse Discrete Cosine Transform)...They become very important in the case of HD content, as they lower the CPU requirements quite dramatically. Allowing you to play 1080i HDTV content in realtime. Geforce video cards should support this. (Nvidia's Linux driver apparently does support this feature). BUT Ati cards may not. (Correct me if I'm wrong). If you're on a budget, consider a GF6200 or low end GF6600. And if you run into issues, go to the Linux section of the official Nvidia help forums. http://www.nvnews.net



Capture card will depend on whatever is compatible with Linux. I went with a Hauppauge PVR-150MCE. Yes, this solution is really intended for MS Windows XP Media Center Edition, but it works fine in Linux. The only difference between this and the non-MCE model is the lack of remote control and the price is more affordable. (I'm not gonna bother with a remote for this project, so I went with the MCE of the PVR-150 series)

So in this example, I'm using this...

* Celeron 1.2Ghz (Tualatin)
* ASUS P3C-D (i820 chipset)
* 512MB SDRAM (via SDRAM to RDRAM converter)
* Seagate 7200.7 80GB HDD (PATA)
* Sony DVD burner
* SB Audigy sound card
* ASUS GF2 MX400 (has a TV encoder chip for TV-OUT, a Conexant chip!)
* Hauppaugge PVR-150MCE Low-profile version (comes with full height bracket...Does NOT have a remote control).

Aside from the capture card and DVD burner, everything else was just bits lying on the shelf. :lol:

NOTE: The Celeron 1.2Ghz is "just" barely enough to playback DVD quality streams via mplayer. When you watch videos, you'll just notice the frame rate slow a tiny bit and there is slight tearing. (Its just noticeable, but hard to spot for the majority of the time)...I recommend something like a Sempron 1.6Ghz (Socket 754) or faster. Something with more grunt. (But it doesn't have to be a top-end solution!)...This is assuming you can't get XvMC to work under mplayer.

For capturing, the PVR-150MCE card uses a hardware accelerated chip from Conexant. This takes the load off the CPU when capturing, so CPU usage is like 6% at its peak when capturing at DVD quality. So thankfully, Linux is supporting this feature via the ivtv driver.

If you're using a low-end system, and only plan to play MPEG2 video, you can try to use a DVD decoder card like the Sigma Designs Hollywood Plus, and output it to that. (WARNING: There is NO support for the newer Sigma Designs XCard under Linux!)...To get the Hollywood Plus working under Linux with mplayer, please see http://dxr3.sourceforge.net/ for driver.

Another option is to spend more on the PVR-350 model. This has both hardware acceleration of capturing and playback. This way, you only need to use the single ivtv driver.

And finally, hard disk space. Get a huge one. (Remember, PIII-era motherboards only support up to 127GB, due to BIOS limitation...I recommend getting a SATA PCI controller card and getting a SATA HDD). Otherwise, if its a more recent motherboard, just buy a large hard disk. At the time of this post, the 320GB-class is the current "sweet spot" in regards to "price per megabyte".

MPEG2 video takes up a great deal of disk space. For example, I tried capturing Jackie Chan's "Rumble in the Bronx" (90min movie) via pay TV, and that it took up approx 5.5GB from start of movie, to end of credits.


Connecting up to a TV...
The TV is an old Philips one that is made in Belgium. We got it from a store called Brashes in Blacktown. (They don't exist now, as they've closed down and disappeared from the face of the earth).

The TV has 2 SCART (or Euroconnector) connections, as well as three S-Video connections. (1 output, 2 inputs). It also has two D2B or DDB connections...D2B stands for Domestic Digital Bus. (I have no idea what that's for, and have never used it).

Anyway, it has 3 "External Connections".

EXT 1: To Sony DVD player via SCART to RCA cables
EXT 2: To PC via S-VIDEO/audio cables (two sets: inputs and outputs)
EXT 3: To Sony video via S-Video/RCA cables

The TV setup looks like this...

Code: Select all
                               ---------> EXT 1: DVD player
----------                     |
|        |---------------------
|   TV   |------------------------------> EXT 2: To/From PC
|        |---------------------
----------                     |
                               ---------> EXT 3: Video (to OptusTV set top box)


A more detailed view of the connection to/from PC to TV (EXT 2).

Code: Select all

------                   
|    |<--- EXT 2: IN <--- TV-OUT (S-Video) of video card, Line-OUT (SB Audigy)
| TV |
|    |---> EXT 2: OUT ---> TV-IN (S-Video) and Line-IN (3.5mm) of PVR-150
------                   



I set it so the TV directs the AV signals from EXT3 to EXT2. (This allows me to capture Cable TV channels as well as old VHS tapes). The issue with this arrangement is that I need to have the TV and video on. (but can have the volume on TV muted).

I'm NOT using the Tuner on the Hauppauge card, just the S-VIDEO and audio-in connections. (I'm not using the FM radio tuner either). Channel changing is from Optus TV (analog) or video.


Software?
* Ubuntu 6.06.1 LTS (Kernel version 2.6.15-26-386)
* Nvidia driver (set up such that the TV-OUT and VGA outputs are on separate X-Screens).
* The ivtv driver is compiled and installed for the Hauppauge card.
* mplayer (video playback).

Comments about setting up
I'd have to say, the Hauppauge PVR-x50 series of cards are a pain in the A$$ to set up.

On Windows, you play the "let's see if we can find the right driver" game.
On Linux, its "I would never let a Linux newbie set this up!"

...Hardware is great, but the software side can be summed up as "non-techie people will have a high probability of encountering trouble during the setup process". (If I were a rich bastard and bought out Hauppauge, I would definitely put some money and resources into their software side, because regardless of OS, its very weak in regards to the PVR-x50 series).

Interestingly, I didn't have a single issue with compiling and installing the ivtv driver. A bit fiddley but not terrible. (Of course, my level of "fiddley" could be your definition of "get the heck out of here! That's too hard!"...So it varies on your level and Linux experience.)

TO BE CONTINUED...Or Edited

Sources that helped me.
* http://hyams.webhop.net/mythtv/myth_ubuntu.html
* http://ubuntuforums.org/showthread.php?t=186747
* https://help.ubuntu.com/community/NvidiaTVOut
* http://www.exploits.org/v4l/

TO BE CONTINUED...Or Edited
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 08 Oct 2006, 16:40

Minor update...

We've upgraded from OptusTV (Analog) to OptusTV Featuring Foxtel Digital last Friday. (As my dad wanted to watch the English Premiere League...ie: Soccer/Football).


The Good? (Compared to Analog)

* Interactive services. (Now we can look at the weather, synoptic maps, etc in an instant, as well as news, sports).

* we saved $20 per month and gained "World Movies", all the sports channels (ESPN, Fox Sports 1, 2, 3, EuroSport, etc), and a few other ones.

* "+2" Channels...
Say: Fox8 (Simpsons, 24, Futurama, etc)
Fox8+2 is the same thing, but replayed 2 hours later.

* Picture quality. Despite using the old school TV (CRT), we've noticed the picture is slightly sharper and the sound is slightly better. (Not major, but noticeable, as the slight fuzziness is gone).

* On-demand movies and special events. (You order them and wait about 30min for movies to appear...Its like $6 per movie, which lasts for 24hrs...If you don't switch to it and watch it, you won't be charged). BTW, this includes Adult Channels. ;)

* Has EPG with personal planner. (Allowing you bookmark and set up personal reminders of your fav shows or a movie you want to watch. Includes descriptions of wtf the show or movie is about, etc. Although, its funny when you're channel surfing and they have the title of what's coming up...If you scroll past the Adult Channels, you'll see stuff like "Six Degrees of Penetration" or "Young Natural Breasts 2" :D

* There is a Parental Filter, but that's useless to us, as no one in the family is under 18yrs. (Useful for folks with kids who want to filter channels out). Default PIN is 1234.

* Includes Free to Air Digital channels and Radio stations.

* I notice the STU has a USB and Serial port. No mention of what they could be used for...Labelled as "Future use" in the manual.


The Bad? (Compared to Analog)

* Takes a little getting used to with the channel arrangement and the various functions. (We've had OptusTV analog service since 1996).

* Requires a phone line for interactive services. (Say if you want to order a movie or take part in some voting...Some voting scenarios may cost money! Like 55 cents per vote!).

* Not "Foxtel iQ" solution. (as in a hard disk recorder variant), just a regular Digital STU....But that doesn't matter, does it? As MythTV can be a possible substitute in terms of the basic features. (using Aussie EPG)...KnoppMyth and MythDora are two distros to look at. Not a direct replacement, but one that does mostly the same job.


So the set up now looks like this now...

Code: Select all
                               ---------> EXT 1: Optus Digital -------> VHS video
----------                     |
|        |---------------------
|   TV   |------------------------------> EXT 2: To/From PC
|        |---------------------
----------                     |
                               ---------> EXT 3: DVD player


The TV's EXT 1 uses SCART to SCART connection with the Foxtel Digital STU. This has an output to the video via SCART to RCA. (So you use the Digital STU to switch to watching video)

Its arranged this way, because the TV options only allow you to record from either EXT 1 or 3. (You can manually change it).

Connection to computer remains unchanged...

Code: Select all

------                   
|    |<--- EXT 2: IN <--- TV-OUT (S-Video) of video card, Line-OUT (SB Audigy)
| TV |
|    |---> EXT 2: OUT ---> TV-IN (S-Video) and Line-IN (3.5mm) of PVR-150
------                   



Computer is currently "out of service", as I'm debating whether to upgrade it to a cheap Sempron (Socket AM2 box) OR just stick to the existing and upgrade the cooling config of the PC case. (ATM, it overheats and causes the PC to freeze...The CPU initiates a HALT command when it hits a certain temperature threshold. This is a thermal protection feature of the PIII-based CPU...P4s and new are smarter, as they throttle down the speed and voltage without locking up).

"Debating" because the RAM prices are up at this time. (Due to some world wide shortage of DDR2...Something about the transition from DDR to DDR2 manufacturing). AND because after loading up large MPEG captured files and cutting the Ads out, it takes a while for the Celeron to re-index the file.

Prices are expected to come down at about Nov/Dec timeframe.
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 05 Jan 2007, 17:56

Just a note: Please don't use this whole thread as a full guide to set up your own solution...I'll do a proper one later, once its complete. Don't worry, I'm writing everything down on paper and posting links to refer back to.

So this thread is of experience and explanations that will eventually become a source for a proper guide. I'll explain a few things just to provide folks some idea of what's going on.

The thread is mainly to show you an overall picture of what you'll expect and possible issues you may run into. You may run into extra issues as everyone's home entertain solution (TV, video, PayTV, etc) is different.

Consider the links on the bottom of this post as "scrap notes". Just something scribbled down for later. They may or may not be useful. But this is me we're talking about, so its highly likely they will be useful at some point. :)



Update: System config has changed for 2007.

* Sempron 2800+ (1.6Ghz, AMD64 capable, Socket 754)
* Abit NF8-V (nForce3 250Gb chipset)
* 1GB DDR-SDRAM (2x 512MB Corsair ValueRAM sticks)
* Seagate 7200.7 80GB HDD (PATA)
* Sony DVD burner
* SB Audigy sound card
* GF5900XT with 128MB (TV encoder is built into the GPU)
* Hauppauge PVR-150MCE Low-profile version (comes with full height bracket...Does NOT have a remote control).
* Microsoft MCE USB remote (Version 2) with two IR Blaster

I'm not gonna touch the hardware anymore. (other than if a component fails).

Yes I know, the GF5900XT is WAY overkill for PVR/HTPC role...The only other card I have that supports XvMC is a GF5200 PCI card. (Which is already being used on my EPIA box). If you're gonna be building a system of a similar nature, consider a GF6200TC. They're about AUD$60.


Now the MCE remote control comes with a IR receiver that plugs into the USB port. The IR receiver has two connectors on the back (like headphone sockets) for the IR blasters. This cost me AUD$47 late last year. (That's my contribution to Microsoft for 2006) :)

I bought it from...
=> http://www.hboutlet.com.au/catalog/prod ... s_id=27426
(No I do NOT work there, nor am I the owner. But I do buy a large amount of hardware from there, as their prices are usually on the lower end of price engines in Australia...And the fact they're 20min drive away from my place).

Just to give you an idea of what I'm talking about in regards to the MCE remote, receiver and IR blasters...It comes with Microsoft batteries! 8O

Image
source: http://www.itx-warehouse.co.uk

The IR blasters are used for replacing your regular remote for TV, Foxtel/Optus Digital TV, etc. They're basically IR transmitters that you place near the IR receiver/sensor of your TV, Digital set top box, etc. On the back they have a sticky backing, so you stick it near your TV or set top box sensor. This way, you use the MCE remote to view, record, change channels, etc, etc.


Just a brief about MythTV...This is a "Media Center"-like solution, but on Linux. Unlike Microsoft's solution MythTV is far more flexible, allowing you to have multiple capture cards on one PC (whether they by analog or digital, etc) or a network of PCs in the house such that you can view content from any capture source. (digital, analog, archive).

The other advantage is that it isn't specifically promoted for "MCE" hardware. As in you notice the MCE remote I have and the MCE capture card I use are specifically for the MS platform. MythTV can run on pretty much any hardware that works with Linux.

The disadvantage to MythTV is that its a pain the butt to set up. Well, its a bit of a learning curve. So if you're the type of person who just wants something to work, its not gonna be for you. MCE has the advantage of having stuff mostly working without too much tinkering.

For Australians, its slightly harder, because we don't have a publically free Electronic Programming Guide or EPG service like the USA has, which is simple to work with. In fact, for some weird reason, the folks with the TV guide data don't want the public to access them for personal use. eg: So if you grab TV guide data from, say Nine-MSN, after a while it won't work, as they try to hamper the data a bit, and make your life difficult.

MythTV doesn't have specific instructions for Aussies in their official documentation, so go to their Wiki and search. (good place to start).


Anyway, as a rough test, I download and tried MythDora. MythDora is a precompiled solution that combines Fedora Core 5 and MythTV 0.20

This is to check that the MCE remote and capture card works. You should be able to control MythTV's menus with the MCE remote. And to test the capture card, (Hauppauge x50 series), you enter the following in the console or Terminal window.

Since my capture card is connected via S-VIDEO
=> v4l2-ctl --set-input=1

Set the audio input. (If you don't, you won't get any sound!)
=> v4l2-ctl --set-audio-input=1

I think v4l2-ctl stands for Video for Linux 2 Control. The 2 is because the first generation isn't supported by Hauppauge x50 series of cards. (Obviously, that's being changed in the 2nd generation)

To capture something...
=> cat /dev/video0 > /home/mythtv/test.mpeg

/dev/video0 -> This is the capture card
/home/mythtv/ -> This is the directory/folder where you want to save the video.
test.mpeg -> Obviously, the MPEG2 video file.

Nothing will appear to indicate things are working, so just wait a few minutes, and then press Ctrl-C to stop. Open the file with VLC player. (All the other players crashed or refuse to load for me!).

The result for me was pretty damn good. Sound and picture was very acceptable.

I also tried "MythWeather" (add-on module)...It connects to the web and pulls down the weather forecast for the next few days, and satellite view. Not bad. (I showed this to my dad with the MCE remote, and he thought it was pretty cool...Now he wants me to properly set up MythTV!)

OK, that's enough for today.


Future plans.

* Instead of using an "easy to use" distro like Ubuntu or a pre-made solution like MythDora, I'm gonna be using Arch Linux.

(This is the right balance for me...It has the speed of Gentoo or Slackware, but with a package manager that reminds me of Debian's apt-get...But the packages are more bleeding edge than Debian's.)

* I still gotta check if MythTV still serves my original purpose. That is, record and burn on DVD.

* Try and figure out how to get the EPG going.



Scrap notes (Links)

MythTV (wikipedia entry)
http://en.wikipedia.org/wiki/MythTV

MythDora
http://g-ding.tv/

Arch Linux (wikipedia entry)
http://en.wikipedia.org/wiki/Arch_Linux

MCE Remote (from MythTV wiki)
http://www.mythtv.org/wiki/index.php/MCE_Remote

DVICO-Ultraview Install in Australia
http://www.mythtv.org/wiki/index.php/DV ... _Australia

XMLTV (for grabbing TV Guide data)
http://www.mythtv.org/wiki/index.php/XMLTV

Australian TV Listings
http://www.mythtv.org/wiki/index.php/Au ... V_Listings
(Stuff related to MythTV)

How do I record from a video source in MythTv
http://www.htpcnews.com/forums/index.ph ... opic=25377
(This person wants to record VHS to MythTV)

Tv_grab_au (oztivo) help.
http://www.gossamer-threads.com/lists/m ... ers/216859

tv_grab_au_reg
http://www.cse.unsw.edu.au/~willu/xmltv ... u_reg.html
(For TV guide grabbing in Australia)

EPG Data Sources for Australia
http://www.cse.unsw.edu.au/~willu/xmltv/index.html

Install and fix tv_grab_au
http://www.users.on.net/~jani/dvico-myt ... tml#ss10.3

Guide data for MythTV users (ozTiVo guide)
http://minnie.tuhs.org/twiki/bin/view/TVGuide/MythTV
(I guess we use this?)

User:Lwoggardner
http://www.mythtv.org/wiki/index.php/User:Lwoggardner
(User experience on MythTV wiki)

nvidia 6200tc tearing and high xorg cpu usage seemingly fixed
http://www.gossamer-threads.com/lists/m ... ers/242478
(I am suffering a slight "tearing" on the TV-out...Its a driver issue, apparently)

Svideo Tearing
http://www.gossamer-threads.com/lists/m ... ers/204829

any one using Nvidia 8774 driver
http://www.gossamer-threads.com/lists/m ... ers/220715

PVR-350 vs FX-5200 TVOut
http://www.gossamer-threads.com/lists/m ... ers/111628

The quest for TV-Out
http://karlsoderstrom.com/archives/2003 ... for-tv-out

NVIDIA Accelerated Linux Driver Set README and Installation Guide
http://us.download.nvidia.com/XFree86/L ... index.html
(For configuring Nvidia card's TV-Out)

XMLTV
http://xmltv.org/wiki/

Step-by-step guide to building a MythTV System on Fedora Core 6 w/ATrpms
http://wilsonet.com/mythtv/fcmyth.php

Australian Digital TV Cards
http://www.gossamer-threads.com/lists/m ... ers/151845

Digital Foxtel Integration (Australia)
http://www.gossamer-threads.com/lists/m ... ers/146484
(Hmmm, well Optus Digital is the Foxtel service...)

DVB-T (Australian Digital Television) on Linux Links
http://www.itee.uq.edu.au/~chrisp/Linux-DVB/
(Useful if I want to slap on Free-to-Air Digital capability)

Foxtel Digital STU Channel Change
http://www.gossamer-threads.com/lists/m ... ers/160732
(Now this is good stuff!)

MythTV HOWTO (for Arch Linux)
http://wiki.archlinux.org/index.php/MythTV_HOWTO

[mythtv-users] Digital Foxtel Integration (Australia)
http://www.mythtv.org/pipermail/mythtv- ... 99948.html

Projects - MythTV: Remote Control
http://www.nexusuk.org/projects/mythtv/lirc/
(Could be useful, because the Foxtel STU is actually the same as used by the Sky service in the UK).
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 10 Jan 2007, 13:04

There is a known issue about Nvidia Linux drivers...IF you're using SVideo to connect to the TV, you will get serious "tearing" when watching some videos. (I get it pretty badly when watching the TV Show 24).

It seems the current workaround is to do this:

HOWTO Separate x-screens on Monitor and TV
http://gentoo-wiki.com/HOWTO_Separate_x ... tor_and_TV

Make it such that the TV-Out is screen-0. (So do the opposite to what's suggested in the guide).

In the guide, they have it such that Screen-0 is your computer monitor and Screen-1 is your TV...It should be the other way.

This is because the overlay, (required to minimise tearing) only works on one screen. So if you swap Screen-0 to TV, you should notice an improvement. But this is at the cost of tearing when you view videos on your monitor!

So I guess you can't have your cake and eat it too...Yet.
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 11 Jan 2007, 02:34

Forget using the proprietary Nvidia driver unless you want to output to HDTV. (Where its XvMC support helps in lowering CPU usage).

If you're viewing stuff in DVD quality or lower, use the open Nvidia driver...Commonly seen as nv in the xorg.conf file.

Why am I suggesting this?
The official (proprietary) Nvidia driver causes serious tearing while watching videos to the TV via S-VIDEO. And if you mess around with it, you can minimise it to some extent, but you will never get rid of it. :(

The problem is, shows like 24 still has tearing, regardless what you do!
(I've tried every suggestion known to man...There is a serious issue with the drivers)

I notice this when using the driver on a GF5900XT, GF7300GT and GF7600GS. The same scene has tearing. (On TV or Computer screen!)

I uninstalled the driver, and used the one that's from xorg (open driver)...Guess what? On the computer monitor, its perfect! No tearing!
The CPU usage went up a bit, but that's OK, I'm not gonna be viewing anything in HD anyway.

I haven't tried TV-Out yet...It appears you have to manually configure this by adding entries for the TV in the xorg.conf file.

DO NOT use nvtv. This will NOT work, as its for TNT and early Geforce video cards. The registers are different, and if you try to load it with a modern day Geforce card, it will cause a segmentation fault in the application. (It'll load for 1/2 a second, then quickly close).

I also tried setting screen-0 to the TV, but it refused to switch to PAL mode. It remained stuck in NTSC (which is for Japan and USA). Not to mention having issues with adjusting resolutions. (I adjust the one for the TV, but both TV and monitor switch to the same resolution!)

Since I don't have a HDTV, and DVD quality is good enough for me, I'm gonna stick with the open nv driver. I'm gonna say it, I am officially annoyed with the proprietary Nvidia driver. And I don't think one should use it unless they really have to. (You know what's sad? The Windows Nvidia driver does NOT have this S-Video problem!)

An alternative to using a video card TV-OUT could be to use one of those external boxes as mentioned in the MythTV documentation. Another is to use a hacked Xbox to be a front-end for MythTV. (Its sufficient for DVD quality playback, but NOT for HD).


In other areas, I have had wonderful success with the remote control. I can playback, rewind/fast forward, pause, and even quit an application. (Works perfectly with MPlayer and VLC)

You need to create a config file for the LIRC driver (for the remote)...A text file called .lircrc that has multiple entries for each button with the layout that look like the following:

Code: Select all
begin
    prog=       
    button=
    config=
    repeat=
end


Depending on what you're doing, the .lircrc file will be placed in your home directory. (For MythTV, see their wiki on the location.)

So for example, if I wanted to map the play and stop buttons on my remote to MPlayer, it will look like this.

Code: Select all
begin
    prog=mplayer       
    button=Play
    config=gui_play
end

begin
    prog=mplayer       
    button=Stop
    config=stop
end

...And so on.

REMEMBER: In Linux, lower and upper case does matter! eg: Jon is not the same as jon!

config is the command for the application, and repeat is like the sensitivity when you press the button on your remote. Something like 2 or 3 is OK. 1 maybe too fast. (Such that you press once, and it may accept it as several inputs). You may not need repeat for some buttons like stop, play, pause or quit...Its suited for volume up/down and channel changing buttons.

To figure out the button names of you remote, LIRC driver comes with a test application. You load it up by typing irw in a Terminal window. Point the remote at the receiver and push a few buttons. You will get instant feedback on the screen, showing you what button you pressed, etc.

For MPlayer, if you want the list of commands, type the following in the command prompt: mplayer -input cmdlist

With these two bits of info, you can figure out all the buttons, etc...Ok, so its not a glorious job. Yes, it downright tedious. But when you get things configured the way you want, its awesome!

In summary...So far:

Stage 1 - Prep and test hardware
TV-Out: "in progress". Abandoned proprietary driver for open one.
Remote: Works! (confirmed and tested)
Capture: Works! (Tested with ESPN, Discovery Channel, Fox, etc)

Stage 2 - Electronic Programming Guide in Australia
Not Yet!
But have a guide...
=> http://minnie.tuhs.org/twiki/bin/view/TVGuide/MythTV

Stage 3 - MythTV install and setup
Not Yet!
Pre-built packages are available for Arch Linux.
Downloaded PDF version of MythTV docs for reference.
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 11 Jan 2007, 14:41

I've had little success with nv and tv-out...Output on the TV is a scrambled mess. Essentially, there is no software alternative for TV out if you're having issues. (nv may work for some people, but not for others. nvtv only works with TNT and early Geforce cards (older than the GF4MX series), and the Proprietary driver, nvidia has a known "tearing" issue with S-Video. (If you use DVI for HDTV, it seems to be OK)

Looking on the MythTV docs, they say you can use a PC/MAC to TV converter device. This way, you don't bother with messing around with the driver or xorg.conf settings. These devices are Operating System independent, so it doesn't matter if you use Mac, Windows, or Linux, etc.

Its mentioned here. Scroll down a bit to see External Adapters
=> http://mythtv.org/docs/mythtv-HOWTO-3.html#ss3.1

I'm gonna go with Averkey Lite (aka: AverMedia QuickPlay in the USA).

Its about AUD$70 and what's good is, its widely available in Australia. ;)

It looks like this...

Image

Its USB powered. Has a VGA pass-through...Hence the two VGA connectors: one male, the other female. One for your monitor (female), the other to your video card (male). It outputs to TV via Composite OR S-Video OR YPbPr.

BTW, don't expect the image to be super-sharp...Expect it to be about the same as the tv-out on video card, slightly fuzzy on a regular TV.
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 12 Jan 2007, 15:03

Hmmm...I think its my video card.
Even with the Averkey Lite, there is notable tearing at the same spots of a video clip.

I'm gonna try my GF7300GT to be sure.

All is not wasted though, the Averkey Lite can be used for a Linux-based laptop, if you need to make presentations. ;)


Averkey Lite (brief)

Pros
* Convenient...Just plug things in and go. No messing with xorg.conf
* Quality is the about same as a TV-Out of a video card. (However, at high refresh rate, the words on the screen are clearer than video card's TV-Out).
* Until XOrg 7.3 arrives, this is the least embarassing way to hook up your Linux laptop to a projector. (XOrg 7.3 will address this issue via a new method called "hot plugging")
* Easy to operate. There's only 5 buttons, and it takes a few minutes to figure out how they affect the output.

Cons
* It gets hot...I mean it really gets hot!
* When plugged into the same USB segment as the MCE remote, it affects the remote's sensitivity slightly.
* May not suitable for HD content or HDTV. (good enough for DVD quality and lower...Some people may be picky about picture quality, so I'll raise it as a point for those HD folks)
* It feels a bit cheap and tacky...It would be nice to have the buttons spring back a bit more. They feel too soft.


Will be back in a few hours to see if the tearing dissappears with the GF7300GT.
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 12 Jan 2007, 23:08

Nope...Tearing is still there on the GF7300GT. :(

Happens in shows like 24, Mobile Suit Gundam MS 08th Team, etc.

I must be missing something....Hmmm. I'm gonna do something else while I think about the problem. :?: :x :?:

I don't think the Arch Linux versions of MPlayer or VLC have XvMC compiled. So there's no support for the capability. (I noticed Ubuntu's version DOES have this supported in their version of MPlayer.)

From what I've read, GF6xxx and GF7xxx XvMC's support isn't properly implemented in the proprietary drivers. (ie: it won't work, and MPlayer will give you an error message if you try to enable it). It'll depend on the driver version you use, etc...But it doesn't work with Ubuntu 6.06.1 LTS, as this uses the older driver.

It seems you should go for a GF5200 series if you're doing TV-Out for MythTV, etc. (Its cheap, and comes in PCI, AGP, and I think PCI-Express forms, and fully supports XvMC). Bare in mind, you may need a reasonably fast CPU.

In other places, I think the recent ATI drivers (proprietary) also support XvMC. I'm not 100% sure, as I don't have an ATI card.

For those VIA EPIA owners, you'll be glad to know the Unichrome IGP solution they use, DOES support. (It will work out of the box for the driver part, but you will need to patch MPlayer with the openChrome patches...See openChrome project)

IF you have a Sigma Designs Hollywood Plus or Creative DXR3 DVD/MPEG2 decoder card, you can output via that. But you need to install the driver, called em8300. (Ubuntu and Debian will have these in pre-built binaries)

The last option is to use the Hauppauge PVR-350...Which has both acceleration for input (capture) and TV-Out (playback). This only captures in MPEG2.
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 14 Jan 2007, 17:08

Well, I got XvMC working with MPlayer in Arch Linux.

I have also created a wiki entry for the Arch Linux project.

Enable XvMC for Nvidia video cards
http://wiki.archlinux.org/index.php/Ena ... ideo_cards

If I were to be writing my own book for Linux, it will be in this style of writing. Feel free to comment or criticise (constructively) if you wish.

I got XvMC working with GF5900XT and on a GF7600GS...So it does work. But I suspect the implementation is slightly changed in the GF6xxx and GF7xxx series. (Its slightly buggy).



I'm still working on my "tearing" issues.

Video Card Configuration
http://www.linuxis.us/linux/media/howto ... ation.html

Video Frame Display Synchronization
http://www.intel.com/cd/ids/developer/a ... htm?page=1

Frame display timing
http://www.mythtv.org/wiki/index.php/Fr ... lay_timing

Modeline Database
http://www.mythtv.org/wiki/index.php/Modeline_Database

How I got great quality TV-out on my nVidia MX4000
http://www.gossamer-threads.com/lists/e ... ist=mythtv

Configuring TV output
http://www.mythtv.org/wiki/index.php/Co ... _TV_output

TV-Out and the NVidiaProprietaryDriver
http://www.mythtv.org/wiki/index.php/NV ... taryDriver
(Indicates that I should use version 1.0-8776 driver...While other sources say I should use the older 1.0-7676 driver)

XorgConfMonitorSectionForTV
http://www.mythtv.org/wiki/index.php/Xo ... ctionForTV

Working with Modelines
http://www.mythtv.org/wiki/index.php/Wo ... _Modelines

Smooth animations under XFree86
http://scanline.ca/smooth/

Tearing or shearing

Tearing occurs when a window is being updated as the video card is sending it out to the display. Since writing to video memory is faster than the speed at which the image is sent to the display, a user might see images where half is the old frame, and the other half is the new frame.

To avoid tearing, we have to know what methods we have of controlling how data is written to the framebuffer.

I have a Matrox G400 and a display running at 75hz. The modeline in use is:
135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync

I wrote a program to time how long the refresh takes, and how long is spent in the blanking. My timings show that it takes 13.3ms for each refresh (and one tenth of a millisecond for the gun to return to the top of the screen). The active area on each scanline is:
1280/1688 = 76%

And the vertical active area is of size:
1024/1066 = 96%

So, this means that for 9.7ms out of every 13ms, something is being drawn that we can see.


Outputting to a High-Definition TV
http://wilsonet.com/mythtv/mythhd.php




After reading a few links, I suspect its to do with getting the timing right with the TV. ie: May need to understand and set up the modeline in xorg.conf to suit the TV. (Everybody's TV is different, so you need to tinker the settings to get things right for your configuration.)
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 15 Jan 2007, 02:17

I was right! Its a timing issue with the TV and the rate at which the video card redraws the screen. When you manually set this to match that of your TV, you'll solve the infamous "tearing issue" with Nvidia cards and S-Video.

I used the Video Timing Calculator to get a reference point of settings...
=> http://www.tkk.fi/Misc/Electronics/faq/ ... /calc.html

I selected: 800x600 PAL TV interlaced

I added this in xorg.conf in the Display section:

Code: Select all
Modeline "800x600"   15.407   800 808 936 986   600 604 620 628  -hsync -vsync Interlace


The tearing is gone, but now there's a slight lag in some scenes of video clips. (Suggesting its a tad too low. I think)...I still need to fine tune it.

Here's another good article.
http://www.epanorama.net/documents/vga2rgb/timings.html

Misc one, but could prove useful...
http://www.kingcot.eclipse.co.uk/unichr ... TvOut.html
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 17 Feb 2007, 21:59

Its the Nvidia driver, and there's nothing you can do about it. No matter what you do there will always be tearing in some scenes!

Would it help if I switched to an AMD/ATI Radeon?


The alternative for playback on TV is to buy a network or USB capable device that plugs into a TV. A media server? Is that what they call it?

Anyway, looked around and found a few that are readily available in Australia. (Usually, you'll find cool devices that never come to this country). :(

MEDIAGATE MG-350HD
http://www.airlinktek.com/english/prod_mg350.htm

All you need is to buy a hard disk for it. (Say something like 320GB to 400GB. Which is the current "price per GB" sweet spot)

I might go for this instead. Price is about $290 to $320 (inc. shipping).

The non-HD model is known to be Linux based, so you can hack/modify it. (Of course, this will VOID warranty!)

Welcome to the Mediagate MG-35 wiki!
http://mediagate.pbwiki.com/

Various links.
http://mg35tools.svn.sourceforge.net/viewvc/mg35tools/
http://www.avsforum.com/avs-vb/showthread.php?t=576107
http://tech.groups.yahoo.com/group/mg-35_firmware_mods/

But I'm not sure about the HD model.

The main issue with this device is that it primarily needs a Windows PC. (For some stupid reason it only uses FAT32 or NTFS! As well, you can't use it on a network for a Linux box. You have no choice but use it as a USB storage device that is formatted as NTFS. WTF?) :(


There is also the Hauppauge MediaMVP. (Another Linux-based solution)
http://en.wikipedia.org/wiki/Hauppauge_MediaMVP
About $100 cheaper...

Reviews
http://www.digit-life.com/articles2/hau ... index.html
http://www.i4u.com/section-viewarticle-74.html


There's also the DVICO TViX series...
(prices varies depending on model: $260 to $600 for top end)
http://www.tvix.co.kr/eng/

Various can be found here...
http://www.pccasegear.com.au/category172_1.htm




MviX Multimedia Centre MX-760HD...Could be another option.
I think its another Linux-based solution!

Source code (GPL) is here.
http://www.mvixusa.com/support/index.ph ... d=19&nav=0
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 24 Feb 2007, 03:38

I borrowed an ATI Radeon 9250 card and tried the S-Video...A little better, but there's still tearing.

I did some research, and regardless what video card you use, its a general thing to suffer some tearing in Linux when you use the TV-Out (S-Video). Its a current thing that needs a thorough project to completely eliminate the issue.

You can resolve this with a Sigma Designs Hollywood Plus card with the EM8300 driver using re-compile MPlayer with DXR3+ support...The other two approaches include the Hauppauge PVR-350's TV-OUT or a DVB card that has TV-OUT.

The forth option is to get a MviX Multimedia Centre MX-760HD to handle playback of my captured (and other) videos.

You can use the device to stream directly from a Linux box via Samba.

How do I configure Samba to share folders with the MX-760HD?
http://www.mvixusa.com/support/index.ph ... ticleid=77

That would be the most expensive option. (The cheapest would be to use the Sigma Designs card, but could be a pain in the ass to set up).
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby Caniffe on 24 Feb 2007, 09:21

stmok wrote:* Requires a phone line for interactive services. (Say if you want to order a movie or take part in some voting...Some voting scenarios may cost money! Like 55 cents per vote!).


The red button sends data to a 1800 number; is voting using a different button?

TechWatch
http://www.techwatch.com.au

Resident Linux Thug. Prepare to be assimilated.
User avatar
Caniffe
Administrator
 
Posts: 1683
Joined: 19 Mar 2001, 12:01
Location: Brisbane, Australia

New postby stmok on 24 Feb 2007, 10:17

I notice that some channels like SkyNews that have voting on polls and Fox8 Simpsons "you select the episode" segments, the system involves charging you a small amount to vote...Which is odd.
Last edited by stmok on 25 Feb 2007, 16:36, edited 1 time in total.
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

New postby stmok on 25 Feb 2007, 16:36

Some user reviews of the MVix MX-760HD.

MVix MX-760HD - Video Streaming to your TV over Wi-Fi
http://gadgetblogger.co.uk/?p=3
(There's a Samba config file in this one, so its useful for Linux users).

MX-760HD Review
http://www.sgmarket.com/HDD%20Multimedi ... Review.htm

There are other Linux based multimedia player devices.

DViCO has a series called TViX. (M-3100, M-4000 and M-5000)

However, they're in violation of the Linux license. (GPL). They list the GPL in their manuals, but they DO NOT provide ANY source code for the variant of Linux they use!

They don't respect the GPL, I don't respect them. So I've ruled them out.
(Its very likely they don't have a thorough understanding of the GPL)

Another solution is the Zensonic Z500. But this is known for not being reliable. (Secretnet.com.au show a 16% failure rate which is pretty high)...At best, consider it a hackers solution, not a typical appliance that works well. They are working hard to resolve it with regular firmware updates though. At least they provide the source code!

All these devices (Mivx, TiVX, Zensonic, Mediagate, etc) seem to be using the Sigma Designs EM8620L series of chips. This explains why they all have near identical capabilities. The problem is that Sigma Designs is a well known GPL violator. People have to keep an eye on them to make sure they're complying and get them to release the source code.

I'll give the old Hollywood Plus one more try. If all that fails, I might consider investing in that MVix MX-760HD solution.
The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. Most of us, most of the time, shouldn't be distracted by worrying about beating Microsoft's PR or countering their political moves, because writing good code is in the long run a far more potent weapon than flackery. -Eric S. Raymond
stmok
Forum Guru
 
Posts: 5191
Joined: 19 Mar 2001, 15:26
Location: Sydney, Australia

Next

Return to Linux and Open Source

Who is online

Users browsing this forum: No registered users and 0 guests