LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
Password
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.

Notices


Reply
  Search this Thread
Old 01-08-2005, 11:48 AM   #451
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48

Your twopass patch works nicely! I discovered one of my own mistakes that causes problems with NTSC; in the mencoder line, an explicit -ofps 29.97 is used; if that's changed to -ofps $TGT_FPS, it appears to work equally well for PAL.

Unfortunately, I didn't keep most of the problematic videos I once had. There were several variable-framerate videos that never quite encoded right, and I eventually deleted them when I got low on disk space, so I don't have much to do testing with.

I've noticed that the audio quality is kind of bad when using -twopass, at least with one video I tested it with (the "Troops" parody of COPS). It's as if the audio is too loud, resulting in nasty clipping and distortion. There's probably a command-line tweak to mencoder to cut down on that problem.

All in all, good work.
 
Old 01-08-2005, 12:37 PM   #452
alecm
LQ Newbie
 
Registered: Jan 2005
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally posted by wapcaplet
Your twopass patch works nicely! I discovered one of my own mistakes that causes problems with NTSC; in the mencoder line, an explicit -ofps 29.97 is used; if that's changed to -ofps $TGT_FPS, it appears to work equally well for PAL.

Unfortunately, I didn't keep most of the problematic videos I once had. There were several variable-framerate videos that never quite encoded right, and I eventually deleted them when I got low on disk space, so I don't have much to do testing with.
I can't believe I missed that fps thing myself, I've got a bit of an NTSC bias myself I guess. Too bad you don't have those videos anymore, I've only got a couple problem files myself, it would be good to have a larger testbed. I'm sure others have some though.

Quote:
I've noticed that the audio quality is kind of bad when using -twopass, at least with one video I tested it with (the "Troops" parody of COPS). It's as if the audio is too loud, resulting in nasty clipping and distortion. There's probably a command-line tweak to mencoder to cut down on that problem.

All in all, good work.
Hmm, the audio issue probably has to do with the resampling. For some reason mencoder requires a specific format for the samples when resampling, I guessed at 16 bit floating point, but that may not be ideal in all cases, I'm not sure how to work around it. If the problem is clipping and distortion, it's possible that just using -af volnorm would fix it. It may also be best not to resample unless the sample rates differ, to avoid this kind of thing in some cases. I'm glad you like the changes so far. Thanks again for a great script; it's rare to find shell scripts (or even perl scripts for that matter) thaat are so easily readable/maintainable.
 
Old 01-09-2005, 01:51 AM   #453
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Quote:
Originally posted by alecm
Too bad you don't have those videos anymore, I've only got a couple problem files myself, it would be good to have a larger testbed. I'm sure others have some though.
Yeah, we'll find out more with the next release. I'm tempted to go ahead and prepare an 0.18 release, even though the GUI isn't done. Maybe the GUI will just have to wait until 0.19, or I could probably wrap it up enough that it'll do functional encoding/disc creation and consider it mostly an interface test before I get into the details of what I want to implement.

Among the things I want to do: adding multiple audio tracks to a video (commentary/translation channels); adding (multiple) subtitle tracks to videos; a "disc space" meter during disc creation that shows how much disc space is estimated to be left; add chapter breaks to videos; preview videos, slides, and menus; drag-and-drop adding videos or stills to the disc layout tree; saving/loading disc layouts in progress; and others. Many of these require new feature implementations in tovid, makexml, etc., but some of them are pure GUI. These things all come later, though; my first goal is a basically functional GUI interface for authoring video discs.

Quote:
For some reason mencoder requires a specific format for the samples when resampling, I guessed at 16 bit floating point, but that may not be ideal in all cases, I'm not sure how to work around it.
I would guess something along these lines as well. I don't know how it could be worked around, but a volume-normalization in the filter would probably help.

Quote:
Thanks again for a great script; it's rare to find shell scripts (or even perl scripts for that matter) thaat are so easily readable/maintainable.
Thank you! The scripts are becoming almost too complex; seems like there's only so much you can do with bash scripts by way of readability, so I've tried to stick with my usual standby of lots of comments. The 'makexml' script is logically fairly simple, but the large chunks of XML throughout the script make it pretty hard to read, too. Not much that can really be done about it, but I hope to keep them as readable as possible, if only for my own sanity in maintenance
 
Old 01-09-2005, 08:53 AM   #454
sk545
Member
 
Registered: Aug 2002
Posts: 312

Rep: Reputation: 30
wow, lot of development going on in here it appears. lol.
 
Old 01-09-2005, 02:07 PM   #455
Steel_J
Member
 
Registered: Oct 2004
Location: Montreal, Canada
Distribution: Linux Mint 21.3 Cinnamon
Posts: 359
Blog Entries: 1

Rep: Reputation: 31
New realease of my DVD9 to DVD5 script.

