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.
It does the above, but then there is nothing in /usr/local/bin concerning tovid. I am not getting the message " Files successfully installed to $DEST" either.
Also, i tried the gui for the first time. Its functionality looks great i.e: when one goes to select a option, a pop up dialog box gives a explanation. That is a very nice touch, hopefully more linux apps do that in the future. I also like the fact that it gives a dialog to ask if one is ready to encode with the proper command. Please don't take those two things out.
However, the gui didn't work for me. I selected everything, but when i hit encode, the log remains empty and it just says 'Encoding Finished' at the bottom.
I am not surprised you had trouble with the GUI. I mostly wrote it for fun, and to learn some wxPython, and have only tested it once. The log window was hard to get working, and there are still problems with it. I'll definitely work more on getting it functional after the core scripts are nearer to completion. Thanks for your feedback on what I have so far.
I goofed on the copy command in the installer, since I wrote it at the last minute. The line:
Code:
eval echo "cp $FILE $DEST"
should read:
Code:
cp $FILE $DEST
I was trying to get it to print out the command and execute it at the same time, but it looks like I'll probably just have to use two separate commands. Anyway, if that doesn't work, just copy the files manually to wherever you want them.
I wasn't expecting the gui to work either, but i tried it anyways. What i most like about it is that its simple. I mean i have seen and tried other gui's like gmencoder and kavi2svcd, and they overwhelm me. They have like sooo many options, thats its mind boggling. I just want to make a vcd/svcd and not be bothered by a trillion command line options in the gui. If that was the case, then i would use the command line to do it. The whole point of gui is to make it simpler, which i think yours is achieving quite well. Only thing missing from it is a video info script which tells you what the input stream is, etc. But even that isn't that big a deal. I also love the fact that its just one pane.
Even gui's in Windows (virtualdub,tempeng) aren't even close to how simple this one is, hopefully it stays that way.
If it is at all possible, I will keep the GUI easy to use. It will most likely get a lot more complicated with the addition of other tools (like identifying video, making menus, authoring DVDs, etc.), but usability is my first goal. Like you said, no point in using a GUI if it's going to be just as complicated as using the command-line. I made thorough tooltips, since the lack of (useful) tooltips is one of my major gripes with many GUIs. When it comes time to add the other tools, I will probably break it down into several panes that open or close when needed, or into multiple tabs, so you're not looking at 20 different configuration options all at once.
I think a cool feature would be for the script to show how much percentage of the encoding process is finished or how much is remaining. I am not sure what the script says at the bottom when its encoding, since there are too many numbers there. Another feature would be to have the script check the hard disk/partition size to make sure there is enough space for the encoded video/audio, if not, then it should exit.
Those aren't really important features, but i think they'll give polish to the whole thing.
Good call. I was thinking about implementing some kind of progress-bar during encoding (especially in the GUI). Maybe I can find a way to pipe off the mplayer output (since, as you say, it's pretty cryptic) and estimate the remaining time based on how long the video is (in seconds), and the current progress (in seconds). It'd be pretty easy to just show a percentage of completion, but it'd probably be more useful to show time remaining, so I'll work on that.
I like the idea of checking available space, too. It'd have to be some kind of rough guess, since the actual encoded video size isn't known until it's done, but it'd definitely be good to give an estimate, like "This encoding process will use about XX MB of hard drive space," and let the user know if there may not be enough space available.
It's little features like that which will make the script much more user-friendly. I will work on them.
cool. I mean, it doesn't have to be anything fancy or anything. I think the time thing should be simpler to do since many apps like avidemux have done it. As for the disk size estimate, that might be a bit more complicated. I mean you're gonna have to have the script check the partition/directory of interest and not the whole hard drive, then go from there. I know avidemux does give a estimate of the file size, but it doesnt check the partition to see if one has enough space. The problem is that i think avidemux uses ffmpeg to encode and not mplayer, so i guess it is just a example.
Yeah, I've pretty well figured out how to calculate the remaining time (slightly more complicated than just showing percentage completed, but not hard); I just gotta do the detail work of figuring out how to appropriately redirect output so it's not overlapping the other output. Maybe I'll just stifle all the mplayer/yuvfps/mpeg2enc output (which is all you're seeing now) and instead just print messages from tovid.
Estimating disk space shouldn't be hard. In fact, I'm amazed more utilties don't do it; I remember many years ago, when I used DOS and wanted to copy a file to a floppy disk, it would copy everything it could and then say "whoops! there isn't enough space!" I always thought, "gee, why can't it figure that out before spending 5 minutes copying a file that isn't going to fit." As far as I know, the cp command in Linux is just as dumb about disk space. Pity. My script will be better
good to hear. Yah, i dunno why others don't do that more often, and i always thought it was something that was difficult to implement. It just seems like common sense to do it...but almost no programs have it.
Quote:
Maybe I'll just stifle all the mplayer/yuvfps/mpeg2enc output (which is all you're seeing now) and instead just print messages from tovid.
What good is that output anyways? I still haven't been able to decipher it, seems useless.
Originally posted by sk545 What good is that output anyways? I still haven't been able to decipher it, seems useless.
Hell if I know Occasionally I can spot a useful bit of information in there, but it's mostly irrelevant. I guess it's better for a program to print out a lot of information, rather than very little or none at all, but I don't imagine mplayer's output was meant to be useful for anyone other than developers for debugging purposes. I left it in, because it's the only way you can tell the script is working on something - mplayer has a command-line option to turn off the progress indicator, but no option for turning off everything except the progress indicator.
The script ends with the following (no encoding or jargon at the bottom):
Code:
Option vf: pp doesn't exist.
However, when i take out the -denoise option, the script proceeds to encode. Dunno if i am doing something wrong.
Another thing that would give polish to the script would be checking if your system has the required programs installed, like what a ./configure script does when compiling from source. Dont think it would be too difficult since we are just checking the path like /usr/local/bin or /usr/bin to see if the proper mplayer, mplex, binaries are there. This feature is also, unfortunately, missing from quite a few linux programs and/or scripts.
Quote:
I left it in, because it's the only way you can tell the script is working on something - mplayer has a command-line option to turn off the progress indicator, but no option for turning off everything except the progress indicator.
Hm, looks like another different-versions bug. My mplayer version (1.0pre4-3.3.3) has a 'pp' (post-processing) filter that lets you do some denoising filters. That's what's used with the -denoise option. What version are you using? I guess I can add a version-check in there, and skip denoising if it's not supported (or use different syntax, if that's the case).
Absolutely, there will be a configure script of some kind in the next release. I want to clean up the installer and turn it into an installer/uninstaller as well as a sanity check for required utilities.
If you could do me a quick favor, run these commands:
Code:
mplayer -pphelp
mplayer -vf help
and post the output. I'm thinking I can use those as a check for whether an mplayer version supports the pp filter.
It looks like your version of mplayer is newer than mine, so it's odd that it would lack the pp option. I wonder if it's something that must be compiled in or enabled before compiling. Bummer, too, because I've just been tweaking the denoiser, and it can now produce some pretty amazing results - check out the comparisons.
At any rate, though, thanks for posting your output. At least I now know I can use the -vf help option, and see if 'pp' is listed. If it isn't, I could enable the other denoiser (hqdn3d), which is fairly good on its own. For that matter, I could grep the output for several known denoising options, and use whatever is available.
edit: I just noticed the 'spp' (simple postprocess) option in your output - it can do some of the same things that the 'pp' filter can, so I could make use of that too.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.