How to record tv on linux and have the smallest file possible + good quality?

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
Hi,

I recently bought the Leadtek Winfast TV 2000XP Deluxe from newegg.com. After installing it and setting it up in windows. I want it to work in Linux so I don't have to boot to my dark side (or windows partition). I currently have my tv tuner card working thanks to the guide of electrode. I can watch tv using xawtv and mplayer. I personally prefer mplayer, but the reason why I got this video card is to record programs on television for a family member. who lives in another country, and shipping is too expensive.

The programs that I am recording are 30 minutes and without commercials they are 20 minute-long. My questions are the following:

1. What's the best program in Linux to do video editing?
2. What's the best way to save this program considering quality and file size at the same time?
3. How to make the file smaller so it doesn't take too much time to download?
4. How do you save files using xawtv? (it didn't seem to have a lot of options)

I have been doing my research, but I still haven't come up with any good options. But I wanted to know what's the opinion of these forum.

Thanks for the help,
pitupepito
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Mmm... I am not that much of a video editing type guy, but you may want to check out MythTV

It can do 2 types of video encoding: RTJPEG, and MPEG-4. Mpeg-4 requires more cpu, but makes smaller files then the other type. documentation

The feature that I like most is the psuedo real-time skipping of commercials, fast forward and rewind ala TiVo of live broadcasts.

here is a interesting article

In the replies of it I found some links to other useful software.

From here, I found a link to To here. The guys who made it are a bit blowhard and they may not live up to their own expectations, but it could be a good starting point. They also have links to other websites with video editing and stuff so you may find something usefull. :) In fact the more I look around the cooler the apps these guys look.
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
thanks for the nice information drag. I had been looking at mythtv, but I had a dependency problem, but I solved it. Right now I am having problems with getting my backend working. The frontend is working fine, but when I try to start the backend this is what I get:
Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
No setting found for this machine's BackendServerIP.
Please run setup on this machine and modify the first page
of the general settings.


Any ideas on what can be causing this?

Any more suggestions to my original question?

Thanks for the help,
pitupepito
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Ya, I was looking thru the documentation and it seems that it uses a Myspl database to store the files and that thing that's called the "Master Backend", whatever the hell that is. :/

It says that you have to "switch to the setup directory and run the setup program" This is probably a script that just has a bunch of questions in it to help you configure the backend...

You run that yet?

I saw that here, and it had "setup" and "backend" in it so I thought it may be pertinate

As far as other software and it looks like that weird heroine warrior software is still in the extreme beta and not that much use for casual use.... One other thing I was interest in is VideoLan. This is a streaming video server.

I have a computer I am building and am going to try to get it together and install Myth and VideoLan on it this weekend. Hope it won't be to much trouble.... I am going to try to use debian. This will be a multi-media only box... Fairly low-end for a new computer, 30 gig harddrive, 1700+ amd on a nforce2 board with 528M of ram and a shared-onboard video card. It has a pci ATI Wonder VE TV capture card. I may have to buy a video card for it if the onboard is to slow. I'll let you know how well it's going.
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
thanks for the help drag.

I am currently using mythtv on debian and it works great. Mythtv is a nice program, but after running the script I was able to watch some television, and I still have to figure out how to tune the program for best quality.

I am still having the authentication problem, but I am glad that the program is working a little bit, because after I go passed a few channels the program crashes, plus I still have to figure out how to enhance the quality

 

GhettoFob

Diamond Member
Apr 27, 2001
6,800
0
76
I just installed MythTV on my gentoo box and it works great except for one minor problem, audio only comes out of my left speaker. If I play an mp3 in XMMS, sound comes from both speakers. Am I just missing something trivial or did I bork something in the install?
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
it should come out from both speakers, did you run the setup script and have you check the general settings?

 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Well I got Mythtv installed and working on my PC... And it's pretty good, I've been playing around with it and unfortuanatly my Harddrive is just WAY TO SLOW.

Even though I have all the dma stuff on and 32 bit activated and all that fun stuff. When I run hdparm -tT I get only 26 MB/sec bandwidth comming from it, and sometimes it's 12... (maybe a driver issue and I only get 5.56 with dma turned off.). So everything is in slow motion and the sound and video get way out of sync. I am going to buy a quicker harddrive and that should solve my problems.