DVRequant 0.14a

Here: http://www.linuxquestions.org/questi...41#post1398441

For those who might be interested, namely Wapcaplet.


What's new!

1) It uses a brand new way to show the DVD content to the user (lsdvd). It let's you pick the right title of your choice and right after you can pick the language audio track of your preference. So now I introduce a new dependency: lsdvdrip. (It was worth it)

2) It clean's up after itself a lot now. It erases uneeded files as it goes. Because otherwise it would get up to 22 gigs of space used up for the whole process.

3) At the end it creates a DVD structure and authors the movie so it is ready to burn with K3B.

Last edited by Steel_J; 01-09-2005 at 02:08 PM.
 
Old 01-09-2005, 02:42 PM   #456
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Looking good, Steel_J! I think I will go ahead and include dvrequant 0.14a in tovid 0.18 (or a newer version, if you have one by then), even though I haven't had a chance to test it with our DVD drive yet. Sometime this week I'll try to get Linux onto my wife's box so I can try it out.

Just a few impressions, from looking at the script: if possible, I'd like to include command-line options for doing everything non-interactively. This feature would allow your script to integrate better with the rest of tovid. There are a couple of other things you might be able to automate, such as showing a list of available DVD devices for the user to choose from (in case they don't know whether it's /dev/hdc or whatever). Automatically detecting it would be cool too - if the user has only one DVD device, use that one; if there is more than one, allow the user to choose which one to use.

Also, the program doesn't exit gracefully if there's no DVD device (as I just found out by running it on my box without one ). Perhaps just a quick check whether 'lsdvd' failed, and if so, print an error and exit.

In the hopefully not-too-distant future, and if people like the inclusion of dvrequant in tovid, I would like to implement a GUI interface for it. Having complete command-line (i.e., non-interactive) capability would make this much easier, as well. Feel free to steal code from the other tovid utilities if you aren't sure how to implement this. I'd be happy to help, too, since I think this could become a valuable part of tovid.
 
Old 01-09-2005, 05:26 PM   #457
Steel_J
Member
 
Registered: Oct 2004
Location: Montreal, Canada
Distribution: Linux Mint 21.3 Cinnamon
Posts: 359
Blog Entries: 1

Rep: Reputation: 31
I have put your recommendations in my todo list.

I will work on chaptering the dvd to release it to you with at least that major feature.

Do you have an example of a "graceful exiting" code portion in one of your Tovid utilities just to point me in the right direction. After that I'll just study it by myself.

Last edited by Steel_J; 01-09-2005 at 05:28 PM.
 
Old 01-09-2005, 11:12 PM   #458
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Quote:
Originally posted by Steel_J
Do you have an example of a "graceful exiting" code portion in one of your Tovid utilities just to point me in the right direction. After that I'll just study it by myself.
Look for lines in the tovid script that begin with "runtime_error"; these are always in an if-else statement that checks for the successful completion of the most recent command. The variable $? contains the exit status of the last foreground process, so you could do something like:

Code:
lsdvd ...
if [[ ! $? ]]; then
  echo "Couldn't run lsdvd; maybe you chose the wrong DVD device?"
  exit 1
fi
 
Old 01-10-2005, 12:20 AM   #459
Steel_J
Member
 
Registered: Oct 2004
Location: Montreal, Canada
Distribution: Linux Mint 21.3 Cinnamon
Posts: 359
Blog Entries: 1

Rep: Reputation: 31
Ok, thanks, I am going to work on this.
 
Old 01-10-2005, 02:01 AM   #460
alecm
LQ Newbie
 
Registered: Jan 2005
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally posted by wapcaplet
I've noticed that the audio quality is kind of bad when using -twopass, at least with one video I tested it with (the "Troops" parody of COPS). It's as if the audio is too loud, resulting in nasty clipping and distortion. There's probably a command-line tweak to mencoder to cut down on that problem.[/B]
As a test, could you try using format=2:intunsignedle instead of format=2:float for the audio format (set in TP_OPTS). That may improve the audio issue. I really don't know anything about audio sample formats, though from what I've read, float may not be a good choice (signed little-endian would probably be good, but strangely mencoder fails when I try to use any signed formats). Also, it may be better to use 'lavcresample=44100' in place of 'resample=44100', to use the libavcodec resampling plugin, rather than the builtin mencoder version.

ETA: Further research seems to confirm that the plain 'resample' filter is very low quality, and defaults to a speed optimized implementation; 'lavcresample' should provide a signficant improvement. Another option is 'resample=bitrate:0:2' which will give much better quality at the cost of cpu power, or 'resample=bitrate:0:1' which is a compromise algorithm.

Last edited by alecm; 01-10-2005 at 11:02 AM.
 
Old 01-11-2005, 06:15 PM   #461
sk545
Member
 
