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.
Thanks for your feedback! I'm glad the script worked for you. Out of curiosity, did you use the GUI or just the command-line? I haven't done any testing of the GUI, so it's likely to have some problems.
PAL support: I've considered it; in order to do it right, I'd probably need to restructure the script quite a lot, but it's definitely something I'm considering.
DVD authoring: I've also considered this, but aside from the most simplistic of DVDs (one video file, no chapters or menus) it's a fairly involved process to create a DVD. Linux sorely needs some good DVD authoring software (especially for menu-creation and disc layout). I think a separate tool would be best for this; I've thought about writing some kind of interface for generating the necessary XML for authoring a DVD, but it'd be a fairly complex piece of work - more complex than my video script is, for sure. It's on my list of things to think about, though. If I were to create such a monster, it'd of course have the capability to call on my script to do conversion. Even commercial/professional software for Windows seems to be lacking in this area - some programs can convert some video formats, and some can author DVDs, but I haven't yet tried any that can simply take an arbitrary batch of videos and make a DVD out of them.
ISO generation would be a pretty easy step from DVD authoring, so it'd probably be included in such software.
Some unrelated notes: I've found a pretty severe problem with yuvfps (the tool in mjpegtools that converts the frame rate), namely that it seems to completely screw up video with odd frame rates. Details in this thread. So, if you have video with frame rates like 20, 15, or 27.591 fps, you'll probably have problems. Barring any alternatives, I'll probably tweak the script to make it do some kind of two-pass encoding for those videos; it'll take a lot longer, but will, I hope, avoid A/V sync issues.
Originally posted by wapcaplet Thanks for your feedback! I'm glad the script worked for you. Out of curiosity, did you use the GUI or just the command-line? I haven't done any testing of the GUI, so it's likely to have some problems.
PAL support: I've considered it; in order to do it right, I'd probably need to restructure the script quite a lot, but it's definitely something I'm considering.
DVD authoring: I've also considered this, but aside from the most simplistic of DVDs (one video file, no chapters or menus) it's a fairly involved process to create a DVD. Linux sorely needs some good DVD authoring software (especially for menu-creation and disc layout). I think a separate tool would be best for this; I've thought about writing some kind of interface for generating the necessary XML for authoring a DVD, but it'd be a fairly complex piece of work - more complex than my video script is, for sure. It's on my list of things to think about, though. If I were to create such a monster, it'd of course have the capability to call on my script to do conversion. Even commercial/professional software for Windows seems to be lacking in this area - some programs can convert some video formats, and some can author DVDs, but I haven't yet tried any that can simply take an arbitrary batch of videos and make a DVD out of them.
ISO generation would be a pretty easy step from DVD authoring, so it'd probably be included in such software.
Some unrelated notes: I've found a pretty severe problem with yuvfps (the tool in mjpegtools that converts the frame rate), namely that it seems to completely screw up video with odd frame rates. Details in this thread. So, if you have video with frame rates like 20, 15, or 27.591 fps, you'll probably have problems. Barring any alternatives, I'll probably tweak the script to make it do some kind of two-pass encoding for those videos; it'll take a lot longer, but will, I hope, avoid A/V sync issues.
I used the command-line, not yet had time to test the gui ;=)
---
A quick way for the dvdauthoring part would be smth like:
Not sure if it would work, as I'm no programmer (and not even near to being one); but I guess if it would work, it would make a nice and simple dvd structure with one file, (more files if larger than 1gb ofcourse). But I guess ur right, it's better to do that step urself, as you have much more possibilites of configuring the dvd to your needs
---
I'll maybe have a look at that pal thing, I know a bit about aspect ratio's and all of that, maybe I can find a simple way to convert it to pal
--
EDIT:
I added:
Code:
# Authoring of the DVD
if [[ $FORMAT == "DVD" ]]; then
echo "Doing the authoring"
mkdir $OUTPREFIX
cp $OUTPREFIX.mpg VTS_01_1.VOB
dvdauthor -o $OUTPREFIX/ VTS_01_1.VOB
dvdauthor -o $OUTPREFIX/ -T
rm VTS_01_1.VOB
fi
before the last line, and it seems to have worked; it made me a folder with a dvd-structure including the IFO and BUP files
I have never used gmencoder (wasn't even aware of its existence, until now) so I am not sure what you can do to get mpeg2 output. According to mplayer's online documentation, mpeg1 layer 2 is not supported in mencoder; the manual page for mencoder says that "mpeg2" is a valid output codec for the lavc filter, but I have never been able to get any useful mpeg2 video out of it. Hence the reason I've been using mjpegtools for all video encoding in my script. A pity; if mencoder did mpeg2 video output, I could use it for all the encoding and save some steps!
edit: Correction, they say mpeg1 layer 2 audio is not supported. (I assume you were talking about video). At any rate, mpeg2 video output, for me, has been flaky at best.
I also have just used your script and like it very much. Found out the hard way that it would not work at all unless I had normalize installed. When I installed that, it worked like a charm. I converted a 5.2GB mpeg2 file into a 1.2GB SVCD file in about an hour and a half. Thought that was very good. I guess I need to play with the bitrate settings in order for this to fit on a 700MB CD.
Another thing I noticed was that I used the GUI plug-in and it seemed to work fine but then stop. Couldn't figure out why. Then when I moved the mouse it started to work again. When I stopped moving the mouse the script stopped working. Might need to give this another try tonight to make sure this has nothing to do with normalize not being installed at the time.
Originally posted by dingaling
I also have just used your script and like it very much. Found out the hard way that it would not work at all unless I had normalize installed. When I installed that, it worked like a charm.
Yeah, I've changed that in my newer version (not released yet).
Quote:
I converted a 5.2GB mpeg2 file into a 1.2GB SVCD file in about an hour and a half. Thought that was very good. I guess I need to play with the bitrate settings in order for this to fit on a 700MB CD.
Damn! Your computer must be a lot faster than mine. Usually for SVCD-quality encoding, it takes around 3 hours per hour of video time.
Quote:
Another thing I noticed was that I used the GUI plug-in and it seemed to work fine but then stop. Couldn't figure out why. Then when I moved the mouse it started to work again. When I stopped moving the mouse the script stopped working.
Yeah, no clue what that could be. I think I have tested running the script from GUI exactly once, so it is certainly rife with problems. Anyhow, thanks for your feedback! I'm glad you found the script useful.
Well wapcaplet, I lied to you. When I said it only took an hour and a half to do those conversions it actually takes as long as you say. I must have been smoking something that night. hehehehe. I think this had something to do with me again not having normalize installed. But anyway, it still works, thats the important thing .
Question though. I changed the svcd bitrate from 3600 to 2800 at the beginning of the file hoping it would bring the size down, but it still converted from 5.2GB's into a 1.2GB file. I'm still doing the same thing as I stated in my first post. Any suggestions? Thanks again
I don't think I ever included anything in the script to actually make use of the SVCD bitrate, so it's being ignored. Oops. You could add it in fairly easily, by editing line 126 of the script:
Code:
VIDFMT="-f 4 -d"
to read:
Code:
VIDFMT="-f 4 -d -b $SVCD_BITRATE"
Be warned, though, this is interpreted as a maximum bitrate; during encoding, it often (usually) takes less bitrate to faithfully encode the video, so lowering it may not have much effect unless you lower it quite a lot. I don't know how long your original video was, but you'll notice at the top of the script are some comments about "guaranteed" and "possible" video lengths with certain bitrates. "Guaranteed" assumes it uses the maximum bitrate the whole time, but "possible" shows lengths that I've found to be more realistic, because the maximum bitrate isn't needed the whole time. Those estimates are for 4GB DVD, but you get the general idea.
I haven't done much SVCD encoding, but most of the commercial/pirated SVCDs I've seen on the internet are about 40-50 minutes per 700MB CD. You could get more than that with really low bitrates, but quality would suffer.
Thats kinda what I figured. I was too scared to really bite into the bitrate that much because I didn't want the quality to suffer. Oh well, no biggie. I'll just continue with your script just the way it is and put multiple episodes on one DVD.
By the way this is a 1 1/2 hour long episode that I recorded using a PVR-250. This was done using MythTV. This is a project I'm into very much. Thanks Alot for the quick reponse!!!!
Once you use your script and have the resulting .mpg, have you been able to burn that .mpg onto a DVD? I'm trying to do this via command line and have had no luck whatsoever. I've used some burn programs and they do the same thing also. If you have, what did you do to make it work? Thanks!!!
Originally posted by dingaling Once you use your script and have the resulting .mpg, have you been able to burn that .mpg onto a DVD? I'm trying to do this via command line and have had no luck whatsoever. I've used some burn programs and they do the same thing also. If you have, what did you do to make it work? Thanks!!!
Thanks alot koy that worked!!!! I was hoping this would work in a stand alone DVD player but it doesn't. When I put this into my windows machine it sees it as an .avi movie. Is that right? I know my stand alone DVD player accepts VCD, SVCD, MPG all that good stuff. Any suggestions?
Originally posted by dingaling Thanks alot koy that worked!!!! I was hoping this would work in a stand alone DVD player but it doesn't. When I put this into my windows machine it sees it as an .avi movie. Is that right? I know my stand alone DVD player accepts VCD, SVCD, MPG all that good stuff. Any suggestions?
Well when I mount the drive in Linux I do see the AUDIO_TS and VIDEO_TS folders with the correct stuff inside. But when I put the disk in my Windows machine all it sees is an .avi file. By the way when I put this disk into my stand alone player it gives me an invalid disk error. I haven't tried playing this disk with xine to see if it works or not. I guess I should.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.