LinuxQuestions.org
Help answer threads with 0 replies.
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 02-07-2005, 03:16 PM   #496
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48

Quote:
Originally posted by zba78
Seem to have developed a small problem now though. I am running 0.17 and as of last night I've noticed that when I make a menu (using makemenu), after authoring none of the text gets highlighted using xine.
It's probably a bug in makemenu. Could you give me the command you're using to generate the menu, so I can try it out? It may also be a bug in the dvdauthor tools (specifically, 'spumux', which adds the highlights to the menus) - I've had some problems with it in the past.

To help narrow it down a little, let me know what version of spumux you have (just type 'spumux' and look at the first line of output, or if that doesn't work, what version of dvdauthor you have - it should be 0.6.10 or above).

Quote:
The dvd-vcd option lets one make vcd-like quality videos that get burnt on to a dvd. Hows that different from making a regular vcd mpeg? Couldn't you just use that and burn it to a dvd as well?
You could do that, and it would most likely work on most DVD players, but in order for an mpeg video to be compliant with the DVD spec, its audio sampling rate must be 48khz (instead of 44.1khz for VCD). The video is allowed to be either mpeg1 or mpeg2, but tovid generates mpeg2 video when you use the -dvd-vcd option. Check out this slightly more thorough explanation.

You can use 'idvid' to find out what formats your videos are compliant with; a given video may be VCD or DVD-VCD compliant, but it can't be both, due to the different audio sampling rate.
 
Old 02-07-2005, 10:47 PM   #497
sk545
Member
 
Registered: Aug 2002
Posts: 312

Rep: Reputation: 30
ic. thx.
 
Old 02-08-2005, 07:16 AM   #498
theos
LQ Newbie
 
Registered: Feb 2005
Posts: 13

Rep: Reputation: 0
idvid "hanging"

Lo all,

just downloaded the tovid 0.17, verified that the required components are installed via configure.

First little problem:
mjpegtools are installed on SuSE 9.2 by default, of course missing the problematic parts. The script tells me that I have an incomplete version, BUT it doesnŽt tell me which components exactly are missing...only a little problem. Well as stated in this thread eralier the packages are on packman.links2linux.de. So that one was easy to fix.

So far so good. Then lets try out this marvellous piece of software. And I found the tovid-interactive tool. Easy going then. Answer some questions and go.

In the first run, I unfortunately typed PAL instead of 'pal' and it failed to execute. So redoing the questionaire made the command line correct that is being invoked:

Great! I will now start tovid with the options you chose. Here is the
command that will be executed:
=========================================================
tovid -normalize -svcd -pal -wide "12_things.avi" "12_things"
=========================================================
Starting tovid in 5 seconds...
5 4 3 2 1 Here goes!
--------------------------------
tovid video conversion script
Version 0.17
Written in 2004 by Eric Pierce
http://tovid.sourceforge.net/
--------------------------------
=========================================================
Probing video for information. This may take several minutes...

NOW, I let that run overnight! And its a bit more than a few minutes already. And the probing never stops, I assume.

I have a sed sitting in top:
12857 theos 25 0 31012 22m 2424 R 99.9 2.3 99:19.17 sed

Looking more closely:
theos 12790 12745 0 12:32 pts/0 00:00:00 /bin/bash /usr/bin/tovid-interac
theos 12799 12790 0 12:32 pts/0 00:00:00 /bin/bash /usr/bin/tovid -normal
theos 12814 12799 0 12:32 pts/0 00:00:00 /bin/bash /usr/bin/idvid -terse
theos 12855 12814 0 12:32 pts/0 00:00:00 /bin/bash /usr/bin/idvid -terse
theos 12857 12855 99 12:32 pts/0 01:39:36 sed -e s/\r/\n/g
theos 12858 12855 0 12:32 pts/0 00:00:00 grep ^Pos:
theos 12859 12855 0 12:32 pts/0 00:00:00 tail -n 1
theos 12860 12855 0 12:32 pts/0 00:00:00 sed -r -e s/Pos: *([0-9]+).+/\1/

Well, what do i need to do to make this go away?

Cheers,
/theos
 
Old 02-08-2005, 07:21 AM   #499
theos
LQ Newbie
 
Registered: Feb 2005
Posts: 13

Rep: Reputation: 0
looks like we are hanging here in idvid...

DURATION=$( mencoder -ovc frameno -oac copy -noskiplimit "$1" \
-o /dev/null 2>/dev/null | sed -e "s/\r/\n/g" | grep "^Pos:" | tail -n 1 | \
sed -r -e "s/Pos: *([0-9]+).+/\1/"
)

At least the mencoder part of the command above does work flawlessly when I try it by hand...

No clue what to do next. Any hints?

/theos
 
Old 02-08-2005, 04:42 PM   #500
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
I wonder if your version of mencoder is spitting out something with different formatting than what grep and sed are expecting. My output (from the mencoder part only) is a bunch of initial garbage, then lines like this:

Code:
Pos:   0.0s      1f ( 0%)   0fps Trem:   0min   0mb  A-V:0.000 [0:0]
Pos:   0.1s      2f ( 0%)   0fps Trem:   0min   0mb  A-V:0.003 [0:0]
Pos:   0.1s      3f ( 0%)   0fps Trem:   0min   0mb  A-V:0.007 [0:0]
Pos:   0.1s      4f ( 0%)   0fps Trem:   0min   0mb  A-V:0.010 [0:0]
Pos:   0.2s      5f ( 0%)   0fps Trem:   0min   0mb  A-V:0.013 [0:0]
Pos:   0.2s      6f ( 0%)   0fps Trem:   0min   0mb  A-V:0.017 [0:0]
Pos:   0.2s      7f ( 0%)   0fps Trem:   0min   0mb  A-V:0.020 [0:0]
Pos:   0.3s      8f ( 0%)   0fps Trem:   0min   0mb  A-V:0.023 [0:0]
Pos:   0.3s      9f ( 0%)   0fps Trem:   0min   0mb  A-V:0.027 [0:0]
Pos:   0.3s     10f ( 0%)   0fps Trem:   0min   0mb  A-V:0.030 [0:0]
Pos:   0.4s     11f ( 0%)   0fps Trem:   0min   0mb  A-V:0.033 [0:0]
Pos:   0.4s     12f ( 0%)   0fps Trem:   0min   0mb  A-V:0.037 [0:0]
Pos:   0.4s     13f ( 0%)   0fps Trem:   0min   0mb  A-V:0.040 [0:0]
Pos:   0.5s     14f ( 0%)   0fps Trem:   0min   0mb  A-V:0.043 [0:0]
Pos:   0.5s     15f ( 0%)   0fps Trem:   0min   0mb  A-V:0.047 [0:0]
Pos:   0.5s     16f ( 0%)   0fps Trem:   0min  40mb  A-V:0.050 [0:224]
Let me know what yours looks like. I expect it's dissimilar enough to cause tovid to wait forever for the output (either 'grep' finds no matching lines, or 'sed' somehow ends up with null output).

It should definitely not take overnight In my experience, on average, it takes about one second per minute of video (so, to encode a 2-hour movie, this step should only take around 2 minutes).
 
Old 02-09-2005, 07:33 AM   #501
theos
LQ Newbie
 
Registered: Feb 2005
Posts: 13

Rep: Reputation: 0
Its mplayer 1.0pre6a and its output is:

garbage
Pos: 0.0s 1f ( 0%) 0fps Trem: 0min 0mb A-V:0.000 [0:0]
Pos: 0.1s 2f ( 0%) 0fps Trem: 0min 0mb A-V:0.003 [0:0]
....
Pos: 2554.1s 3f ( 0%) 0fps Trem: 0min 0mb A-V:0.007 [0:0]
garbage


In vi it looks like:
Pos: 0.0s 1f ( 0%) 0fps Trem: 0min 0mb A-V:0.000 [0:0]^MPos: 0.1s 2f ( 0%) 0fps Trem: 0min 0mb A-V:0.003 [0:0]^MPos: 0.1s 3f ( 0%) 0fps Trem: 0min 0mb A-V:0.007 [0:0]

So i assume the first sed run should make nice newlines here, but if I run:
mencoder -ovc frameno -oac copy -noskiplimit file.avi -o /dev/null 2>/dev/null | sed -e "s/\r/\n/g"

Nothing comes out of there. So no use in testing the complete command.

If I leave out the first sed and do the grep directly, of course I get only one line that matches, so I get also the garbage and hence the tail will yiels the "correct line" for -n 1 and the subsequent sed for extracting the number yields "correctly" 0 as it seems we are only interested in the full seconds, and we are dealing with the first line that matches, which is the one starting with Pos: 0.0s

I hope this helps. Maybe we need a more robust method here...

Mybe something like:
# 3. Under UNIX: convert DOS newlines (CR/LF) to Unix format
sed 's/.$//' file # assumes that all lines end with CR/LF
sed 's/^M$// file # in bash/tcsh, press Ctrl-V then Ctrl-M

or

/theos

Last edited by theos; 02-09-2005 at 07:56 AM.
 
Old 02-09-2005, 08:09 AM   #502
theos
LQ Newbie
 
Registered: Feb 2005
Posts: 13

Rep: Reputation: 0
Actually, my connection to home machine broke, so I got to test the following:

replacing the " with ' in the seds and greps, maybe that does the trick
...
 
Old 02-09-2005, 04:32 PM   #503
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
It sounds as though we may have found a bug in sed, grep, or bash, because when I run the mencoder/sed part alone (normal output with newlines instead of carriage-returns), the output stops after about a screenful. The same when I pipe it through grep. But if I direct it to a file, it is all there. The ^Ms in vi are carriage-returns without a newline (the \r part), and we want a newline (without a carriage-return, in UNIX).

At any rate, you're probably right that a more robust method is needed. The problem is those carriage-returns used to keep all the output on the same line; since they are not newlines, if I run "tail -n 1" on the normal output, I end up with one _very_ long line, which makes it much more difficult/time-consuming to find the last "Pos:" value. But maybe somehow sed is locking up in the pipe, just like it is when you run mencoder/sed alone. Maybe awk is the answer. I don't really want to keep writing/reading output from a file, because that's a lot slower than doing it in memory with a pipe. I wonder if a named pipe might work, but there may be some disk access there too.

I think the GUI is near enough to do a preview release. I will probably post it later today. One feature still missing, which I want to have before the actual release, is authoring/burning from the output XML file. The preview release will probably stop at the same place that 'makexml' stops, and will leave it to you to author/burn it. The final release will, at the very least, have the ability to author from the 'makexml' output, so all you'll have to do is use K3B or something to burn the disc image or file structure.

My main concern with burning discs is the recent incompatibilities with cdrecord due to changes in the 2.6 kernel tree; I'm finding that I usually need to burn CDs as root, or else it won't work. I don't want to require users to run tovid as root, and I don't really want the complication of instructing everyone to setuid root on cdrecord (even I don't think I'd want to do that). So there may be some problems with burning; for now, I think I'll have to leave it up to the user to get their disc burned. The most user-friendly approach I can think of is to have the GUI prompt for the root password before running cdrecord (or whatever the equivalent for DVDs is).

I really hope the problems with the new kernel can get ironed out soon. Anyone who is using the 2.6 kernels is likely to be prepared for some hassles (and capable of dealing with them), but I don't want the tovid GUI to become one of those annoying programs that requires the root password to do its job. This should be a user-level program, not an administrator-level program.

I will announce the preview release once it's posted. Everyone download it and try it (I'm sure many of you are very anxious to ) but don't go telling all your friends just yet; let's get those last bugs and difficulties worked out, and then do a proper release. In some ways, I think of this as tovid's debut release (just think of how much more likely you are to download something if it has a GUI and a nice-looking screenshot). I expect the user base to grow considerably, and I expect a slew of new feature requests. I already have many improvements in mind, but I want this release to be the first step: basic video disc encoding/authoring from a straightforward GUI.

I welcome everyone's suggestions for improvement, but with the preview release I just want to know whether everything works and more-or-less makes sense. The most untested part is when the GUI calls upon tovid, makemenu, and makexml. I want to be sure the other scripts don't bomb out with errors that are un-caught by the GUI. This could be because of bad command-line options, output redirection problems, or any bugs that may already exist in the other scripts. It _should_ all work, but that isn't good enough for a finished release. Hence the preview.
 
Old 02-09-2005, 05:25 PM   #504
theos
LQ Newbie
 
Registered: Feb 2005
Posts: 13

Rep: Reputation: 0
Problem is fixed! And also there is a speedup.

I have replaced in idvid:

Code:
DURATION=$( mencoder -ovc frameno -oac copy -noskiplimit "$1" \
-o /dev/null 2>/dev/null | sed -e "s/\r/\n/g" | grep "^Pos:" | tail -n 1 | \
sed -r -e "s/Pos: *([0-9]+).+/\1/"
)
with:

Code:
DURATION=$( mencoder -ovc frameno -oac copy -noskiplimit "$1" \
-o /dev/null 2>/dev/null | tr '\r' '\n' | grep "^Pos:" | tail -n 1 | \
sed -r -e "s/Pos: *([0-9]+).+/\1/"
)
This way its more memory friendly and a lot faster. Before sed had to churn through a single line about 10MB in size, that was passed to grep and so on. We had to handle these 10MB 2 times during the piping.

tr seems to be a more suitable candidate for this operation since it does what we need, a lot better. By using tr we pass the lines one by one through the pipes, being only a few bytes long. Also, the last sed can be replaced by awk, but I am to tired now after fighting with my provider

Now its only the time estimation part missing, because for me its increasing to ridiculous amout of time left and the encoding process stays at 0%

Cheers,
/theos

Last edited by theos; 02-09-2005 at 05:27 PM.
 
Old 02-09-2005, 05:36 PM   #505
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Good work, theos. I will include this in the preview release. Let me know your real name, so I can credit you.

Also, alecm, if you're still watching this thread, let me know your real name so I can credit you for the -parallel and -twopass patch.

You can email it to me at wapcaplet99 at yahoo.com if you want.
 
Old 02-09-2005, 06:02 PM   #506
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Well, why wait?

The preview release is out.
 
Old 02-09-2005, 08:30 PM   #507
sk545
Member
 
Registered: Aug 2002
Posts: 312

Rep: Reputation: 30
OMG, omg, omg. My palms are all sweaty just thinking about it....thanks!!!
 
Old 02-10-2005, 05:39 PM   #508
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
The preview has been up for almost a day, and I have already gotten email from a couple of new users. I can't wait to see the download stats on sourceforge!

I have some good news: I have contacted Karl Wagner from kvcd.net. He says it is fine if I include KVCD support in tovid, as long as I credit them and link to their site. He was also nice enough to hook me up with a free membership on kvcd.net! So, with any luck, KVCD support will be added soon (though probably not in time for the 0.18 final release).

I've had a user request for a debian package of tovid. I haven't looked into packaging at all, but can see the advantages of doing so: if it's possible to get tovid into a .deb package and into an apt repository, users will be able to install it with automatic dependency handling. The same could be said for an .rpm package, or a Gentoo ebuild, or other packaging systems.

Unfortunately, I don't know anything about it, and am not sure I feel like messing with it right now. Do any of you have experience with packaging? If so, would you be willing to help package tovid into the format of your choice?

How's everyone liking the preview release?

I didn't mention it before, but the tovid website has had some more updates. The documentation now lists some future plans for the GUI and for the suite as a whole.
 
Old 02-10-2005, 10:16 PM   #509
sk545
Member
 
Registered: Aug 2002
Posts: 312

Rep: Reputation: 30
Quote:
Unfortunately, I don't know anything about it, and am not sure I feel like messing with it right now. Do any of you have experience with packaging? If so, would you be willing to help package tovid into the format of your choice? How's everyone liking the preview release?
Well, afaik, the debian packaging is sort of a nightmare. Check out this thread:

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

It just seems to me that a separate person is required to just make and maintain the package since they have made it so difficult. However, i might be wrong, since i have never done it myself and that thread is sorta old. Maybe new things have come out since?

Here are more articles on google that explain in simpler terms:

http://www.google.com/search?hl=en&q...=Google+Search

If you need need a debian system, i will gladly help out. Plus, knoppix is also debian based, so that might be all you need.

Oh, i like the new release very much. However, i have been jotting down things that i run into that don't quite work as expected and/or need some UI improvement. Now, if i could get a day off from work, i 'll post as soon as i can. Sadly, i am going to miss 'tovid-interactive' since the gui is going to kill it. Oh well.

Last edited by sk545; 02-10-2005 at 10:20 PM.
 
Old 02-11-2005, 02:30 AM   #510
theos
LQ Newbie
 
Registered: Feb 2005
Posts: 13

Rep: Reputation: 0
*To keep in mind when packaging for debian:

However is making the package, please make sure that the dependencies to mjpegtools can really be resolved, since the mpeg2 stuff might be somewhat difficult to get resolved due to licensing issues.

SuSE chose to include a mjpegtools into their distro, that doesn't contain the problemantic parts, so you have to download them at packman. I am not sure how the debianers handle this one.

*Then for an RPM:
the best place to go for SuSE is packman, once there, it is ready for apt4rpm. I will see what I can do. Give me a few days to follow up on this.

*About the 0.18a:
The ETA stuff seems to work now. That is good!

*Some things about the doku:
If you follow the documentation, you might end up in generating NTSC menues and PAL movie. That is not really what the user wants. The menumaking part need refreshing.

*Additional feature:
Might come in handy to check for the dvd+rw-tools and include a simple burning step using growisofs from the dvd+rw-tools.

Also, it might be handy to document this, because if the user uses growisofs as documented he will end up with a dvd that is not really working, as the AUDIO_TS and VIDEO_TS come in lower case letters on the dvd, that in turn renders the burned dvd useless.

IŽll see what I can do about this.

/theos
 
  


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 08:55 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