Registered: Aug 2002
Posts: 312

Rep: Reputation: 30
not sure if you're still working on 'tovid-interactive', but a minor thing:

- Entering any word at all at the prompts still makes the script keep going even if the words don't mean anything.

- If one messes up and puts in the wrong words, backspacing producing strange jargon:
ddd^H^H^H^H

Like i said, i dunno what your plans are for the interactive script, so not sure if it would be worthwhile to fix the above (if possible).
 
Old 01-11-2005, 09:08 PM   #462
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Quote:
Originally posted by sk545
Entering any word at all at the prompts still makes the script keep going even if the words don't mean anything.
Yeah, I guess I could check for things like that, just to improve the tolerance for error.

Quote:
If one messes up and puts in the wrong words, backspacing producing strange jargon:
That's odd; it works OK on my box. Maybe something weird with your terminal emulator. Try entering 'stty erase ^H' at the prompt (that ^H is actually control-H) and see if it works then. If so, you can include the stty command in your ~/.profile or ~/.bashrc.

I'm doing a little shopping around for video capture/TV tuner cards. Anyone know anything about these? Rumor has it that the Conexant cards are supported well in Linux. I don't want to spend more than about $50; I'm mostly looking for a basic video capture and TV tuner card with coaxial and S-video inputs. 720x480 resolution would be preferable, though most of the budget models seem to be 640x480. I've found quite a few decent ones on NewEgg, but I wondered if any of you guys had experience with this.

Also, I've noticed that some of them do real-time MPEG encoding. It makes me wonder if there's any way to make tovid use any hardware MPEG encoder you may have - it'd be pretty sweet if there was a way to get tovid to use a hardware MPEG encoder (maybe by piping a video stream into a sort of pseudo-video-capture device). No clue if that's feasible, though (or if its quality would be comparable to what tovid produces now).

So hey, if any of you have such hardware, and want to experiment, let me know how it goes!

Unfortunately, I have had practically no time to work on the GUI. I've worked my inventory job for 10 days in a row now, at uncomfortable hours (like 2:00 am); by the time I get home, I usually just feel like vegging out in front of the TV or something. I hope I get the time and energy to work on it soon; I have a couple days off coming up, so I will try to make good use of them.
 
Old 01-12-2005, 12:14 AM   #463
Steel_J
Member
 
Registered: Oct 2004
Location: Montreal, Canada
Distribution: Linux Mint 21.3 Cinnamon
Posts: 359
Blog Entries: 1

Rep: Reputation: 31
Wapcaplet, take it easy my friend.

The work you do for the community is great. People will take things as they come. We all have lives, jobs, friends and times when we just feel like doing nothing.

I myself am doing a bit of develloping as you know, but there are a lot of other things I like to do on my computer and outside of the house, hahaha!

So my policy is no rush, because we do this because we like it and to keep liking it you have to take breaks. Long breaks if needed.

See, myself, you won't hear from me for the next 2 weeks starting sunday. I'll be on a sandy beach down south working on my tan.

As for capture /tuner systems. For Linux I very strongly recommend going for an external hardware solution. Don't go for a cheap PCI card or eaven for an expensive PCI model. They are passable on Windows but are not very well supported in Linux except for a few model, but quality will suffer greatly.

For example an ATI All in Wonder video card is an amazing capture system on Windows but on Linux forget it for now. One day maybe. When drivers are develloped.

May I recommend a reasonnably priced AverMedia external USB Video Capture Device at TigerDirect.com

http://www.tigerdirect.com/applicati...447&CatId=1428

It is the AverMedia DVD EZMaker Pro USB 2.0 and it as all the plugs you want and a real time hardware mpeg2 encoder that encodes at 720x480.

At 84.99$ it is a good price and trust me on this. I prefer you pay close to a hundred for garanteed plug and play results and great quality than fork over 50 bucks and be largely dissapointed.

I have bought for litteraly thousands of dollars (close to 10000$) from TigerDirect wihtout a ever having problems. Ther are very professionnal and reliable. If you have a problem they will fix it. The stuff gets delivered to your door by UPS in 4-5 days.

Last edited by Steel_J; 01-12-2005 at 12:17 AM.
 
Old 01-12-2005, 10:56 AM   #464
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Quote:
Originally posted by Steel_J
So my policy is no rush, because we do this because we like it and to keep liking it you have to take breaks. Long breaks if needed.
Thanks for the support I have, in fact, gotten a little diverted from tovid lately; I've been working on ideas for another unrelated programming project (the nature of which I'd be more comfortable revealing in private email, so if any of you are curious, email me). I tend to get easily distracted, so I've gotten used to doing different things in phases. Bored with tovid this week, interested in something else; bored with that next week, would rather do 3D illustrations for Wikipedia; or whatever. I don't know if it's a very productive cycle, but it keeps my brain focused on one thing for a good few days. I'm not too worried, since I know I'll get back to tovid eventually, but I'm anxious to see how much impact a GUI would have on tovid's popularity. I'm not worried about winning a popularity contest, but it's exciting to think of how many people might like my little scripts, especially considering how few similar programs exist for Linux. Maybe I am headed for a minor amount of fame for being the author of tovid (and hopefully a small amount of fortune, too)!

Quote:
See, myself, you won't hear from me for the next 2 weeks starting sunday. I'll be on a sandy beach down south working on my tan.
Have fun! We'll be scraping ice off our windshields to go to work.

Quote:
For example an ATI All in Wonder video card is an amazing capture system on Windows but on Linux forget it for now. One day maybe. When drivers are develloped.
Yeah, I have been trying to keep that in mind; basic capture cards are easier to support than powerful combo cards. I don't know whether we will be installing this card in my box or my wife's - hopefully mine, since she already has the DVD burner, and the superior CPU, RAM, and video card - at any rate, I like to keep Linux in mind with any hardware I buy.

Quote:
May I recommend a reasonnably priced AverMedia external USB Video Capture Device at TigerDirect.com. It is the AverMedia DVD EZMaker Pro USB 2.0 and it as all the plugs you want and a real time hardware mpeg2 encoder that encodes at 720x480.
That looks pretty cool! Thanks for the idea of using an external device; I really love that idea, since it would negate the "my box or wife's" issue. I'm not sure about that particular model; I'd like TV tuner capability, so that might mean going a little more expensive for AverMedia's TVBox 5 or something. The main reason we would be interested in video capture is to tape stuff off of TV, backup old VHS tapes, etc. (and possibly utilize the TiVo-like software capabilities that can be had with a TV tuner). I will keep shopping around.

Thanks for your suggestions!

edit: whoops, I just realized that the TVBox 5 connects to an LCD monitor, not USB. Well, it's closer to what I want though. The Plextor ConvertX recorder with tuner. That's getting a little too much on the expensive side, though. Under $100 would be preferable.

Last edited by wapcaplet; 01-12-2005 at 11:10 AM.
 
Old 01-12-2005, 06:22 PM   #465
sk545
Member
 
Registered: Aug 2002
Posts: 312

Rep: Reputation: 30
For tvtuner/tvcapture cards, try looking here:

http://pvrhw.goldfish.org/tiki-page....e=pvrhw_tuners

Basically, you got have to choose between these:

1) Hardware (or builtin encoder on the card) OR sofware encoding which uses your own cpu.
2) USB or PCI based.

Its obvious that built-in hardware encoding would be preferred, however what about usb or PCI? Most people say PCI is the way to go because of better quality (at least thats what i have heard, maybe that was long ago before usb2.0 came out, so it might not matter nowadays. It would be better to do more research on that).


Here is a thread on some people discussing the same thing almost:

http://episteme.arstechnica.com/eve/...m=368000843631

Hauppauge WinTV PVR250 is by FAR the most recommended in the linux community. It ALWAYS comes up when discussing any kind of capturing.

Problem is that you're looking for something for $50, and if i were you, i would wait till i had enough funds and buy the 250.

Good luck.

Quote:
Also, I've noticed that some of them do real-time MPEG encoding. It makes me wonder if there's any way to make tovid use any hardware MPEG encoder you may have - it'd be pretty sweet if there was a way to get tovid to use a hardware MPEG encoder (maybe by piping a video stream into a sort of pseudo-video-capture device). No clue if that's feasible, though (or if its quality would be comparable to what tovid produces now).
That would be sweat if tovid could do that, here are some apps that already do it (well, i think they do, look under the 'Grabbing, Recording, and Editing' section):

http://www.exploits.org/v4l/

Quote:
I have bought for litteraly thousands of dollars (close to 10000$) from TigerDirect wihtout a ever having problems. Ther are very professionnal and reliable. If you have a problem they will fix it. The stuff gets delivered to your door by UPS in 4-5 days.
I used to hear horror stories about tigerdirect especially when it came to rebates....maybe they got better over time, hrm, looks like they did:

http://www.resellerratings.com/seller1983.html

Last edited by sk545; 01-12-2005 at 06:37 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert AVI to either DVD, VCD or SVCD format linux-rulz Linux - General 13 12-27-2011 01:29 PM
XVID, VCD, SVCD and so on. How to?? Thakowbbery SUSE / openSUSE 7 10-31-2005 03:39 PM
Encoding video for VCD and DVD wapcaplet LinuxQuestions.org Member Success Stories 3 08-01-2004 01:03 PM
SVCD, VCD, DVD editing asalford Linux - Software 19 07-16-2004 04:47 PM
converting *.avi file to *.vcd (or svcd) zstingx Linux - General 1 10-07-2003 06:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration