LinuxAnswers DiscussionThis forum is to discuss articles posted to LinuxAnswers.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The homepage has also been updated with new documentation. Follow the directions there for installation.
Please let me know if you have any problems; there are a lot of new features in this release, and new features usually means new bugs. Also, if some of you would be so kind as to email me a copy of your ~/.tovid/stats file after you have encoded some videos, that would be great - it'll help me to figure out more accurate estimates of disk space requirements. You can send email to wapcaplet99 at yahoo dot com.
I have begun encoding a 1,5 hour movie now. Have to go to bed now, so I will see how it went out in about 6,5 hours...
I see you sat the parameter "-M 2" in mpeg2enc. Tomorrow I will try to compare if "-M 3" is faster. It may be, because at the moment the CPUs uses between 50-60% load.
-The idvid script is really cool, however its missing one important thing: Identification of the codec that the video has.
- I see now that there is a -ntsc and -pal option, what does the script do as defualt if those are not specified?
- The estimate of disk space is way cool. However it is easy to miss. Maybe it could be in bold or at the bottom? Plus it would be nice to have it report in megabytes rathers than K. Dunno if thats possible, but ' ls -h' does that on the command line.
- Any way to have it so it doesn't crash if one forgets to put in a output file? It could just use a default output name or something..
-Does the ~/.tovid directory get made after we encode at least one movie? Because i don't see it after just installing tovid.
- The biggest 'problem' for me would be that it takes very long to encode. A 700mb avi (codec=DX50) is taking me around and estimated 13hrs on a 1gz computer as reported by the script. Is this because of that ' -nice' option passed to mplayer? Or is it the options that i used:
Originally posted by sk545
The idvid script is really cool, however its missing one important thing: Identification of the codec that the video has.
Yeah, I'll try to get that in the future. Mplayer doesn't always report anything useful for this; for MPEGs, it usually gives a video format of "0x100000002" or something.
Quote:
I see now that there is a -ntsc and -pal option, what does the script do as defualt if those are not specified?
NTSC is default. Those were actually there in the last release also.
Quote:
The estimate of disk space is way cool. However it is easy to miss. Maybe it could be in bold or at the bottom? Plus it would be nice to have it report in megabytes rathers than K. Dunno if thats possible, but ' ls -h' does that on the command line.
Yeah, I'll see about making it more prominent. Megabytes wouldn't be too hard either.
Quote:
Any way to have it so it doesn't crash if one forgets to put in a output file? It could just use a default output name or something..
I'll try to. Now that the other options are preceded by "-" it shouldn't be hard to find out which arguments are the infile and outfile, and it'd be easy to notice if one's missing.
Quote:
Does the ~/.tovid directory get made after we encode at least one movie? Because i don't see it after just installing tovid.
After encoding. The stats file is currently the only thing that will go in there.
Quote:
The biggest 'problem' for me would be that it takes very long to encode. A 700mb avi (codec=DX50) is taking me around and estimated 13hrs on a 1gz computer as reported by the script. Is this because of that ' -nice' option passed to mplayer?
If it's a movie-length video (~2 hours) then 13 hours for encoding sounds about right, for 1Ghz at SVCD resolution. The 'nice' option mostly makes it possible to be doing other things while it's encoding; without it, most computers, especially 1Ghz ones, would get very sluggish during encoding. If you aren't burdening the CPU with a lot of other stuff, the 'nice' part doesn't have much effect on encoding time as far as I can tell. Once we get some stats collected, we'll have a better idea about this - that's the main reason I included the ~/.tovid/stats output, since to date I've only had very vague ideas about how long encoding should take.
Line 678 is a quick thing I threw in at the last minute; must have gotten the syntax wrong. You can just change the line to:
Code:
rm "$LOG_FILE"
which will cause the log file to always be deleted. Or, you can comment out the line (put a # at the front) to always leave the log file there when encoding finishes (probably a better idea for now, in case you want to check it for errors after encoding is done - then you can manually delete it). The log file is named with the same name as the output file, with a .log extension. It'll usually be fairly short, unless you specified the -debug option, in which case it'll be fairly large (~1MB or more, depending on what you're encoding).
When the encoding started, was a message printed like: "Reported running time is 0 seconds. Progress report will be inaccurate"? If not, it's probably just an all-too-common case of the reported running time being wrong, which will cause the progress report to be wrong also. Until I can find a way to get reliable running time reports, that'll remain a problem.
(The full line is not shown here, since left and right square brackets are converted into some wiki-syntax when I post it)
Note that the backslashes have been taken out, and a new condition added. If you don't feel like fixing it, it's no big deal - but you will probably not be warned about overwriting existing files.
Between work, all those things I do on computers and taking out the garbage there is much to do. Ho and there's the girlfriend that requires attention once in a while.
Kidding aside, actually what I have been doing is reading all of this thread with great attention. Then I went trough your website's documentation. I have been studying and experimenting Linux bash scripting with succes and wrote few scripts to warm me up.
Also continued a lot more research and testing in all the Linux audio video tools and I have been writing and organizing notes like crazy.
I played Doom3 also for fun!
All this just so you know I said I was going to write a script based on my DVD9toDVD5 guide and I am working on it.
Figure I would call it: DeeVRequant. Like it???
For now what I have takes the main title of an already ripped (with DVD::Rip) DVD video disc and one audio track and makes it all fit on one DVD-R 4.7. No ripping,No menu, no authoring.
Now that is temporary but I am working on one thing a a time.
My end objective would be to have the script take the whole DVD, process it and spit out a shrinked clone of itself, menus and all audio but for now I will be content if I get it to :
1) rip the main tilte and all it's audio tracks automatically
2) requant all of it
3) create a new DVD structure
4) author automatically with chapters at a fixed interval and a simple menu composed of a pre determined background image and a Play button.
Dreaming aside I have many Ideas but I would appreciate suggestions for the script portion to rip the DVD to disk (Main tille and all audio tracks) without the help of other software like DVD::Rip.
I will repost with new as soon as I can.
I installed your script, the latest version. Great installer, I like it. Flawless.
Now maybe I missed something but I have a question: If I want to make a DVD out of an AVI how exactly am I going to specify to tovid that I wannt the output to fit on a single DVD-R 4.7Gig. Is it done automatically.
For VCD or SVCD's it's mostly a non issue since they get splitted in 700mb chunks, but I dont want my DVD movies to use more than one DVD disc.
Steel_J - great to hear that you are getting the hang of scripting (and still leaving time for the more exciting things in life ). Start with small goals; don't try to write a script to do everything at once. Focus on each of the things in order, and get one of them working before moving to the next, and I think you'll be successful.
I'm glad you like the new version of tovid!
Quote:
Now maybe I missed something but I have a question: If I want to make a DVD out of an AVI how exactly am I going to specify to tovid that I wannt the output to fit on a single DVD-R 4.7Gig. Is it done automatically
Excellent question. I've ignored this possibility so far, under the assumption that practically all movies will fit on a 4.7G DVD. So far, experience has borne me out - most of the 2-hour movies I've encoded end up being around 2G. So even for a nearly four-hour movie like, say, Ben Hur, you should have no trouble getting it to fit on a single DVD.
However, now that denoising is always done, there's a chance that quality will be improved enough that 4.7G isn't enough for some movies. There may be a way to get mplex to split the output (like it does with VCD/SVCD), but somehow I doubt it. I guess the best I can offer is: if it happens, let me know!
All this just so you know I said I was going to write a script based on my DVD9toDVD5 guide and I am working on it.
What exactly does dvd9 to dvd5 mean?
Quote:
I installed your script, the latest version. Great installer, I like it. Flawless.
Yeah, the installer is great, but i would tweak it like so:
1) Change the installer script's name from 'configure' to something like 'install.sh'. I think it would be better since 'configure' is pretty much something thats done to a source, then you do make and make install. It would just be less confusing since people are so used to doing ./configure, make, make install.
2) I don't know how hard this would be, but it would be nice for the install script to check for the versions of mplayer, mjpegtools, etc binaries and tell one if they are too old or not. This would at least have people installing the updated versions before reporting any bugs due to outdated binaries.
It's purpose is to backup your DVD movies on DVD-R's.
DVD9 TO DVD5 is an expression to describe the process of backing up a commercial DVD (9 gigabytes of space on it by design) to a DVD-R witch as only 4.7 gigs on it. So basically you have to shrink the video stream to fit on a smaller medium.
The shrinking is done via a process called requantization and involves processing the mpeg2 stream matrix so that data is removed up to a certain ratio and a new matrix is rewritten.
The result is a smaller mpeg2 elementary stream (M2V) of a very nice quality all done very fast (around 15 minutes for a 2 hours movie) and without any kind of re-encoding.
On Windows many programs do this, DVDShrink being a very popular one, but it's source is not public.
wapcaplet and me had a conversation in another thread about my guide because he was interested in using it as a part of his Tovid Suite of utilities. I agreed to turn it into a working script to help him out and all of you Linux lovers out there.
Quote:
Change the installer script's name from 'configure' to something like 'install.sh'.
I agree, hahahaha! Imagine my surprise when I used the ./configure and got greeted with a welcome message and a simple step by step install instead of the ususal mile long ./configure outputs. It would make sense to give it a different name / procedure. Never the less, wapcaplet does great work and he works fast!
As for the version number indications. It would let the users prevent the earlier problems reported with all the different versions earlier in the thread.
thx for explaining, Steel_J. As for dvd9's, they are dual layered, but not dual-sided, correct? In other words, one side of dvd9 can hold ~9gb of data since its dual layerd?
Sorry, i always confuse dual layered with dual sided.
Yeah, i think the install script should just install tovid. But, it should put a 'uninstalltovid.sh' in /usr/local/bin separately. This way we could delete the untarred tar.gz directory of tovid, and still be able to uninstall tovid if necessary. Thats just how would do it anyways. Then again, having the option of installing/uninstalling in the main install script would be easier if one had downloaded a new version of tovid. They would just have to call the install script which would both uninstall the old version and install the new one. Meh, guess its better to have both. lol.
Well actually there is a way to remember easily fo you.
DVD-10 --- 8.75 GB. They are Double Sided Single Layered.
DVD-9 --- 7.95 GB. They are Single Sided Dual Layered
So in essence you had it correct. DVD-9 are the most common disc you will find in your local video rental store. DVD-10 are met ocasionnaly, but these seem to be an older method of doing things. I have a few of them and you have to get up in the middle of the movie to flip over the disc in the player lol.
Steel_J - A tovid user sent me his own script for doing DVD backup. Let me know if you're interested in seeing it - it might give you some ideas that you could build on.
I've submitted tovid to freshmeat, so it will now show up whenever anyone's searching for video conversion software, and will appear briefly on the main freshmeat page with each new release. Just for kicks, I tried a Google search for "tovid" - the tovid homepage is the first result. I hope that means nobody else is using the name! It'll be interesting to see whether the download statistics on sourceforge go up after being announced on freshmeat. I've already had one bug-report filed on sourceforge since the announcement.
Regarding the name of the 'configure' script - I named it that in anticipation that it may eventually be more of a configuration utility than an installer. 'install' may be better. I'll have to ponder on that.
Version-checking of the various utilities should certainly be enabled where it's needed. Right now, the only version dependencies that I know of are dvdauthor (>=0.6.0) and possibly ImageMagick (>=v6).
I've just tried another DVD-quality movie encoding using the -twopass option; once again, it failed with a broken pipe after working for a couple hours. I'm considering my options for ways to handle this. I'd like to eliminate both the -fps and -twopass options, and have the script automatically resolve the frame-rate issues that necessitate having them now. I'd simply love to find a one-size-fits-all encoding command - mencoder by itself can do almost everything, including frame-rate fixing, resizing, and denoising; I just need to find a rock-solid way to get MPEG video out of it. I'm thinking of trying ffmpeg, to see if it can handle any of mencoder's output formats (though I'd hate to introduce another dependency); ideally I'd have mencoder do all of the encoding. It'd probably be a lot faster and cleaner that way. That's my top priority at the moment - ironing out all the inconsistencies in video encoding.
Then, I think I want to see if I can convince Lowry Digital to release the proprietary (and patented) code they used to clean up Indiana Jones and the Star Wars trilogy as open source. Wouldn't it be cool if tovid could do this? Of course, you'd need to run tovid on a cluster of ~100 high-end machines with a few hundred TB of disk space... oh, and it would include an option to replace all guns with walkie-talkies. Maybe someday algorithms as good as that will make their way to open source. We can dream, right?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.