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


Joined: 13 Dec 2003
Posts: 71

PostPosted: Sun Sep 25, 2005 8:33 pm    Post subject: Reply with quote

I've been using any2vob (0.26, since all other versions halted with an error when reaching subtitle processing) in order to get:

- simple videodvd with subtitles, no menus, subs loaded automatically as soon as the movie is played.

Having some problems with the script when it came to setting the subtitle font size, here's what is working on my Philips DVD612S:

Code:
grin@GRiN /mnt/videos/dvd $ l
total 1.6G
drwxr-xr-x  2 grin    6 Sep 21 06:47 FINAL/
-rw-r--r--  1 grin  44K Sep 14 01:33 any2vob-0.26.sh
-rw-r--r--  1 grin 509K Sep 25 21:28 any2vob.log
-rw-r--r--  1 grin  323 Sep 15 17:36 dvdauthor.xml
-rw-r--r--  1 grin  380 Sep 16 03:40 subtitle.xml
-rw-r--r--  1 grin 1.2G Sep 25 21:28 teste.VOB
-rw-r--r--  1 grin  37M Sep 25 21:28 teste.VOB.temp
-rw-r-----  1 grin 350M Sep 25 20:12 teste.avi
-rw-r--r--  1 grin  48K Sep 25 20:12 teste.srt


Code:
sh any2vob-0.26.sh --log=yes -i teste.avi && spumux -s0 subtitle.xml < teste.VOB > teste.VOB.temp && mv teste.VOB.temp teste.VOB  && dvdauthor -x dvdauthor.xml && growisofs -Z /dev/hdc -dvd-video FINAL/


subtitle.xml

Code:
<subpictures>
  <stream>
    <textsub filename="teste.srt" characterset="ISO8859-1"
         fontsize="22.0" font="Vera.ttf" horizontal-alignment="center"
         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>



dvdauthor.xml

Code:
<dvdauthor dest="FINAL">
    <vmgm />
    <titleset>
        <titles>
           <subpicture lang="pt" />
            <pgc>
                <pre>subtitle=64;</pre>
                <vob file="teste.VOB" chapters="0,0:15,0:30,0:45,1:00,1:15,1:30,1:45,2:00"/>
            </pgc>
        </titles>
    </titleset>
</dvdauthor>


Haven't tried the chapters to see if I can advance ok through the videos but the rest is working fine, processing the subs outside of the script allowed for bigger font, using the script, even though I'd set the parameter, the size wouldn't change.

Hope this helps whoever is trying to include subtitles.

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: Mon Sep 26, 2005 4:47 am    Post subject: Reply with quote

wickwire wrote:
I've been using any2vob (0.26, since all other versions halted with an error when reaching subtitle processing) in order to get:

- simple videodvd with subtitles, no menus, subs loaded automatically as soon as the movie is played.

Having some problems with the script when it came to setting the subtitle font size, here's what is working on my Philips DVD612S:

Code:
grin@GRiN /mnt/videos/dvd $ l
total 1.6G
drwxr-xr-x  2 grin    6 Sep 21 06:47 FINAL/
-rw-r--r--  1 grin  44K Sep 14 01:33 any2vob-0.26.sh
-rw-r--r--  1 grin 509K Sep 25 21:28 any2vob.log
-rw-r--r--  1 grin  323 Sep 15 17:36 dvdauthor.xml
-rw-r--r--  1 grin  380 Sep 16 03:40 subtitle.xml
-rw-r--r--  1 grin 1.2G Sep 25 21:28 teste.VOB
-rw-r--r--  1 grin  37M Sep 25 21:28 teste.VOB.temp
-rw-r-----  1 grin 350M Sep 25 20:12 teste.avi
-rw-r--r--  1 grin  48K Sep 25 20:12 teste.srt


Code:
sh any2vob-0.26.sh --log=yes -i teste.avi && spumux -s0 subtitle.xml < teste.VOB > teste.VOB.temp && mv teste.VOB.temp teste.VOB  && dvdauthor -x dvdauthor.xml && growisofs -Z /dev/hdc -dvd-video FINAL/


subtitle.xml

Code:
<subpictures>
  <stream>
    <textsub filename="teste.srt" characterset="ISO8859-1"
         fontsize="22.0" font="Vera.ttf" horizontal-alignment="center"
         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>



dvdauthor.xml

Code:
<dvdauthor dest="FINAL">
    <vmgm />
    <titleset>
        <titles>
           <subpicture lang="pt" />
            <pgc>
                <pre>subtitle=64;</pre>
                <vob file="teste.VOB" chapters="0,0:15,0:30,0:45,1:00,1:15,1:30,1:45,2:00"/>
            </pgc>
        </titles>
    </titleset>
</dvdauthor>


Haven't tried the chapters to see if I can advance ok through the videos but the rest is working fine, processing the subs outside of the script allowed for bigger font, using the script, even though I'd set the parameter, the size wouldn't change.

Hope this helps whoever is trying to include subtitles.

Thanks shiznix! :)

No problem, could you please post your command line & the error it throws when reaching subtitle processing.
Thanks.
Back to top
View user's profile Send private message
jbwillia
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 108
Location: TN, USA

PostPosted: Tue Sep 27, 2005 12:40 am    Post subject: Reply with quote

First Off, awesome docs Shiznix!

