Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto author AVI->DVD with menus using Linux only !
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5 ... 29, 30, 31  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
shiznix
Guru
Guru


Joined: 29 Jun 2003
Posts: 367
Location: Adelaide, Australia

PostPosted: Mon Jan 19, 2004 11:31 pm    Post subject: Reply with quote

viperlin wrote:
ok is there any special "speed up" option? i just ask because whenever i encode a video file (the same file actually) it goes at different speeds, same command. like at this very moment i was going to encode a film and watch it, but it's going at 17fps.

last time i did this it was going at 43fps

it just seems completely random to me. same things running and everything, same conditions.


You could try giving the transcode process a higher priority using the 'nice' command.
eg. nice -20 transcode -i ....etc.
This will give transcode the highest possible priority.

Another alternative if you have another networked PC, is to distribute the encoding to it using transcode's pvm module.
Check out /usr/share/doc/transcode/export_pvm.txt for more info.
I haven't played with this yet.

You'll need to emerge pvm & configure it on both boxes, then re-emerge transcode.
The re-compile should auto-detect pvm on your system & so compile in it's own pvm support.

Would be nice if the transcode ebuild included a +pvm USE flag, so that if it's chosen it auto-emerges pvm as a dependency to it.
Back to top
View user's profile Send private message
matspi
n00b
n00b


Joined: 20 Jan 2004
Posts: 6

PostPosted: Tue Jan 20, 2004 9:15 am    Post subject: Reply with quote

Hi,

great HOWTO.

It is always good to add
Code:
-x mplayer,mplayer


to your transcode commandline. This will use mplayer to read the input file. So videos with errors can still be encoded.
Further the additional step with mencoder is no longer necessary.

You should be able to encode *.bin files etc. directly


matspi
Back to top
View user's profile Send private message
shiznix
Guru
Guru


Joined: 29 Jun 2003
Posts: 367
Location: Adelaide, Australia

PostPosted: Wed Jan 21, 2004 12:39 am    Post subject: HOWTO updated Reply with quote

OK, the Howto has been significantly updated.

Specifically the transcode lines.
Scratch my previous post on using the external mpeg2enc,mp2enc to encode on getting rid of the coloured streaks that some are experiencing.
Encoding with mpeg2enc,mp2enc works but the resultant burnt DVD plays in black & white (on my DVD player anyway).
Seems the problem is in the resize option (d,1) for certain files, use -Z (zoom) instead to get the required resolution for PAL or NTSC & all should be well.
Kabutor mentioned using -Z as a workaround, but at the time I was wrongly convinced by others that it was one & the same thing.

Whew, I think this update should iron out a lot of problems that users have been experiencing (me included).

Thanx,
Shiznix


Last edited by shiznix on Wed Jan 21, 2004 10:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
shiznix
Guru
Guru


Joined: 29 Jun 2003
Posts: 367
Location: Adelaide, Australia

PostPosted: Wed Jan 21, 2004 1:09 am    Post subject: Reply with quote

matspi wrote:
Hi,

great HOWTO.

It is always good to add
Code:
-x mplayer,mplayer


to your transcode commandline. This will use mplayer to read the input file. So videos with errors can still be encoded.
Further the additional step with mencoder is no longer necessary.

You should be able to encode *.bin files etc. directly


matspi


This is extremely handy, and something I've looked long & hard into.
I stuck with using mencoder in the end for non-standard formats as using '-x mplayer,mplayer' resulted in video that was completely foobarred (a mish mash of flashing colours).
It does work very well with .avi's/.mpg's (though slightly slower), but for some .wmv's & .mov's especially, it fails miserably.

As an aside, transcode has a '-x/-y mov', but uses libquicktime, so no Sorenson support.

I've tried very hard to be able to remove mencoder from the encoding process to keep things as simple as possible, but in some instances it's a necessity.

However, it's a good option for those files transcode flat out refuses to encode.
Noted & updated.