here's a interestin article about tweaking with you HD Although I only had responses with dma modes and multicounts... anything other with the PIO and umdma stuff just either didn't make a difference or just made it run like crap and when I tried to set it back to default it crashed my computer. :(


On a good note though, I may have figured out the problem with changing the channels and it locks up.. The MythTV tries to first read the data from the line in on the sound card while simitaniously writting it back out to the /dev/dsp device. When you change channels it tries to do both channels simitaniously for a bit because of the delay it puts into it. It reads the video, writes it to the disk and then reads it from the disk to play it on your screen. That's how it can do all the special stuff like "pause" live or reverse. With the OSS sound system it can only (usually) handle one program at a time attatching it self to the /dev/dsp file, only one sound at a time. The normal workaround for most programs is to use a sound deamon like artsd or esd, but this won't work for MythTV. The solution is to upgrade the sound drivers to Alsa. These are quite a bit more sophisticated and can handle multiple inputs at a time. That solved my lock-up problems with rapidly changing channels.

I also figured out how to get decent output on to my TV from the nvidia card. You've got to use multiples of the natural resolution of the TV (I use NTSC tv's since I am from USA, Europe uses PAL which is different) is 480 lines, or reality 520 or so, but those extra lines are for sound and stuff like that.. like movie theater film. And the display is a 4:3 ratio. So the most natural is 640x480 (suprise...). Other resolutions involve multiples of 80. Like 320x480, 400x480, 480x480, 560x480, 640x480 and 720x480. 720x480 is what looks best on my TV and happens to be at what DVD's are recorded at for televisions(I think). If you make the text big enough it is actually a pretty decent monitor. That got rid of the distortions of colors and blurring from having to smoosh down 800x600 display for the TV out for me.

Of course this is is just from my experimenting with my 10 year old sony TV and so your stuff may work better with other resolutions.
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
could you post a snapshot of mythtv. I have gotten the problem of changing channels and everything else including the sound, but I want to compare the quality of the picture that I am getting compared to the quality of the picture that you are getting.

My sound is not very good, but I am wondering if it is my soundcard which is an integrated one in my motherborard an AC'97 chipset. I use the alsa drivers to get it to work under linux. How is your sound quality and how did you get it to be better.

Which encoder are you using. It seems that Mythtv uses by defaul RTJPEG, but I am trying to use the other one which I believe is MPEG-4. Do you know how to set up mythtv to use this other encoder. I have it set up but it seems that it uses a lot of cpu resources and the image is not as good as in RTJPEG.

Thanks for the help,
pitupepito

By the way have you tried the other modules for mythtv such as Mythweb, mythmusic, mythweather. They are pretty nice :)
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
If you go to one of the options screens.. like tv->options-> recordings then you can select what type of recording you want to do with difference ways to record/play.

I think the default is RTJPEG recording at 480x480 for TV play. RTJPEG uses less resources, but large files sizes.. this means you need larger and faster drives to deal with all that I/O.

Also you can adjust quality/compression in the RTJPEG.. If it's similar to regular jpegs, do this as a illistration. Take a large image at high resolution. Save it as a jpeg at 50% and then another copy at 75% and one at 100% and see the differences in file size and quality.

If you have a fast CPU then the best would probably be MPEG. If you up the image size from 480x480 to 720x480 or 640x480 you may see a quality difference. I don't know.

As far as sound quality goes, hell if I know. Some onboard stuff is good, some are crappy, most are average. Do you notice a big difference between xawtv and mythtv? What about image quality?

Don't forget that regular cable TV is going to look pretty crappy on a computer screen, were we are all use to sharp and well defined images/text and colors. My tv card does realy saturate the colors, so most of the time i have to turn down the "color" stuff to make it look decent in xawtv or on a regular TV-out. I don't know how to do that in Mythtv though...

Probably the only way to get high quality TV is to get one of those gigantic C-band satalite dishes loved by rednecks the world over and a nice DVB card for your computer.. It's better then any digital TV or normal comsumer satalite dishes like the direct digital stuff and maybe even better then HDTV. Since you would be picking up the actual signals that the cable company uses themselves before sending thru the cable stuff or digitializing it for digital cable boxes. Can only watch one channel at a time per dish though I think, but after you buy the dish you get something like 500 channels for free, with random broadcasts of other stuff. Exept of course for scambled channels like the pay per view stuff or HBO, but then, of course you ARE hooking it up to a computer... :p (in reality you can buy a de-scrambler and pay a fee to hbo and friends for the encrypted channels all legal-like)
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
If you go to one of the options screens.. like tv->options-> recordings then you can select what type of recording you want to do with difference ways to record/play.
Yes that's where I have tried different codecs.

Also you can adjust quality/compression in the RTJPEG.. If it's similar to regular jpegs, do this as a illistration. Take a large image at high resolution. Save it as a jpeg at 50% and then another copy at 75% and one at 100% and see the differences in file size and quality.
I am going to give this a try.

If you have a fast CPU then the best would probably be MPEG. If you up the image size from 480x480 to 720x480 or 640x480 you may see a quality difference. I don't know.
I know. I have an Athlon 1800+ and 256MB of PC3000, and my video card is a Radeon 8500 with 64MB, my tv tuner is a LeadTek TV 2000 XP Deluxe from newegg. and the image quality under MPEG looks great when I boot into windows. When I choose MPEG in the codecs the image gets really bad, if I choose to put the quality of the pixels very high. I have tried switching with different settings under MPEG, but I don't know if is giving really bad image quality because my computer is not fast enough. I notice a big quality drop when I switch between the different sizes and when I use the slider to get a better quality under MPEG 4. It shows enlarged pixels.


As far as sound quality goes, hell if I know. Some onboard stuff is good, some are crappy, most are average. Do you notice a big difference between xawtv and mythtv? What about image quality?
I am not sure why sound quality is so bad. Some programs are worse than others. The difference between sound of xawtv and mythtv is really big. That's because xawtv uses the analog sound using Line-In, on the other hand mythtv is never playing live tv and is always buffering sound and video. Image quality in Xawtv is a lot better than mythtv, hey it's even better than in all the televisions in the house. I have the resolution of xawtv set to 1024 x 720. :)

Probably the only way to get high quality TV is to get one of those gigantic C-band satalite dishes loved by rednecks the world over and a nice DVB card for your computer.. It's better then any digital TV or normal comsumer satalite dishes like the direct digital stuff and maybe even better then HDTV. Since you would be picking up the actual signals that the cable company uses themselves before sending thru the cable stuff or digitializing it for digital cable boxes. Can only watch one channel at a time per dish though I think, but after you buy the dish you get something like 500 channels for free, with random broadcasts of other stuff. Exept of course for scambled channels like the pay per view stuff or HBO, but then, of course you ARE hooking it up to a computer... (in reality you can buy a de-scrambler and pay a fee to hbo and friends for the encrypted channels all legal-like)
I wish I could afford one of those dishes :), in my house we just have plain cable with about 70 channels. And actually if I could get the xawtv quality under Mythtv I would be set. :eek: Is there any featured that a TiVo offers that MythTV doesn't offer. It offers channel information and so many other features, plus weather and a nice web interface to manage it. Meaning if your computer is hooked to the internet and you have an apache server installed you can record tv programs from work :) isn't that awesome:0 ;)

Thanks for the info,
pitupepito
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Hmm.. I forgot about this project Freevo...


Looks like it is definately worth checking out. I don't think it does the whole features like pausing live video and such, but It looks more complete then MythTV does. It actually has stable releases and everything!
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
I had looked in freevo before, but I found that it didn't have as many features as Mythtv, but unfortunately I just registered for an extremely hard test that I have to take so for two weeks I am going to be off-line :Q :(. Will I be able to make it :disgust: Well I have done quite a bit of research in tv in linux and I found this web page
http://linuxartist.com/video-anim.php and from there I found
http://www.exploits.org/v4l/

Also I was in the middle of trying to get better audio quality and I found this web page http://www.gossamer-threads.com/PRIVOXY-FORCE/archive/MythTV_C2/Users_F11/Re:Leadtek_winfast_2000_XP_Can_I_get_sound_from_bttv_directly_P55500/
which seems very useful, but I guess that will have to wait for later.