That said, I have a question. This may have been previously addressed; if so, please forgive me for not reading all 22 pages of content. The question is: why does transcode use an mp3 export format when you use the "--export_prof dvd-ntsc" option; however, if you're not using this option b/c you want to reduce size and quality, you give it the option "-N 0x2000" which corresponds to ac3 audio? Of course, the audio output file is *.ac3, so this seems to tell me that it should be in ac3 format even though "--export_prof dvd-nts" generates it in mp3. This is rather confusing; does it matter which one it is?

Code:
jbwillia@heimdall ~/extra $ transcode -i movie.xvid.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie -D0 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97
transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
[transcode] auto-probing source movie.xvid.avi (ok)
[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=ac3)
[transcode] V: import frame     | 704x384  1.83:1 
XXX: zoom=yes pre_clip=no
[transcode] V: zoom             | 720x480  1.50:1 (Lanczos3)
[transcode] V: bits/pixel       | 0.217
[transcode] V: decoding fps,frc | 23.976,1
[transcode] V: Y'CbCr           | YV12/I420
[transcode] A: import format    | 0x2000  AC3          [48000,16,2]  192 kbps
[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps
[transcode] V: encoding fps,frc | 29.970,4
[transcode] A: bytes per frame  | 6408 (6406.400000)
[transcode] A: adjustment       | -1600@1000
[transcode] A: rescale stream   | 2.000
[transcode] V: IA32 accel mode  | sse2 (sse2 sse mmxext mmx asm C)
tc_memcpy: using libc for memcpy
[transcode] V: video buffer     | 10 @ 720x480


jbw
_________________
Code:
#!/bin/bash
for everyexe in $(find /home/you -name "*.exe" | egrep -i ".*exe$")
do
    kill $(pgrep you)
done
Back to top
View user's profile Send private message
peabody124
n00b
n00b


Joined: 03 Jun 2004
Posts: 14

PostPosted: Tue Sep 27, 2005 4:18 pm    Post subject: DVDStyler Reply with quote

I just wanted to suggest people also glance at DVDStyler for creating simple menu interfaces without dealing with gimp and creating button layers. It doesn't have the option for animated menus, but it's nice and simple.

Great HOWTO btw.

james
Back to top
View user's profile Send private message
jbwillia
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 108
Location: TN, USA

PostPosted: Tue Sep 27, 2005 5:58 pm    Post subject: Re: DVDStyler Reply with quote

peabody124 wrote:
I just wanted to suggest people also glance at DVDStyler for creating simple menu interfaces without dealing with gimp and creating button layers. It doesn't have the option for animated menus, but it's nice and simple.

Great HOWTO btw.

james


I agree; dvdstyler is great. All you have to do on the command line is encode your videos into dvd format (you don't even have to worry about directory structure). I'm curious to see how qdvdauthor is though. I installed it recently, but haven't had the chance to test it. It supposedly has support for animated menus. You still have to encode your videos manually though.

jbw
_________________
Code:
#!/bin/bash
for everyexe in $(find /home/you -name "*.exe" | egrep -i ".*exe$")
do
    kill $(pgrep you)
done
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Tue Sep 27, 2005 11:29 pm    Post subject: Reply with quote

jbwillia wrote:
First Off, awesome docs Shiznix!

That said, I have a question. This may have been previously addressed; if so, please forgive me for not reading all 22 pages of content. The question is: why does transcode use an mp3 export format when you use the "--export_prof dvd-ntsc" option; however, if you're not using this option b/c you want to reduce size and quality, you give it the option "-N 0x2000" which corresponds to ac3 audio? Of course, the audio output file is *.ac3, so this seems to tell me that it should be in ac3 format even though "--export_prof dvd-nts" generates it in mp3. This is rather confusing; does it matter which one it is?

Code:
jbwillia@heimdall ~/extra $ transcode -i movie.xvid.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie -D0 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97
transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
[transcode] auto-probing source movie.xvid.avi (ok)
[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=ac3)
[transcode] V: import frame     | 704x384  1.83:1 
XXX: zoom=yes pre_clip=no
[transcode] V: zoom             | 720x480  1.50:1 (Lanczos3)
[transcode] V: bits/pixel       | 0.217
[transcode] V: decoding fps,frc | 23.976,1
[transcode] V: Y'CbCr           | YV12/I420
[transcode] A: import format    | 0x2000  AC3          [48000,16,2]  192 kbps
[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps
[transcode] V: encoding fps,frc | 29.970,4
[transcode] A: bytes per frame  | 6408 (6406.400000)
[transcode] A: adjustment       | -1600@1000
[transcode] A: rescale stream   | 2.000
[transcode] V: IA32 accel mode  | sse2 (sse2 sse mmxext mmx asm C)
tc_memcpy: using libc for memcpy
[transcode] V: video buffer     | 10 @ 720x480


jbw

That's a damn fine point :)

Transcode by default encodes the audio to mp3.
By adding the '--export_prof' option you're telling Transcode to hand the audio off (export) to the DVD profile which then encodes to the proper DVD spec. for AC3.

I can only see this as unnecessary encoding.
A much better way would be to specify '-N 0x2000' with '--export_prof' to tell Transcode to encode to AC3 by default, before handing it off to the DVD profile (which would then have very little encoding to do as it's already in AC3 format).

Specifying '-N 0x2000' in conjunction with '--export_prof' confirms this, the encoding is actually slightly faster (by ~2FPS if the input file already contains an AC3 track).

Not to mention the slight loss in audio quality that encoding to MP3 then back to AC3 would produce.

Nice pickup, I'll update the guide to reflect something like this:
Code:
transcode -i movie.xvid.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie -D0 -N 0x2000 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97
Back to top
View user's profile Send private message
jbwillia
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 108
Location: TN, USA

PostPosted: Wed Sep 28, 2005 4:42 pm    Post subject: Reply with quote

**sighs ... ok, my previous discovery came b/c I'm trying to figure out why I can get the resolution deduction to work. No matter how I play with the command if I specifiy a "-Z 352x240" instead of "-Z 720x480" I cannot play the video. So I'm able to reduce filesize by reducing the bitrate, but I can't reduce encoding time by reducing resolution. I tried this at first by burning it to a dvd and it wouldn't play anywhere (only the sound worked). Since then I've tried about every combination possible and it just will not reduce resolution. When I generate a *.mpg with transcode and mplex (reducing the resolution in the process) and then test it with xine I get an error message saying "The amount of dropped frame is too high, your system might be too slow, not properly optimized or just too loaded." It then continues to play the video although only the sound is working. Now, I know my system is fine and plenty powerful. The *.mpg file will also play just fine with mplayer before I convert it to vobs using dvdauthor. I also know the video is good because if I specify "-Z 720x480" then it will work just fine; it just takes forever to encode.

Does anyone have any idea why this will not work?

jbw
_________________
Code:
#!/bin/bash
for everyexe in $(find /home/you -name "*.exe" | egrep -i ".*exe$")
do
    kill $(pgrep you)
done
Back to top
View user's profile Send private message
osbourd2
Tux's lil' helper
Tux's lil' helper


Joined: 09 Mar 2004
Posts: 91
Location: Cardiff, UK

PostPosted: Wed Sep 28, 2005 7:27 pm    Post subject: Reply with quote

I've started trying to create my own DVD today, but I can't get past the spumux stage of merging the menu highlight and select. There a fix on page 8 or 9 of this HowTo, but it applies to dvdauthor-6.10 and the patch has been applied in dvdauthor-6.11

Code:
$ spumux spumux.xml < menu.mpg > menu_final.mpg
DVDAuthor::spumux, version 0.6.11.
Build options: gnugetopt magick iconv freetype
Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=C
INFO: Converting filenames to ANSI_X3.4-1968
dvds: Unable to load file (menu_highlight.png).
WARN: Bad image,  skipping line -1
WARN:  Read 0, expected 4
INFO: 0 subtitles added, 1 subtitles skipped, stream: 32, offset: 0.18

Statistics:
- Processed 0 subtitles.
- The longest display line had -1 characters.
- The maximum number of displayed lines was 0.
- The normal display height of the font arial.ttf was 0.
- The bottom display height of the font arial.ttf was 0.
- The biggest subtitle box had 0 bytes.


I've googled for the error message, but can only find old fixes relating to stepping down to older versions of ImageMagick.

Can any one help?

Someone else has posted a similar message this evening too. https://forums.gentoo.org/viewtopic-t-385860-highlight-spumux.html

:)

EDIT: Having just typed all that, I've tried running this as root, and it works OK - so perhaps a permissions error somewhere else.....

UPDATE: :D

I found the source of my problems. I appear to have two different versions of spumux on my machine. One in /usr/local/bin/spumux and one in /usr/bin/spumux. My non-root user was calling /usr/local/bin/spumux which was causing the error. My root user was calling the /usr/bin/spumux and was working OK. If I call the /usr/bin version as my non-root user it works fine.

I don't know where the broken version came from, and am not sure whether I can simply delete it or not.
Back to top
View user's profile Send private message
jbwillia
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 108
Location: TN, USA

PostPosted: Thu Sep 29, 2005 3:02 pm    Post subject: Reply with quote

osbourd2 wrote:

UPDATE: :D

I found the source of my problems. I appear to have two different versions of spumux on my machine. One in /usr/local/bin/spumux and one in /usr/bin/spumux. My non-root user was calling /usr/local/bin/spumux which was causing the error. My root user was calling the /usr/bin/spumux and was working OK. If I call the /usr/bin version as my non-root user it works fine.

I don't know where the broken version came from, and am not sure whether I can simply delete it or not.


You probably ought to edit you ~/.profile to set your path such that /usr/local/bin is last in precedence. However, the fact that you have a spumux in /usr/local/bin seems to say that you've compiled a non-portage/non-ebuild copy of dvdauthor and installed it. When you emerge a package via portage it uses /usr/bin as the BINDIR whereas usually when you download source packages they set the default BINDIR to /usr/local/bin to prevent you from overwriting a system installed component. If you still have the directory around from which you installed the non-ebuild copy of dvdauthor then you could simply switch to that directory and run "make uninstall" as root. That should take care of your problems.

jbw
_________________
Code:
#!/bin/bash
for everyexe in $(find /home/you -name "*.exe" | egrep -i ".*exe$")
do
    kill $(pgrep you)
done
Back to top
View user's profile Send private message
osbourd2
Tux's lil' helper
Tux's lil' helper


Joined: 09 Mar 2004
Posts: 91
Location: Cardiff, UK

PostPosted: Thu Sep 29, 2005 4:36 pm    Post subject: Reply with quote

jbwillia wrote:
osbourd2 wrote:

UPDATE: :D

I found the source of my problems. I appear to have two different versions of spumux on my machine. One in /usr/local/bin/spumux and one in /usr/bin/spumux. My non-root user was calling /usr/local/bin/spumux which was causing the error. My root user was calling the /usr/bin/spumux and was working OK. If I call the /usr/bin version as my non-root user it works fine.

I don't know where the broken version came from, and am not sure whether I can simply delete it or not.


You probably ought to edit you ~/.profile to set your path such that /usr/local/bin is last in precedence. However, the fact that you have a spumux in /usr/local/bin seems to say that you've compiled a non-portage/non-ebuild copy of dvdauthor and installed it. When you emerge a package via portage it uses /usr/bin as the BINDIR whereas usually when you download source packages they set the default BINDIR to /usr/local/bin to prevent you from overwriting a system installed component. If you still have the directory around from which you installed the non-ebuild copy of dvdauthor then you could simply switch to that directory and run "make uninstall" as root. That should take care of your problems.

jbw


Oops, you're quite right! I've removed the broken custom build :oops:
Back to top
View user's profile Send private message
hulmeman
Apprentice
Apprentice


Joined: 02 Jul 2002
Posts: 184
Location: Duchy of Lancaster, England.

PostPosted: Sat Oct 01, 2005 1:16 pm    Post subject: multimux Reply with quote

I'm still having problems with multimux:

Code:
multimux -dv 0,0,0,15,15,0 left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav -o out.wav
Panteltje multimux-0.2.2
found input file left.wav
found input file centre.wav
found input file right.wav
found input file left_surround.wav
found input file right_surround.wav
found input file lfe.wav
main(): wave header_size=72
input_files=6
delay[0]=0.00
delay[1]=0.00
delay[2]=0.00
delay[3]=15.00
delay[4]=15.00
delay[5]=0.00
statptr[0]=0x506610 i=0 statptr[0] -> st_size=1916972
input file left.wav size is 1916972 delay is 0.00 milli seconds
statptr[1]=0x506610 i=1 statptr[1] -> st_size=1916972
input file centre.wav size is 1916972 delay is 0.00 milli seconds
statptr[2]=0x506610 i=2 statptr[2] -> st_size=1916972
input file right.wav size is 1916972 delay is 0.00 milli seconds
statptr[3]=0x506610 i=3 statptr[3] -> st_size=1916972
input file left_surround.wav size is 1916972 delay is 15.00 milli seconds
statptr[4]=0x506610 i=4 statptr[4] -> st_size=1916972
input file right_surround.wav size is 1916972 delay is 15.00 milli seconds
statptr[5]=0x506610 i=5 statptr[5] -> st_size=1916972
input file lfe.wav size is 1916972 delay is 0.00 milli seconds
longest_input_file_length=1916972
Floating point exception

out.wav is created, but has 0 bytes:
Code:
baz1@baz1 ~/dvd $ ls -l
total 11265
-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 centre.wav
-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 left_surround.wav
-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 left.wav
-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 lfe.wav
-rw-r--r--  1 root root        0 Oct  1 14:58 out.wav
-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 right_surround.wav
-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 right.wav

dmesg gives me:
Code:
multimux[23537] trap divide error rip:4011c3 rsp:7ffffff2fe10 error:0

Anyone got any ideas? I've tried older versions, get the same error. If not, is there an alternative to 'transcode'?
Thanks in anticipation.
Baz
Back to top
View user's profile Send private message
saosao9
n00b
n00b


Joined: 10 Jul 2002
Posts: 19

PostPosted: Sat Oct 01, 2005 4:21 pm    Post subject: Reply with quote

Great Howto and awesome little piece of software in the any2vob script!

Anyways, I've been trying to use that script to archive off some shows I've been recording with my mythTV setup. The problem I'm having is that even though I'm starting at an ntsc mpeg and going to a smaller ntsc mpeg for some reason the .vob file's audio gets out of sync. Here is the command line I've been using:

Code:
 any2vob-0.28.sh --format=ntsc --compress=yes --aspect=4:3 --surround=no  -i Battlestar\ Galactica\ -*.mpg


Here is the output from the script:
Code:

Final estimated filesize:      1.02 GB

Frames/sec:     29.970
Resolution:     480x480
Aspect:         1:1


 Running: ffmpeg -y -i Battlestar\ Galactica\ -\ ep101\ -33.mpg -map 0:1 -ar 48000 -ab 384 -ac 2 tmp_any2vob/Battlestar\ Galactica\ -\ ep101\ -33.ac3 -map 0:0 -f mpeg2video -s 480x480 -padtop 18 -padleft 34 -padbottom 22 -padright 34 -hq -b 5000 -r ntsc  - 2> /dev/null | ffmpeg -y -i - -hq -b 5000 -bufsize 224 -maxrate 7000 -s 352x240 -aspect 4:3 -r ntsc  -f mpeg2video tmp_any2vob/Battlestar\ Galactica\ -\ ep101\ -33.m2v

ffmpeg version CVS, build 3211266, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i686-pc-linux-gnu --enable-shared-pp --enable-shared --disable-static --enable-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 --disable-a52bin --enable-audio-oss --disable-v4l --disable-dv1394 --disable-dc1394 --disable-pthreads --enable-xvid --enable-libogg --enable-vorbis --disable-theora --disable-dts --enable-network --enable-zlib --enable-ffplay --disable-faad --disable-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts
  built on Sep 10 2005 02:47:44, gcc: 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
Input #0, mpegvideo, from 'pipe:':
  Duration: N/A, bitrate: 104857 kb/s
  Stream #0.0: Video: mpeg2video, yuv420p, 548x520, 29.97 fps, 104857 kb/s
Output #0, mpeg2video, to 'tmp_any2vob/Battlestar Galactica - ep101 -33.m2v':
  Stream #0.0: Video: mpeg2video (hq), yuv420p, 352x240, 29.97 fps, q=2-31, 5000 kb/s
Stream mapping:
  Stream #0.0 -> #0.0


Do you see anything going obviously wrong here? The original video is an 480x480 mpeg2 file encoded at 29.97fps. When I play that in mplayer the sound is in sync and everythying is fine, however when I play the output vob file sound is no longer in sync.

Thanks for any help!

Paul


Edit: BTW just to follow up when I try to manually use the transcode command line directly it seems to do the correct thing and not screw up the audio sync, I think this may be a bug in the script.
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Sun Oct 02, 2005 12:48 am    Post subject: Reply with quote

saosao9 wrote:
Great Howto and awesome little piece of software in the any2vob script!

Anyways, I've been trying to use that script to archive off some shows I've been recording with my mythTV setup. The problem I'm having is that even though I'm starting at an ntsc mpeg and going to a smaller ntsc mpeg for some reason the .vob file's audio gets out of sync. Here is the command line I've been using:

Code:
 any2vob-0.28.sh --format=ntsc --compress=yes --aspect=4:3 --surround=no  -i Battlestar\ Galactica\ -*.mpg


Here is the output from the script:
Code:

Final estimated filesize:      1.02 GB

Frames/sec:     29.970
Resolution:     480x480
Aspect:         1:1


 Running: ffmpeg -y -i Battlestar\ Galactica\ -\ ep101\ -33.mpg -map 0:1 -ar 48000 -ab 384 -ac 2 tmp_any2vob/Battlestar\ Galactica\ -\ ep101\ -33.ac3 -map 0:0 -f mpeg2video -s 480x480 -padtop 18 -padleft 34 -padbottom 22 -padright 34 -hq -b 5000 -r ntsc  - 2> /dev/null | ffmpeg -y -i - -hq -b 5000 -bufsize 224 -maxrate 7000 -s 352x240 -aspect 4:3 -r ntsc  -f mpeg2video tmp_any2vob/Battlestar\ Galactica\ -\ ep101\ -33.m2v

ffmpeg version CVS, build 3211266, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i686-pc-linux-gnu --enable-shared-pp --enable-shared --disable-static --enable-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 --disable-a52bin --enable-audio-oss --disable-v4l --disable-dv1394 --disable-dc1394 --disable-pthreads --enable-xvid --enable-libogg --enable-vorbis --disable-theora --disable-dts --enable-network --enable-zlib --enable-ffplay --disable-faad --disable-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts
  built on Sep 10 2005 02:47:44, gcc: 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
Input #0, mpegvideo, from 'pipe:':
  Duration: N/A, bitrate: 104857 kb/s
  Stream #0.0: Video: mpeg2video, yuv420p, 548x520, 29.97 fps, 104857 kb/s
Output #0, mpeg2video, to 'tmp_any2vob/Battlestar Galactica - ep101 -33.m2v':
  Stream #0.0: Video: mpeg2video (hq), yuv420p, 352x240, 29.97 fps, q=2-31, 5000 kb/s
Stream mapping:
  Stream #0.0 -> #0.0


Do you see anything going obviously wrong here? The original video is an 480x480 mpeg2 file encoded at 29.97fps. When I play that in mplayer the sound is in sync and everythying is fine, however when I play the output vob file sound is no longer in sync.

Thanks for any help!

Paul


Edit: BTW just to follow up when I try to manually use the transcode command line directly it seems to do the correct thing and not screw up the audio sync, I think this may be a bug in the script.

You may like to downgrade to the latest stable ffmpeg or do a more recent CVS checkout, I also had this issue using ffmpeg CVS a while back, but never with stable.

Thanks :)

PS> One way you can test to see if it's your ffmpeg that is at fault, is to use the "Running: ffmpeg..." line on the command line by itself, then do...
Code:
mplex -f8 -o test.VOB  Battlestar Galactica - ep101 -33.m2v  Battlestar Galactica - ep101 -33.ac3
...and check the audio/video sync in test.VOB
Back to top
View user's profile Send private message
Draeven
n00b
n00b


Joined: 04 Jul 2004
Posts: 12

PostPosted: Sun Oct 02, 2005 4:36 pm    Post subject: Reply with quote

First off, this is a great HOWTO - so far I've had no problems until now.

I've gotten all my videos converted and am working on my menu for the DVD. I get all the images made as per the HOWTO. The problem occurs when I try to create the menu.m2v. Here is the code that I'm using:

Code:

draeven@tarvos ~/Smallville_DVD1 $ convert ~/Smallville_D1_bg.jpg ppm:- | ppmtoy4m -n50 -F30000:1001 -A10:11 -I p -r | mpeg2enc -n n -f8 -b5000 -a2 -o Smallville_D1_bg.m2v


When I do this I get the following output:

Code:

   INFO: [ppmtoy4m] Command-line Parameters:
   INFO: [ppmtoy4m]              framerate:  30000:1001
   INFO: [ppmtoy4m]     pixel aspect ratio:  10:11
   INFO: [ppmtoy4m]              interlace:  none/progressive
   INFO: [ppmtoy4m]         starting frame:  0
   INFO: [ppmtoy4m]            # of frames:  50, repeat last frame until done
   INFO: [ppmtoy4m]     chroma subsampling:  4:2:0, JPEG/MPEG-1, interstitial siting
   INFO: [ppmtoy4m] Output Stream parameters:
   INFO: [ppmtoy4m]     frame size:  720x486 pixels (524880 bytes)
   INFO: [ppmtoy4m]     frame rate:  30000/1001 fps (~29.970030)
   INFO: [ppmtoy4m]      interlace:  none/progressive
   INFO: [ppmtoy4m]   sample aspect ratio:  10:11
   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!
   INFO: [mpeg2enc] SETTING MMX for TRANSFORM!
   INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!
   INFO: [mpeg2enc] Selecting DVD output profile
   INFO: [mpeg2enc] Progressive input - selecting progressive encoding.
   INFO: [mpeg2enc] Encoding MPEG-2 video to Smallville_D1_bg.m2v
   INFO: [mpeg2enc] Horizontal size: 720 pel
   INFO: [mpeg2enc] Vertical size: 486 pel
   INFO: [mpeg2enc] Aspect ratio code: 2 = 4:3 display
   INFO: [mpeg2enc] Frame rate code:   4 = 30000.0/1001.0 (NTSC VIDEO)
   INFO: [mpeg2enc] Bitrate: 5000 KBit/s
   INFO: [mpeg2enc] Quality factor: 8 (Quantisation = 9) (1=best, 31=worst)
   INFO: [mpeg2enc] Field order for input: none/progressive
   INFO: [mpeg2enc] Sequence unlimited length
   INFO: [mpeg2enc] Search radius: 16
   INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 18
   INFO: [mpeg2enc] Setting colour/gamma parameters to "NTSC"
   INFO: [mpeg2enc] Progressive format frames = 1
**ERROR: [mpeg2enc] Sample rate is greater than permitted in specified Level


What am I missing that is causing the sample rate to be greater than what is permitted.

Thanks in advance!

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


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

PostPosted: Mon Oct 03, 2005 6:59 am    Post subject: Reply with quote

Draeven wrote:
First off, this is a great HOWTO - so far I've had no problems until now.

I've gotten all my videos converted and am working on my menu for the DVD. I get all the images made as per the HOWTO. The problem occurs when I try to create the menu.m2v. Here is the code that I'm using:

Code:

draeven@tarvos ~/Smallville_DVD1 $ convert ~/Smallville_D1_bg.jpg ppm:- | ppmtoy4m -n50 -F30000:1001 -A10:11 -I p -r | mpeg2enc -n n -f8 -b5000 -a2 -o Smallville_D1_bg.m2v


When I do this I get the following output:

Code:

   INFO: [ppmtoy4m] Command-line Parameters:
   INFO: [ppmtoy4m]              framerate:  30000:1001
   INFO: [ppmtoy4m]     pixel aspect ratio:  10:11
   INFO: [ppmtoy4m]              interlace:  none/progressive
   INFO: [ppmtoy4m]         starting frame:  0
   INFO: [ppmtoy4m]            # of frames:  50, repeat last frame until done
   INFO: [ppmtoy4m]     chroma subsampling:  4:2:0, JPEG/MPEG-1, interstitial siting
   INFO: [ppmtoy4m] Output Stream parameters:
   INFO: [ppmtoy4m]     frame size:  720x486 pixels (524880 bytes)
   INFO: [ppmtoy4m]     frame rate:  30000/1001 fps (~29.970030)
   INFO: [ppmtoy4m]      interlace:  none/progressive
   INFO: [ppmtoy4m]   sample aspect ratio:  10:11
   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!
   INFO: [mpeg2enc] SETTING MMX for TRANSFORM!
   INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!
   INFO: [mpeg2enc] Selecting DVD output profile
   INFO: [mpeg2enc] Progressive input - selecting progressive encoding.
   INFO: [mpeg2enc] Encoding MPEG-2 video to Smallville_D1_bg.m2v
   INFO: [mpeg2enc] Horizontal size: 720 pel
   INFO: [mpeg2enc] Vertical size: 486 pel
   INFO: [mpeg2enc] Aspect ratio code: 2 = 4:3 display
   INFO: [mpeg2enc] Frame rate code:   4 = 30000.0/1001.0 (NTSC VIDEO)
   INFO: [mpeg2enc] Bitrate: 5000 KBit/s
   INFO: [mpeg2enc] Quality factor: 8 (Quantisation = 9) (1=best, 31=worst)
   INFO: [mpeg2enc] Field order for input: none/progressive
   INFO: [mpeg2enc] Sequence unlimited length
   INFO: [mpeg2enc] Search radius: 16
   INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 18
   INFO: [mpeg2enc] Setting colour/gamma parameters to "NTSC"
   INFO: [mpeg2enc] Progressive format frames = 1
**ERROR: [mpeg2enc] Sample rate is greater than permitted in specified Level


What am I missing that is causing the sample rate to be greater than what is permitted.

Thanks in advance!

Draeven

Hi Draeven,
This usually happens when there is a mismatch between the .jpg's framesize & the TV format (PAL or NTSC) specified to mpeg2enc.
This is confirmed by looking at your output:
Code:
INFO: [ppmtoy4m]     frame size:  720x486 pixels (524880 bytes)

Mpeg2enc has been told to encode to NTSC (-n n), and so expects an NTSC framesize of 720x480.
A quick resize of the offending Smallville_D1_bg.jpg to 720x480 should fix things.
Code:
convert -resize 720x480! Smallville_D1_bg.jpg  Smallville_D1_bg-NEW.jpg

Then try again with your original command using the newly resized Smallville_D1_bg-NEW.jpg
Back to top
View user's profile Send private message
Draeven
n00b
n00b


Joined: 04 Jul 2004
Posts: 12

PostPosted: Wed Oct 05, 2005 5:59 am    Post subject: Reply with quote

shiznix wrote:

Hi Draeven,
This usually happens when there is a mismatch between the .jpg's framesize & the TV format (PAL or NTSC) specified to mpeg2enc.
This is confirmed by looking at your output:
Code:
INFO: [ppmtoy4m]     frame size:  720x486 pixels (524880 bytes)

Mpeg2enc has been told to encode to NTSC (-n n), and so expects an NTSC framesize of 720x480.
A quick resize of the offending Smallville_D1_bg.jpg to 720x480 should fix things.
Code:
convert -resize 720x480! Smallville_D1_bg.jpg  Smallville_D1_bg-NEW.jpg

Then try again with your original command using the newly resized Smallville_D1_bg-NEW.jpg


shiznix,

Thanks I caught that myself, after pulling most of my hair out. It seems that the NTSC template in GIMP 2.2 was the culprit (well, myself as well for not double checking the dimensions!), being set for 720x486.

Draeven
Back to top
View user's profile Send private message
nickrout
Apprentice
Apprentice


Joined: 06 Oct 2002
Posts: 208
Location: New Zealand

PostPosted: Wed Oct 05, 2005 8:12 pm    Post subject: DVDStyler & animated menus Reply with quote

Quote:
I just wanted to suggest people also glance at DVDStyler for creating simple menu interfaces without dealing with gimp and creating button layers. It doesn't have the option for animated menus, but it's nice and simple.


I just want to challenge the statement that dvdstyler doesn't have animated menus. I assume by animated menus you mean a menu that is a video file.

The DVDStyler docs state:

Quote:
Using a video clip on the menu background
Any menu can use either still pictures or motion video for the background of the menu. Actually, the still picture is converted to a single frame video clip when the project is rendered (burned). Technically, you are always using video on the menu.
DVDStyler V-1.31 now supports using either stills or video for the background of the menu. If applying a video clip to the menu, it must be an MPEG clip with both video and audio (elemental streams are not supported on menus)
Back to top
View user's profile Send private message
jbwillia
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 108
Location: TN, USA

PostPosted: Sat Oct 08, 2005 7:46 am    Post subject: Reply with quote

shiznix wrote:

That's a damn fine point :)

Transcode by default encodes the audio to mp3.
By adding the '--export_prof' option you're telling Transcode to hand the audio off (export) to the DVD profile which then encodes to the proper DVD spec. for AC3.

I can only see this as unnecessary encoding.
A much better way would be to specify '-N 0x2000' with '--export_prof' to tell Transcode to encode to AC3 by default, before handing it off to the DVD profile (which would then have very little encoding to do as it's already in AC3 format).

Specifying '-N 0x2000' in conjunction with '--export_prof' confirms this, the encoding is actually slightly faster (by ~2FPS if the input file already contains an AC3 track).

Not to mention the slight loss in audio quality that encoding to MP3 then back to AC3 would produce.

Nice pickup, I'll update the guide to reflect something like this:
Code:
transcode -i movie.xvid.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie -D0 -N 0x2000 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97


Well, in that case, you may as well add '-b 224' as well. The transcode default audio bitrate output is 128; however, when it is handed off to the dvd profile it gets converted to 224. This is going to cause a slight encoding slowdown, and if someone starts off with a 224 bit audio source they are going to lose sound quality when it gets converted to 128 and then back to 224 again.

jbw
_________________
Code:
#!/bin/bash
for everyexe in $(find /home/you -name "*.exe" | egrep -i ".*exe$")
do
    kill $(pgrep you)
done
Back to top
View user's profile Send private message
syscrash
Guru
Guru


Joined: 14 Apr 2003
Posts: 541

PostPosted: Sun Oct 09, 2005 10:29 pm    Post subject: Reply with quote

The any2vob script links seem to have died. Does anyone have it?
Thanks in advance :)
_________________
Play ET? Come by #gentoo.et on freenode!
http://syscrash.ca
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Mon Oct 10, 2005 7:47 am    Post subject: Reply with quote

syscrash wrote:
The any2vob script links seem to have died. Does anyone have it?
Thanks in advance :)

It's back up after being down for ~12 hours due to a bug in our modem's operating system (now fixed).

Have also updated the guide to show changes in the latest mjpegtools when creating menus (thanks to Hans for pointing out the bug).
For those interested mjpegtools' ppmtoy4m must now have it's subsample mode explicitly set to 4:2:0 Mpeg-2 (-S 420mpeg2) or mpeg2enc won't read from the yuv4mpeg pipe it creates.

Thanks :wink:
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Mon Oct 10, 2005 7:59 am    Post subject: Reply with quote

jbwillia wrote:
Well, in that case, you may as well add '-b 224' as well. The transcode default audio bitrate output is 128; however, when it is handed off to the dvd profile it gets converted to 224. This is going to cause a slight encoding slowdown, and if someone starts off with a 224 bit audio source they are going to lose sound quality when it gets converted to 128 and then back to 224 again.
jbw
You'll note that this change was already made at the same time as the '-N 0x2000' addition, but I did fail to mention it in my reply.
Cheers.
Back to top
View user's profile Send private message
Zed Sesqui
n00b
n00b


Joined: 04 Sep 2005
Posts: 2
Location: Indiana, USA

PostPosted: Sun Oct 16, 2005 2:06 am    Post subject: transcode 0.6.15-r2 vs. transcode 1.0.1 Reply with quote

I've tried to emerge the transcode 1.0.0 described in this thread without any success. Here's what I've tried:

    cat /etc/make.conf
    # These settings were set by the catalyst build script that automatically built this stage
    # Please consult /etc/make.conf.example for a more detailed example
    # CFLAGS="-O2 -pipe -march=athlon-xp"
    CFLAGS="-pipe -march=athlon-xp -O2 -falign-functions=64 -D_FILE_OFFSET_BITS=64"
    CHOST="i686-pc-linux-gnu"
    CXXFLAGS="${CFLAGS}"
    MAKEOPTS="-j2"
    SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
    GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/"
    USE="dvd alsa cdr sdk gnome gtk qt kde"
    -- ---------
    cat /etc/portage/package.keywords
    media-video/transcode ~x86
    media-video/ffmpeg ~x86
    media-video/dvdauthor ~x86
    -- ---------
    ACCEPT_KEYWORDS='~x86' emerge --pretend transcode

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

    Calculating dependencies ...done!
    [ebuild R ] media-video/transcode-0.6.14-r2


I'm new to gentoo and couldn't find why my emerge isn't giving the newer version. So finally I downloaded the latest transcode from that project (1.0.1) and installed it conventionally (without emerge).
    cat /home/me/src/transcode/config-me
    CFLAGS="-O2 -march=athlon-xp -falign-functions=64"
    export CFLAGS
    ./configure --enable-freetype2 --enable-avifile --enable-ogg --enable-vorbis \
    --enable-libquicktime --enable-lzo --enable-a52 --enable-libmpeg3 --enable-libxml2 \
    --enable-mjpegtools --enable-sdl --enable-gtk --enable-imagemagick
    make
    make install


This is the first issue that I haven't been able to solve with the help of these forums and the man pages. Am I going to suffer dire consequences for this expedition? All of the other packages mentioned in this tutorial emerged fine.

Bill
Back to top
View user's profile Send private message
Draeven
n00b
n00b


Joined: 04 Jul 2004
Posts: 12

PostPosted: Sun Oct 16, 2005 5:35 pm    Post subject: Reply with quote

Really quick question. When I put the DVD I created in my standalone DVD player or in my system, and mount it, the label for the disk is always CDROM. Is there a way to change it? I'm making a series of DVD's for someone, and I want each DVD to have the title on there when its loaded.

Thanks in advance

Draeven

--
Draeven
Life is a journey, not a destination.
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Sun Oct 16, 2005 10:36 pm    Post subject: Re: transcode 0.6.15-r2 vs. transcode 1.0.1 Reply with quote

Zed Sesqui wrote:
I've tried to emerge the transcode 1.0.0 described in this thread without any success.

I'm new to gentoo and couldn't find why my emerge isn't giving the newer version. So finally I downloaded the latest transcode from that project (1.0.1) and installed it conventionally (without emerge).
    cat /home/me/src/transcode/config-me
    CFLAGS="-O2 -march=athlon-xp -falign-functions=64"
    export CFLAGS
    ./configure --enable-freetype2 --enable-avifile --enable-ogg --enable-vorbis \
    --enable-libquicktime --enable-lzo --enable-a52 --enable-libmpeg3 --enable-libxml2 \
    --enable-mjpegtools --enable-sdl --enable-gtk --enable-imagemagick
    make
    make install


This is the first issue that I haven't been able to solve with the help of these forums and the man pages. Am I going to suffer dire consequences for this expedition? All of the other packages mentioned in this tutorial emerged fine.

Bill

The newer versions are masked.
Mention of masked packages & how to unmask them is briefly described at the top of the guide.
For more info consult 'man emerge' section 'MASKED PACKAGES' & 'man portage'.
Back to top
View user's profile Send private message
gkmac
Guru
Guru


Joined: 19 Jan 2003
Posts: 333
Location: West Sussex, UK

PostPosted: Sun Oct 16, 2005 10:49 pm    Post subject: Reply with quote

Draeven wrote:
When I put the DVD I created in my standalone DVD player or in my system, and mount it, the label for the disk is always CDROM. Is there a way to change it?

Specify the -V parameter to growisofs followed by the desired name (which I think is limited to capital letters, numbers and underscores). So to burn a DVD with the label MY_MOVIE, do...
Code:
growisofs -Z /dev/dvd -dvd-video -V MY_MOVIE DVD/
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 ... 21, 22, 23 ... 29, 30, 31  Next
Page 22 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