Thanks :)


Last edited by shiznix on Thu Jan 22, 2004 1:43 am; edited 1 time in total
Back to top
View user's profile Send private message
darksaidin
Apprentice
Apprentice


Joined: 04 Oct 2003
Posts: 150

PostPosted: Wed Jan 21, 2004 10:57 am    Post subject: Reply with quote

Great guide - thank you!

I had one little problem with emerging mjpegtools. The quicktime dependency gave me some strange "unresolved externals nv_ ..." errors. Switching to from nvidia-opengl to xfree, emerging the package and switching back did the trick. Just in case someone else comes across the same problem.
Back to top
View user's profile Send private message
shiznix
Guru
Guru


Joined: 29 Jun 2003
Posts: 367
Location: Adelaide, Australia

PostPosted: Wed Jan 21, 2004 10:28 pm    Post subject: Reply with quote

kabutor wrote:
Nice read!

A question, how can I add a sub or srt file as subtitles to the DVD?

:idea:


Update !
Apparently spumux can do it.
I haven't tested this, but I'm assured it now supports this, even though it's not present in the man page for version 0.6.8 as it's still new (thanks Sjef).

--snip--
Spumux is also able to handle [>=0.6.8] text subtitles, which will be rendered to graphics by spumux. A lot of different text (must be non-graphic) formats are supported (.sub, .srt, .ssa, .smi, .rt , .txt, .aqt, .jss, .js, .ass).Spumux will try to determine the format automatically. If processing textbased subtitles no other streams can be defined, buttons or others need to be processed in another pass with spumux, using anotherxml file. Following .xml file shows the available tags and their default settings. Only the textsub tag is mandatory, defaults are used if the specific tagis not specified.

<subpictures>
<stream>
<textsub filename="demo1.srt" characterset="ISO8859-1"
fontsize="28.0" font="arial.ttf" horizontal-alignment="left"
vertical-alignment="bottom" left-margin="60" right-margin="60"
top-margin="20" bottom-margin="30" subtitle-fps="25"
movie-fps="25" movie-width="720" movie-height="574" />
</stream>
</subpictures>

The textsub tag defines the settings for the text to graphics rendering.

The filename attribute defines the path and name of the input text subtitlefile, this is the only attribute that is mandatory.

The horizontal-alignment attribute defines the horizontal alignment of thesubtitles. Options are: "left", "right", "center" and "default".The "default" value causes spumux to use the attribute that is in the textsubtitle file if the format supports such an attribute.

The vertical-alignment attribute defines the vertical alignment.Options are: "top", "center" and "bottom".

The margin attributes define the minimum blank pixel space between theborder of the image and the border of the subtitle lines.

Defining the subtitle-fps and movie-fps attributes make it possible forspumux to recalculate the subtitle timing if these are not the same.

The movie-width and movie-height attributes define the maximum size ofthe subtitle page, these shouldn't be larger than the fram-size of themovie frame, normally they are the same. Some DVD-players more likesubtitle frames that are 2 or 4 pixels smaller in height.

--snip--

Hope it helps
Back to top
View user's profile Send private message
kabutor
l33t
l33t


Joined: 12 Dec 2002
Posts: 821
Location: Benalmadena - Melrose Place

PostPosted: Thu Jan 22, 2004 1:14 am    Post subject: Reply with quote

no luck here :(

Quote:

DVDAuthor::spumux, version 0.6.8. Build options: gnugetopt magick
Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Detected subtitle file format: subviewer
INFO: Opened iconv descriptor. *UTF-8* *ISO8859-15*
INFO: Read 547 subtitles
ERR: New_Face failed. Maybe the font path is wrong.
Please supply the text font file (arial.ttf).
WARN: subtitle font: load_sub_face failed.
Violación de segmento (core dumped)


I tried emerging corefonts, and freefonts, restarting X, reemerged imagemagicck, but nothing, (also tried adding /usr/share/fonts/corefonts/arial.ttf and nothing.)
Back to top
View user's profile Send private message
shiznix
Guru
Guru


Joined: 29 Jun 2003
Posts: 367
Location: Adelaide, Australia

PostPosted: Thu Jan 22, 2004 1:52 am    Post subject: Reply with quote

kabutor wrote:
no luck here :(

Quote:

DVDAuthor::spumux, version 0.6.8. Build options: gnugetopt magick
Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Detected subtitle file format: subviewer
INFO: Opened iconv descriptor. *UTF-8* *ISO8859-15*
INFO: Read 547 subtitles
ERR: New_Face failed. Maybe the font path is wrong.
Please supply the text font file (arial.ttf).
WARN: subtitle font: load_sub_face failed.
Violación de segmento (core dumped)


I tried emerging corefonts, and freefonts, restarting X, reemerged imagemagicck, but nothing, (also tried adding /usr/share/fonts/corefonts/arial.ttf and nothing.)


Have you tried substituting the 'font="arial.ttf"' with some other truetype font located in /usr/X11R6/lib/X11/fonts/truetype/ ?

Or tried 'font="/full/directory/path/to/arial.ttf" ?
Is this what you meant by 'adding /usr/share/fonts/corefonts/arial.ttf and nothing' ??

Just some thoughts.

Apart from this error, it looks like it's almost there.
Back to top
View user's profile Send private message
kabutor
l33t
l33t


Joined: 12 Dec 2002
Posts: 821
Location: Benalmadena - Melrose Place

PostPosted: Thu Jan 22, 2004 8:57 pm    Post subject: Reply with quote

Yeah I tried that..

my subs.xml file:

Quote:
<subpictures>
<stream>
<textsub filename="sttn601.srt" characterset="ISO8859-1"
fontsize="28.0" font="/usr/X11R6/lib/X11/fonts/truetype/verdana.ttf" horizontal-alignment="left"
vertical-alignment="bottom" left-margin="60" right-margin="60"
top-margin="20" bottom-margin="30" subtitle-fps="25"
movie-fps="25" movie-width="720" movie-height="574" />
</stream>
</subpictures>


Quote:

# spumux subs.xml
DVDAuthor::spumux, version 0.6.8. Build options: gnugetopt magick
Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Detected subtitle file format: subviewer
INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*
INFO: Read 571 subtitles
ERR: New_Face failed. Maybe the font path is wrong.
Please supply the text font file (/usr/X11R6/lib/X11/fonts/truetype/verdana.ttf).
WARN: subtitle font: load_sub_face failed.
Violación de segmento
Back to top
View user's profile Send private message
shiznix
Guru
Guru


Joined: 29 Jun 2003
Posts: 367
Location: Adelaide, Australia

PostPosted: Fri Jan 23, 2004 8:37 am    Post subject: Reply with quote

kabutor wrote:
<subpictures>
<stream>
<textsub filename="sttn601.srt" characterset="ISO8859-1"
fontsize="28.0" font="/usr/X11R6/lib/X11/fonts/truetype/verdana.ttf" horizontal-alignment="left"
vertical-alignment="bottom" left-margin="60" right-margin="60"
top-margin="20" bottom-margin="30" subtitle-fps="25"
movie-fps="25" movie-width="720" movie-height="574" />
</stream>
</subpictures>


Looking on the dvdauthor-users mailing list, it seems that spumux will only look for fonts in ~/.spumux/
You mighty try copying the relevant .ttf font file to there & change the font line in spumux.xml to read:
fontsize="28.0" font="verdana.ttf"
Back to top
View user's profile Send private message
kabutor
l33t
l33t


Joined: 12 Dec 2002
Posts: 821
Location: Benalmadena - Melrose Place

PostPosted: Fri Jan 23, 2004 2:42 pm    Post subject: Reply with quote

Now it's working.. :)

Yes, copy the sub ttf file to .spumux does the trick.

But, just in case someone test it, in Xine I couldnt see the subtitles, but, in my DVD player it works.

Xine shows in the subtitle option two ?? and while playing it a normal DVD it shows the region code (es uk etc..)

So i suppose the solution is adding that ES or UK or something in the xml file somewhere.

Another thing would be how to add two subtitles.. maybe adding another stream tag in the xml? or making the same process for two subtitles?
Back to top
View user's profile Send private message
pzasso
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2003
Posts: 94
Location: California

PostPosted: Sat Jan 24, 2004 7:17 am    Post subject: Reply with quote

Hi pzasso,

I too got the same problems that you experienced with transcode, I ran an emerge -vp transcode and noticed it wasn't using mmx or sse. After adding mmx and sse to my use flags (I was sure I did this when I first configured my system?), transcode runs fine.

I hope this helps

Jammib

------------------------------------------------------------------------------------

Jammib,

I added mmx and sse to my USE flags as you mentioned above and recompiled transcode. It appears to be working fine so far.

Thanks for your response.

--pzasso
Back to top
View user's profile Send private message
perbert
n00b
n00b


Joined: 18 Feb 2003
Posts: 10
Location: PDX

PostPosted: Mon Jan 26, 2004 10:31 pm    Post subject: Reply with quote

Anterion wrote:
Next plan is to create animated thumbnails for chapters. Once I get to it, I'll make sure to post the HOWTO here.


has this been done yet? if not, here's a hint (a script i wrote to do this for a DVD i made of ESB):

Code:
#!/bin/sh

# note: make menu1.ppm for background (720x480)
# mplayer -nosound -vo jpeg -jpeg outdir=./c1/ -frames 600 -ss 122 ../../../empire_strikes_back_p1a.avi
# mplayer -nosound -vo jpeg -jpeg outdir=./c2/ -frames 600 -ss 1490 ../../../empire_strikes_back_p1a.avi
# mplayer -nosound -vo jpeg -jpeg outdir=./c3/ -frames 600 -ss 2120 ../../../empire_strikes_back_p1a.avi
# mplayer -nosound -vo jpeg -jpeg outdir=./c4/ -frames 600 -ss 8 ../../../empire_strikes_back_p2a.avi
# mplayer -nosound -vo jpeg -jpeg outdir=./c5/ -frames 600 -ss 23:34 ../../../empire_strikes_back_p2a.avi
# mplayer -nosound -vo jpeg -jpeg outdir=./c6/ -frames 600 -ss 34:24 ../../../empire_strikes_back_p2a.avi
# mplayer -nosound -vo jpeg -jpeg outdir=./c7/ -frames 600 -ss 44:27 ../../../empire_strikes_back_p2a.avi
# mplayer -nosound -vo jpeg -jpeg outdir=./c8/ -frames 600 -ss 58:12 ../../../empire_strikes_back_p2a.avi
# mplayer -nosound -vo jpeg -jpeg outdir=./c9/ -frames 600 -ss 73:19 ../../../empire_strikes_back_p2a.avi
# rm c?/0000001.jpg
# for i in `ls c1/000* | sed s/"c1\/"// | sed s/.jpg//`; do ./makemenu $i; done
# cat m00000???.ppm | ppmtoy4m -F 30000:1001 -n 299 |mpeg2enc -n n -f 8 -a 2 -q 2 -o menu1.m1v
# mplex, spumux and all that

# makemenu script:
for i in 1 2 3 4 5 6 7 8 9; do
jpegtopnm c$i/$1.jpg | pnmscale -width 120 > c$i/$1.ppm;
done

pnmcomp -align=left -valign=top -xoff=111 -yoff=24 \
               c1/$1.ppm menu1.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=255 -yoff=42 \
               c2/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=381 -yoff=30 \
               c3/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=534 -yoff=57 \
               c4/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=63 -yoff=141 \
               c5/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=315 -yoff=171 \
               c6/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=478 -yoff=168 \
               c7/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=300 -yoff=264 \
               c8/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=471 -yoff=267 \
               c9/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

rm -v c?/$1.ppm

#done


Basically, what i did was transform about 599 frames from the video into jpegs (the first one out of mencoder was always the very first frame of the video file and not related to the proximity of the other frames, so i threw it out) and then shrink them, convert to pnm, and overlay them onto a common background image (you have to select the X and Y coordinates of the buttons here). the resulting images are then essentially a 'flip book' that you just have to feed into mpeg2enc via ppmtoy4m (note that i am using NTSC stuff, choose your own options to suit yourself best). voila! now you have a short movie (about 20 seconds worth in this case, given a frame rate of 29.97) that you can spumux some transparent PNGs onto and make into a nice menu with animated buttons (make sure to not throw out one of the frames that you created so that you can overlay the subtitles with gimp or whatever you are inclined to use).

I'm sure there's an easier way to script this, but i'm a scientist not a programmer...also, programs such as lavtoyuv and y4mtoppm from mjpegtools might make things a bit easier to convert into the initial images, as opposed to using mencoder. anyways, this is mostly just a starting point and i'm sure that it can be easily improved upon... :D
Back to top
View user's profile Send private message
Banko
n00b
n00b


Joined: 17 Jan 2004
Posts: 7

PostPosted: Tue Jan 27, 2004 3:54 am    Post subject: Reply with quote

Is there a way to actually get better quality from transcode, so it is exactly say 4.3 gigs? Because when it's get's done my file is around 2 gigs, and the quality isn't that great compared to the original avi. You can see a lot of blockiness on the tv.
Back to top
View user's profile Send private message
Negated Void
l33t
l33t


Joined: 25 Dec 2002
Posts: 672

PostPosted: Tue Jan 27, 2004 9:47 pm    Post subject: Reply with quote

How large should the dvd menu background m2v file be? Mine's hit fifty megs now, and is taking it's time to encode.

--Murph
Back to top
View user's profile Send private message
Pink
Veteran
Veteran


Joined: 24 Jul 2003
Posts: 1062

PostPosted: Tue Jan 27, 2004 9:59 pm    Post subject: Reply with quote

@ Negative Void

See this link:

clicky click

Upgrade the prog and it solves the problem. I was stuck on this for hours!
Back to top
View user's profile Send private message
Negated Void
l33t
l33t


Joined: 25 Dec 2002
Posts: 672

PostPosted: Tue Jan 27, 2004 10:01 pm    Post subject: Reply with quote

oh wow, fast responce.. you're a savior.. *removes now 200 meg file*
Back to top
View user's profile Send private message
Negated Void
l33t
l33t


Joined: 25 Dec 2002
Posts: 672

PostPosted: Tue Jan 27, 2004 10:15 pm    Post subject: Reply with quote

I'm a little confused, don't i have to tell dvdauthor where the buttons are, or anything? Like, within the menu, i could put them wherever i wanted, correct? How does it know which parts are buttons?

Edit, spoke too soon.
Looks like spumux can do that for me.

I've got four buttons, arranged into a square..

1 2
3 4

kinda thing. Will that work? Is that numbering in the right order?

-Murph
Back to top
View user's profile Send private message
perbert
n00b
n00b


Joined: 18 Feb 2003
Posts: 10
Location: PDX

PostPosted: Tue Jan 27, 2004 10:41 pm    Post subject: Reply with quote

Negated Void wrote:
I've got four buttons, arranged into a square..

1 2
3 4

kinda thing. Will that work? Is that numbering in the right order?

-Murph


that's the correct order if you specify the spumux XML file to count by rows. you can also specify columns, which would make it:

1 3
2 4

-b
Back to top
View user's profile Send private message
Negated Void
l33t
l33t


Joined: 25 Dec 2002
Posts: 672

PostPosted: Wed Jan 28, 2004 2:19 am    Post subject: Reply with quote

Solved, read end of post

Sorry to be a pain ;-)

My newly created .mpg's are out-of-sync.

I just tried the -D 0 part, with no additional luck, any ideas?

transcode -i fma01.avi -V -y mpeg -F d,1 -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o fma01 -D 0 -x mplayer,mplayer

Thanks,
-Murph

Edit
The audio seems to be going somewhat darasticly slower than the video, or the video is decently sped up.

Edit2
Compared with the origional, the video is sped up, the audio is perfect timed.

Edit3
Ah-ha! --pulldown added to command, no problems now!
Back to top
View user's profile Send private message
Negated Void
l33t
l33t


Joined: 25 Dec 2002
Posts: 672

PostPosted: Wed Jan 28, 2004 10:35 am    Post subject: Reply with quote

Woo-hoo, a dvd has been created.

I've got two problems with it though. The video quality is bad (cmon.. the iso is 1.6 gig, can't i crank up the transcode quality somehow?), and the subtitles (hardcoded) seem to flicker lighter/dimmer (not a feature of the source).

Soo... any clue how to a) get better quality video, and b) remove that flickering effect? (might be caused by my needed use of pulldown..)

Thanks!
-Murph
Back to top
View user's profile Send private message
Anterion
n00b
n00b


Joined: 25 Dec 2003
Posts: 13
Location: Germany

PostPosted: Wed Jan 28, 2004 12:19 pm    Post subject: Reply with quote

Negated Void wrote:
Woo-hoo, a dvd has been created.

I've got two problems with it though. The video quality is bad (cmon.. the iso is 1.6 gig, can't i crank up the transcode quality somehow?), and the subtitles (hardcoded) seem to flicker lighter/dimmer (not a feature of the source).
-Murph


What commandline for transcode did you use? One with -y mpeg or with -y mpeg2enc?
Back to top
View user's profile Send private message
malloc
l33t
l33t


Joined: 19 Sep 2003
Posts: 762

PostPosted: Wed Jan 28, 2004 4:41 pm    Post subject: Reply with quote

I know this brokes a little of the post spirit however i've found a program that can take care of the multiple subtitles files problem.
It is for window$ :( however it works fine under wine.
The program is this.
This is a little program that correctly merges several subs files into a single one wich can then be used according to the instructions here.
I'm sorry this escapes the "linux only" idea of the thread but i thought it's a nice tool to surpass a little problem.
Back to top
View user's profile Send private message
Negated Void
l33t
l33t


Joined: 25 Dec 2002
Posts: 672

PostPosted: Thu Jan 29, 2004 12:13 am    Post subject: Reply with quote

I was using:

sudo transcode -i fma01.avi -V -y mpeg -F d,1 -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o fma01 -x mplayer,mplayer --pulldown

and now i just tried with -y mpeg2enc with no really visible difference, the subtitles still seem to flicker, and the quality isn't terribly great
-Murph
Back to top
View user's profile Send private message
Anterion
n00b
n00b


Joined: 25 Dec 2003
Posts: 13
Location: Germany

PostPosted: Thu Jan 29, 2004 12:25 am    Post subject: Reply with quote

Negated Void wrote:
the -y mpeg one, should the mpeg2enc one provide better results?

Absolutely. If you don't mind to wait for a longer encoding time, I can recommend that you replace mpeg with mpeg2enc and use the following settings:

-w 9000 -F 8,"-4 1 -2 1 -r 24"

You'll need to have the mjpegtools installed for this. There are some more options to tweak quality but this should look ok.

And there's mp2enc for audio, btw (-y mpeg2enc,mp2enc )

See ya,

Anterion
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5 ... 29, 30, 31  Next
Page 4 of 31

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum