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, ... 29, 30, 31  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Thu Dec 25, 2003 2:47 pm    Post subject: Reply with quote

sounds like a great idea
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Thu Dec 25, 2003 11:41 pm    Post subject: Re: Animated menus Reply with quote

Anterion wrote:
Hi folks...

I'm currently experimenting with transcode, gimp and imagemagick to see if I can get the DVD menus to have an animated background using the following idea...

    Choose video to use as background
    Use Transcode to convert it into a series of enumerated JPGs.
    Use Gimp to create the menu with a transparent background and saving it as PNG with alpha channel.
    Using Imagemagick to "merge" the JPGs and the PNG as a batch job.
    Using transcode (or mjpegtools) to create the m2v for the menu.

A grand plan. I can't see any reason why this shouldn't work :D

One gotcha is that you may still have to use spumux to merge the transparent button mask images as subtitles to the main menu or at least define the button regions.
http://dvdauthor.sourceforge.net/doc/spumux.html

I for one would be most interested in seeing how you go.
Keep in touch. :)
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1398
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Fri Dec 26, 2003 3:13 am    Post subject: Reply with quote

shiznix wrote:
I can't see dvdauthor-0.6.8 in portage yet, even after syncing with a few US mirrors to be sure.
Bonez, can you 'emerge sync' & confirm that it resides in /usr/portage/media-video/dvdauthor/ and comment out PORTDIR_OVERLAY in /etc/make.conf & see if it still emerges 0.6.8 ?

I may be unluckily syncing with not yet up to date mirrors.

Thanx :)


DOH!!!!!! I hadn't been careful enough to note that the version was NOT up to date. It was my misunderstanding that dvdauthor was not available in portage as a package at all, so when I saw that it was available I failed to check the versions. Many many many appologies to all, 0.6.8 is not yet available to my knowledge. Again, sorry for the confusion.

Regards,
BonezTheVeryEmbarassedGoon
Back to top
View user's profile Send private message
Anterion
n00b
n00b


Joined: 25 Dec 2003
Posts: 13
Location: Germany

PostPosted: Sat Dec 27, 2003 12:07 pm    Post subject: Animated menus Reply with quote

It's done :D :D

And works pretty well... here's how I did it (If anyone would like to see the XCF file I used, just send me an e-mail.)

The following tools are useful:


    avidemux2
    transcode
    composite (from ImageMagick)
    mpeg2enc (from mjpegtools)
    sox
    toolame
    ffmpeg


First of all, I used avidemux2 to find the video that should be played in the background. For my menu, I chose the ending credits of an episode that I was to put on the DVD. This way I got background music right along with it. Avidemux2 shows the current frame position. Write down the start frame and end frame of the video part you want to use. Now we are going to extract that part as a series of jpg pictures using the great transcode tool. (I'll be using NTSC for this example. Switch to 720x576 and 25 fps for PAL )

Code:
 transcode -i <your video file> -V -J fps --export_fsr 29.970 --export_asr 2 --keep_asr -Z 720x480 -y jpg,wav -m music.wav -o pics/background -c <startframe>-<endframe>


The generated jpegs will be written to the (hopefully existing :-) directory "pics" given the name "backgroundXXXXXX.jpg" (XXXXXX sequential numbers). Additionally -Z 720x480 --export_asr 2 --keep_asr will scale the video to 4:3 full screen video (adding black borders on top an bottom if necessary). -m music.wav extracts the audio to an uncompressed PCM wave file.

Now that we have the background video split up in images, we can prepare the menu. Load one of the jpgs into the Gimp and keep it as background layer. Now draw your menu in a transparent layer on top of it. Once this is done, hide the background layer and export the picture (should have a transparent background now) as PNG file (e.g. menu.png).

The next step will overlay the images of the background video with the menu PNG using the "composite" tool from ImageMagick.

Code:

for i in pics/*.jpg; do composite menu.png $i $i.png; done


This little shell scripts will take the jpgs from the pics directory and overlay the menu.png over the background images and write them to new files called "backgroundXXXXXX.jpg.png" (PNG because I didn't want yet another lossy compression.) You can check the PNGs with you favorite image viewer if everything went well.

Next step is to create the m2v video for the menu using png2yuv and mjpegtools' mpeg2enc.

Code:

png2yuv -f 29.970 -j pics/background%06d.jpg.png -I p | mpeg2enc -f 8 -I 0 -4 1 -2 1 -H -o menu.m2v


Now we got the menu's video. Check with mplayer or xine if looks ok.

Next goes the audio. DVD menus require 48khz audio, so first we check the samplerate of the audio.

Code:

   file music.wav


If it's 48000 Hz, then everything's well otherwise we'll use sox to resample.

Code:

   sox -t wav music.wav -t wav -r 48000 music2.wav


Now we need to compress the audio. One word of advice, some players don't like it if the DVD has MP2 and AC3. So check what kind of compression the videos have you want to put on it. If it's MP2 then

Code:

   toolame -s 48 -b 192 music.wav music.mp2


For AC3

Code:

   ffmpeg -i music.wav -ar 48000 -ab 192 music.ac3


Mplexing...

Code:

   mplex -f 8 -V -o menu.mpg menu.m2v music.ac3


That's it for the animated menu. Everthing from here follows the tutorial from the beginning of this thread.

Any questions?


Last edited by Anterion on Mon Dec 29, 2003 10:06 pm; edited 2 times 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: Sun Dec 28, 2003 3:29 am    Post subject: Re: Animated menus Reply with quote

!!! FANTASTIC !!!

This works like a charm.
Great work, you've really taken it to the next level :D

A huge thank you for this post, it adds a whole new perspective on creating menus now.

3 cheers for Anterion :)
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1398
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Sun Dec 28, 2003 3:34 am    Post subject: Reply with quote

Anterion gets my vote for the very best second post to these forums ever!!!

Good work.

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
Anterion
n00b
n00b


Joined: 25 Dec 2003
Posts: 13
Location: Germany

PostPosted: Sun Dec 28, 2003 8:19 pm    Post subject: Reply with quote

*blushes* Thanks, thanks :D Glad to finally be able to contribute to the board that has helped me so many times now.

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

See ya,

Anterion
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Sun Dec 28, 2003 9:03 pm    Post subject: Reply with quote

following this guide to use PAL it never works.

i tried on NTSC VOB's to convert to PAL, the sound was out of sync.

when trying DivX films the picture is diagonally red (hard to explain)
Back to top
View user's profile Send private message
Anterion
n00b
n00b


Joined: 25 Dec 2003
Posts: 13
Location: Germany

PostPosted: Sun Dec 28, 2003 9:22 pm    Post subject: Reply with quote

viperlin wrote:
following this guide to use PAL it never works.
i tried on NTSC VOB's to convert to PAL, the sound was out of sync.
when trying DivX films the picture is diagonally red (hard to explain)

Hmm... have you replaced 29.970 with 25 everywhere?
Can't imagine what you mean with "diagonally" red, sorry. Where does that happen? Are the jpgs that way already or is it only the m2v?
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Sun Dec 28, 2003 10:38 pm    Post subject: Reply with quote

Anterion wrote:
viperlin wrote:
following this guide to use PAL it never works.
i tried on NTSC VOB's to convert to PAL, the sound was out of sync.
when trying DivX films the picture is diagonally red (hard to explain)

Hmm... have you replaced 29.970 with 25 everywhere?
Can't imagine what you mean with "diagonally" red, sorry. Where does that happen? Are the jpgs that way already or is it only the m2v?


what jpegs? i'm on about transcode video conversion
Back to top
View user's profile Send private message
Anterion
n00b
n00b


Joined: 25 Dec 2003
Posts: 13
Location: Germany

PostPosted: Mon Dec 29, 2003 1:47 am    Post subject: Reply with quote

viperlin wrote:

what jpegs? i'm on about transcode video conversion

Thought you were refering to the animated menu section.
Can you give the transcode commandline you were using and what you are trying to do?
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Mon Dec 29, 2003 1:49 am    Post subject: Reply with quote

i have an american import of Finding Nemo :-) NTSC

i used the VOB files inplace of Matrix.mpg using the exact PAL examples in the original post. when i played them back the sound was delayed by about 5 seconds :-\
i'm just about to go to sleep but i'll be playing with this again in the morning :-)
Back to top
View user's profile Send private message
Anterion
n00b
n00b


Joined: 25 Dec 2003
Posts: 13
Location: Germany

PostPosted: Mon Dec 29, 2003 8:36 am    Post subject: Reply with quote

Ah, I see now. Instead of this line:
Code:
transcode -i <your.vob> -V -y mpeg -F d,4 -E 48000 -b 224 -o matrix

Try this one:
Code:

transcode -i <your.vob> -V -E 48000 -b 224 -w 7500 -J fps --export_fps 25 -Z 720x576 -y mpeg2enc,mp2enc -F 8 -o <your.mpg>

You'll need mjpegtools installed for this.

See ya,

Anterion
Back to top
View user's profile Send private message
ajayrockrock
n00b
n00b


Joined: 09 Jan 2003
Posts: 20

PostPosted: Mon Dec 29, 2003 8:57 am    Post subject: weird colors... Reply with quote

I had that same problem with the colors. I think the problem might be related to burning animation since I was trying to burn a dvd of South Park. btw, all my stuff is NTSC so I cut 'n' pasted most of the command lines from this tutorial. Also, after the transcode step the video was still okay. It was jacked up after the mplex step where I merged in the separate audio and video files.

I thought it was something to do with my setup, but when I tried it on a normal video file (an episode of Seinfeld) it worked fine. So try a regular file and see if you still get the weird colors?

oh, for the rest of you, the weird colors is like streaks of red that cross the screen. I'll try to get a screenshot or something and post a link.

later,
ajay
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Mon Dec 29, 2003 8:59 am    Post subject: Reply with quote

mine was a DivX Film of Operation Takedown. not anime
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: Mon Dec 29, 2003 9:44 am    Post subject: Reply with quote

I followed the steps in the beggining of this thread and everything ran clean until I got to the transcode step. The revdep-rebuild worked fine and I ran it a second time to verify everything was clean. It reported everthing ok on second run.

Here is what I am getting.

nighthawk sdc # transcode -i matrix.mpg -V -y mpeg -F d,4 -E 48000 -b 224 -o matrix
transcode v0.6.11 (C) 2001-2003 Thomas Oestreich, 2003 T. Bitterberg
[transcode] (probe) suggested AV correction -D 872 (34880 ms) | AV 34906 ms | 26 ms
[transcode] auto-probing source matrix.mpg (ok)
[transcode] V: import format | MPEG (V=mpeg2|A=mp3)
[transcode] V: AV demux/sync | (0) sync AV at PTS start - demuxer disabled
[transcode] V: import frame | 352x288 1.22:1 encoded @ 16:9
[transcode] V: bits/pixel | 0.710
[transcode] V: decoding fps,frc | 25.000,3
[transcode] V: Y'CbCr | YV12/I420
[transcode] A: import format | 0x50 MPEG layer-2 [48000,16,2] 192 kbps
[transcode] A: export format | 0x50 MPEG layer-2 [48000,16,2] 224 kbps
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame | 7680 (7680.000000)
[transcode] A: adjustment | 0@1000
[transcode] A: AV shift | 34906 ms [ 872 (A) | 26 ms ]
[transcode] V: IA32 accel mode | 3dnow (3dnow mmxext mmx asm)
[transcode] V: video buffer | 10 @ 352x288
[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG
[import_mpeg2.so] v0.4.0 (2003-10-02) (video) MPEG2
[transcode] warning : /usr/lib/transcode/export_mpeg.so: undefined symbol: pred_comp_mmx
[transcode] warning : (dl_loader.c) loading "/usr/lib/transcode/export_mpeg.so" failed
[transcode] warning : (encoder.c) loading audio export module failed
[transcode] warning : failed to init export modules
[transcode] critical: plug-in initialization failed

Any ideas?


Thank You
Back to top
View user's profile Send private message
ajayrockrock
n00b
n00b


Joined: 09 Jan 2003
Posts: 20

PostPosted: Mon Dec 29, 2003 10:42 am    Post subject: Reply with quote

pzasso wrote:
---snip---
[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG
[import_mpeg2.so] v0.4.0 (2003-10-02) (video) MPEG2
[transcode] warning : /usr/lib/transcode/export_mpeg.so: undefined symbol: pred_comp_mmx
[transcode] warning : (dl_loader.c) loading "/usr/lib/transcode/export_mpeg.so" failed
[transcode] warning : (encoder.c) loading audio export module failed
[transcode] warning : failed to init export modules
[transcode] critical: plug-in initialization failed


What do your use flags look like when you're building transcode:

Code:
# emerge -pv transcode

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] media-video/transcode-0.6.11  +sdl +mmx +mpeg +sse +3dnow +encode +X +quicktime +avi -altivec


Mine is pulling everything in 'cept for altivec. What version of transcode are you using? You might want to rebuild it and try again... I'm shooting in the dark as I'm sorta new to all this as well.

later,
ajay
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Mon Dec 29, 2003 10:47 am    Post subject: Transcode problems Reply with quote

I've not seen the weird streaks of red both Viperlin & ajayrock speak of.
All my divx video files encode fine. This maybe luck, so:
If someone could provide a link to a small sample video that this occurs on (pre-transcoded), plus the transcode line used when it occurs, I'd be happy to test it out & bug-fix.

Viperlin, for audio sync problems, look near the top of your transcode output for a line like
Code:
[transcode] (probe) suggested AV correction -D 872 (34880 ms) | AV 34906 ms | 26 ms
And a little further down for something like this:
Code:
[transcode] A: AV shift         | 34906 ms [ 872 (A) | 26 ms ]

This means transcode has engaged it's AV Sync auto-correction & usually ends up with bad AV sync (in my experience).
Ideally what you should see is something like this:
Code:
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

The workaround is to enforce transcode to sync the video to the first audio frame with the '-D 0' option, like this:
Code:

transcode -i matrix.mpg -V -y mpeg -F d,1 -E 48000 -b 224 -D 0 -o matrix
This is mentioned in the 'Notes:' section in the original post, btw :)

Pzasso, the above will apply to you also when transcode does finally work as you have an AV Sync auto-correction happening in your transcode output.
But for now, it seems transcode is having problems with MMX on your system.
Code:
[transcode] warning : /usr/lib/transcode/export_mpeg.so: undefined symbol: pred_comp_mmx

Try re-emerging transcode with mmx disabled:
Code:
USE="-mmx" emerge transcode
For a full list of USE flags do:
Code:
emerge -pv transcode
An incorrect CPU selection in your kernelconfig may also cause this, though you would more than likely see performance problems elsewhere too.
SSE, 3dnow & MMX are CPU instruction sets, do:
Code:
cat /proc/cpuinfo
to check if your CPU supports these. If it does & transcode is still spitting out errors like this, then it's my feeling that it's a bug within transcode & should be posted to the transcode authors -> http://zebra.fh-weingarten.de/~transcode/
Does it happen with .avi's too ?
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: Mon Dec 29, 2003 5:37 pm    Post subject: Reply with quote

shiznix,

Thank you for your quick response. I will try what you have suggested and let you know what happens. I don't think the kernel/cpu config is the problem. I am using an Athlon XP 2600 and the system has been rock solid thus far since I installed Gentoo about 4 months ago.

Talk to you soon.
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: Mon Dec 29, 2003 11:01 pm    Post subject: Reply with quote

Ok, so I performed the following steps:

emerge unmerge transcode (ok)

USE="-mmx" emerge transcode (ok)

I am getting the same error even now. Just as a sanity check, I tried this on a Pentium 4 machine that I have. It is running a 2.4.22 kernel while my AMD machine is running a 2.4.20 kernel. I got the same error on that machine as well, even after performing the above steps. The AMD machine has the kernel configured for Athlon XP+ gcc>31. Below is the output from /proc/cpuinfo

processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : AMD Athlon(tm) XP 2600+
stepping : 1
cpu MHz : 2088.052
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips : 4128.76

Thanks
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Tue Dec 30, 2003 2:39 pm    Post subject: Reply with quote

EDIT: oops, it was -I p
not -l p
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Tue Dec 30, 2003 3:26 pm    Post subject: Reply with quote

little question, i just bumped into a problem, the video is in a widescreen style format and converting it distorts it into streched upwards style video (like when people watch widescreen films in full TV view so they have tall heads.) guess i'd better start again on the video figuring this bit out :-)
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Wed Dec 31, 2003 9:10 am    Post subject: Tramscode mmx bug Reply with quote

The mmx problem that pzasso is experiencing:
Quote:
[transcode] warning : /usr/lib/transcode/export_mpeg.so: undefined symbol: pred_comp_mmx
is definitely a bug with transcode.
See here -> http://zebra.fh-weingarten.de/~maxi/html/transcode-devel/2002-10/msg00005.html
Looks like it's reared it's ugly head again, 12 months later :/

Pzasso, for what it's worth I also use an AMD CPU, but don't receive the error (XP 1800+).
You should cut/paste your transcode output & submit it to transcode's mailing list.
This bug needs fixing.

Thanks,
Shiznix
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Wed Dec 31, 2003 9:16 am    Post subject: Reply with quote

viperlin wrote:
little question, i just bumped into a problem, the video is in a widescreen style format and converting it distorts it into streched upwards style video (like when people watch widescreen films in full TV view so they have tall heads.) guess i'd better start again on the video figuring this bit out :-)


Have you tried playing with enforcing the aspect ratios ?
4:3 would be a good start. :wink:
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: Wed Dec 31, 2003 9:53 am    Post subject: Reply with quote

shiznix,

I sent the bug information to the Transcode developers and gave them a link to this thread as well.


Thanks for your help.

--Paul :)
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, ... 29, 30, 31  Next
Page 2 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