I am going to have to study really hard for my test, gosh and I just finished compiling a kernel.

Well have a good night,
pitupepito

By the way which tv tuner card do you have ?

 

drag

Elite Member
Jul 4, 2002
8,708
0
0
ATI wonder VE card. Cheapest they had. :) Seems to work ok... your haupauge is pretty much standard I guess. Funny thing is that the ATI card didn't work worth a damn in windows with the nvidia card due to driver conflicts (intentional on one those companies, I beleive), but in linux it is actually a realy nice card.

Damn, I didn't realise how much I/O performance that MythTV demanded. I was looking in the archives and they were all talking about scsi... A bit out of my price range no way I am going to spend 300-400 dollars for 36 gigs of space and a new scsi card. Oh well, off to buy a new HD tomorrow. Maybe I'll make noise to the salesmen about raid 0 ide cards, but I doubt anything will come of it.

I guess thats why Macs are the "THING" for video editing. Even the older powermacs had SCSI drives.. Not until halfway thru the power mac G4 runs did they switch to IDE. That new G5 with the SATA interface and dual cpu's would be IDEAL for this sort of thing. One CPU spends it's time doing the I/O thing and keeping the data flowing at maximum spead thru the fat bus, while the other does the rendering and special effects. Now I understand better why macs do so well in graphics compared to run of the mill PC's, and more about why workstations have dual cpus even when you don't get the large amount of increase in raw proccessing performance.

Hell maybe I'll win the lottery.. (would be a shock though since I don't actually buy lottery tickets)

Good luck on that test, BTW
 

rjain

Golden Member
May 1, 2003
1,475
0
0
Originally posted by: drag
Well I got Mythtv installed and working on my PC... And it's pretty good, I've been playing around with it and unfortuanatly my Harddrive is just WAY TO SLOW.

Even though I have all the dma stuff on and 32 bit activated and all that fun stuff. When I run hdparm -tT I get only 26 MB/sec bandwidth comming from it, and sometimes it's 12... (maybe a driver issue and I only get 5.56 with dma turned off.). So everything is in slow motion and the sound and video get way out of sync. I am going to buy a quicker harddrive and that should solve my problems.

26 MB/sec is what you'd expect from a 7200 RPM drive that came out just as 7200 RPM SCSI was being phased out. You probably get 12MB/sec when something else is busy accessing the drive, too.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Ya normally I wouldn't be disapointed from this type of performance, but damn this program is harddrive intensive. It takes the input from the video card and encodes it in either RTJPEG or MPEG4 and immediately records it to your harddrive. Similtaniously it then reads it from your harddrive and decodes it, playing the output on your screen.

And we are dealing with BIG files. Something like file sizes of 4 gigs or more are not uncommon. Something like what MythTV does is so intense that only very modern computers can handle being the backend and the front end at the same time. Seems like lots of people have 2 computers to handle these tasks.

Which is what makes SCSI so ideal. It's fast and cpu independant. I have a old 486DX with scsi raid (while not using raid) controller that outpaces my newer computers in terms of I/O speeds. The SCSI hardware takes care of most the proccessing it takes to run the harddrive and take care of file locations and stuff like that. IDE is very CPU intensive in comparision, which in turn makes the machine even more slowly because it has to deal with controlling the harddrive and doing the incoding and decoding all by itself. It's almost to much.

There are more advantages to SCSI over IDE then just speed and reliability, which is a big deal by itself. Even the most expensive IDE setup can only barely keep pace with the cheapest SCSI setups, but anyways that stuff is way out of my leage. Hope my new WD1200JB (Western digital 120 Gig special edition with the 8meg cache) can keep up with it. It probably will. If it doesn't I won't bother raid'ing it for another 6 months, if ever.

Oh well... I you want realy fast harddrive, solid state is the only way to go!!!


BTW anybody know which is the fastest format for linux for large files? XFS, Reiserfs, JFS, or *gasp* ext3? Or something even more exotic? I care more about speed then reliablity.

At least maybe now I can try out some real digital editing on video files...