LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-29-2004, 03:19 PM   #16
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48

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.
 
Old 07-29-2004, 03:28 PM   #17
koy
Member
 
Registered: Apr 2003
Distribution: SuSe 10
Posts: 55

Rep: Reputation: 15
Quote:
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:

Code:
  mkdir $OUTPREFIX
  cp $OUTPREFIX.mpg VTS_01_1.VOB
  dvdauthor -o $OUTPREFIX/ VTS_01_1.VOB
  dvdauthor -o $OUTPREFIX/ -T
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

Last edited by koy; 07-29-2004 at 04:33 PM.
 
Old 08-02-2004, 02:53 PM   #18
tlawlessrr
Member
 
Registered: Mar 2004
Location: Tampa, FL
Distribution: SuSe 9.1 and Fedora Core 2
Posts: 38

Rep: Reputation: 15
Where can I find a MPEG2 codec for GMencoder?

I have tired installing serveral different packages nothing shows up in that pulldown list for me to select mpeg2.
 
Old 08-02-2004, 03:41 PM   #19
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
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.

Last edited by wapcaplet; 08-02-2004 at 03:43 PM.
 
Old 08-17-2004, 02:29 AM   #20
koy
Member
 
Registered: Apr 2003
Distribution: SuSe 10
Posts: 55

Rep: Reputation: 15
don' think gmencoder supports mpeg2, at least I can't find anything about it on it's official site
 
Old 08-25-2004, 01:53 PM   #21
dingaling
LQ Newbie
 
Registered: Aug 2004
Location: Atlanta
Distribution: FC1
Posts: 14

Rep: Reputation: 0
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.

Anyway, nice job!!!!.
 
Old 08-25-2004, 05:37 PM   #22
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Quote:
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.
 
Old 08-26-2004, 11:37 AM   #23
dingaling
LQ Newbie
 
Registered: Aug 2004
Location: Atlanta
Distribution: FC1
Posts: 14

Rep: Reputation: 0
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
 
Old 08-26-2004, 01:41 PM   #24
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
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.

Last edited by wapcaplet; 08-26-2004 at 01:43 PM.
 
Old 08-26-2004, 02:27 PM   #25
dingaling
LQ Newbie
 
Registered: Aug 2004
Location: Atlanta
Distribution: FC1
Posts: 14

Rep: Reputation: 0
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!!!!
 
Old 08-29-2004, 10:19 PM   #26
dingaling
LQ Newbie
 
Registered: Aug 2004
Location: Atlanta
Distribution: FC1
Posts: 14

Rep: Reputation: 0
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!!!
 
Old 08-30-2004, 03:07 AM   #27
koy
Member
 
Registered: Apr 2003
Distribution: SuSe 10
Posts: 55

Rep: Reputation: 15
Quote:
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!!!
You have to author it:

Code:
  mkdir dvd
  mv whateverthempgfileiscalled.mpg VTS_01_1.VOB
  dvdauthor -o dvd/ VTS_01_1.VOB
  dvdauthor -o dvd/ -T
And then, to make it easier you could make an iso:

Code:
 mkisofs -dvd-video -udf -o whateveryouwanttocalltheiso.iso dvd/
And then lastly you can burn that iso (I think you have to be root):

Code:
growisofs -Z /dev/dvdrecorder=whateveryouwanttocalltheiso.iso
(replace /dev/dvdrecorder with the path to your dvd-recorder )

I think you can also burn the iso with K3B
 
Old 08-30-2004, 08:35 PM   #28
dingaling
LQ Newbie
 
Registered: Aug 2004
Location: Atlanta
Distribution: FC1
Posts: 14

Rep: Reputation: 0
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?
 
Old 08-31-2004, 05:14 AM   #29
koy
Member
 
Registered: Apr 2003
Distribution: SuSe 10
Posts: 55

Rep: Reputation: 15
Quote:
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?

that's strange

when you browse the dvd, what files are there?
 
Old 08-31-2004, 08:15 AM   #30
dingaling
LQ Newbie
 
Registered: Aug 2004
Location: Atlanta
Distribution: FC1
Posts: 14

Rep: Reputation: 0
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.
 
  


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 04:07 PM.

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