Howto author AVI->DVD with menus using Linux only !

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
User avatar
geeojr
n00b
n00b
Posts: 15
Joined: Tue Feb 11, 2003 11:11 am
Location: Missouri, USA
Contact:

Re: Howto author AVI->DVD with menus using Linux only !

Post by geeojr »

Notes
  • Some NTSC users may experience on their television sets what seems to be a heavy cropping of the video around the edges. This is normal & is called 'overscan'.
    If you are affected by this, add '-j -18,-34,-22,-34' to your transcode lines. See here for more details -> http://www.transcoding.org/cgi-bin/transcode?NTSC
I am affected by this problem -- my widescreen discs are missing information from both ends (and the top/bottom too, not that it matters). But, I have been unsuccessful at getting this to work. The '-j' always pushes my resolution out of norms - my DVD player just will not deal with it... I think there is a more elegant way to fix this problem.

When I examine any other widescreen DVD, they aren't "adjusted" in this manner - and my DVD player shows me everything. The difference between the two isn't how the source material is prepared, it is how the disc is authored, and subsequently instructed to be display by the DVD player.

Examination of the XML description at http://dvdauthor.sourceforge.net/doc/dvdauthor.html revealed something which seems to offer a much simplier solution -- adding the following line to dvdauthor.xml seems to fix this problem for me.

Code: Select all

<video format="ntsc" aspect="16:9" widescreen="nopanscan" />
In its entirety would look like:

Code: Select all

<dvdauthor dest="DVD">
  <vmgm />
  <titleset>
    <titles>
      <video format="ntsc" aspect="16:9" widescreen="nopanscan" />
      <pgc>
        <vob file="clip1.mpg" />
        <vob file="clip2.mpg" />
        <vob file="clip3.mpg" />
        <vob file="clip4.mpg" />
      </pgc>
    </titles>
  </titleset>
</dvdauthor>
My guess is the widescreen="nopanscan" fixes the problem... Your mileage may vary...
Last edited by geeojr on Mon Oct 17, 2005 11:51 am, edited 1 time in total.
User avatar
shiznix
Guru
Guru
Posts: 367
Joined: Sun Jun 29, 2003 4:02 am
Location: Adelaide, Australia

Re: Howto author AVI->DVD with menus using Linux only !

Post by shiznix »

geeojr wrote:
Notes
  • Some NTSC users may experience on their television sets what seems to be a heavy cropping of the video around the edges. This is normal & is called 'overscan'.
    If you are affected by this, add '-j -18,-34,-22,-34' to your transcode lines. See here for more details -> http://www.transcoding.org/cgi-bin/transcode?NTSC
I am affected by this problem -- my widescreen discs are missing information from both ends (and the top/bottom too, not that it matters). But, I have been unsuccessful at getting this to work. The '-j' always pushes my resolution out of norms - my DVD player just will not deal with it... I think there is a more elequant way to fix this problem.

When I examine any other widescreen DVD, they aren't "adjusted" in this manner - and my DVD player shows me everything. The difference between the two isn't how the source material is prepared, it is how the disc is authored, and subsequently instructed to be display by the DVD player.

Examination of the XML description at http://dvdauthor.sourceforge.net/doc/dvdauthor.html revealed something which seems to offer a much simplier solution -- adding the following line to dvdauthor.xml seems to fix this problem for me.

Code: Select all

<video format="ntsc" aspect="16:9" widescreen="nopanscan" />
In its entirety would look like:

Code: Select all

<dvdauthor dest="DVD">
  <vmgm />
  <titleset>
    <titles>
      <video format="ntsc" aspect="16:9" widescreen="nopanscan" />
      <pgc>
        <vob file="clip1.mpg" />
        <vob file="clip2.mpg" />
        <vob file="clip3.mpg" />
        <vob file="clip4.mpg" />
      </pgc>
    </titles>
  </titleset>
</dvdauthor>
My guess is the widescreen="nopanscan" fixes the problem... Your mileage may vary...
Can you (or anyone else) confirm for sure that this fixes the NTSC overscan problem ?
If it does, that would make authoring a little easier as no two NTSC television sets are the same & so the '-j' value is just an average for most.
Over here in the PAL world I have no way of testing NTSC TV playback, would be much appreciated.
User avatar
geeojr
n00b
n00b
Posts: 15
Joined: Tue Feb 11, 2003 11:11 am
Location: Missouri, USA
Contact:

Re: Howto author AVI->DVD with menus using Linux only !

Post by geeojr »

shiznix wrote:
geeojr wrote:

Code: Select all

<video format="ntsc" aspect="16:9" widescreen="nopanscan" />
Can you (or anyone else) confirm for sure that this fixes the NTSC overscan problem ?
I have confirmed it on two seperate DVD players here; but I would love to hear feedback from others.
mongre26
n00b
n00b
Posts: 7
Joined: Tue Oct 18, 2005 2:57 am

Post by mongre26 »

I am starting with following input from my Hauppage WinTV PVR250 which was created within Mythtv 0.15 (I have not gotten around to upgrading). I am trying to get the mpeg output into a VOB so I can burn it to a DVD. I am not having much luck.

Code: Select all

85 audio & 196 video codecs
Playing ../firefly.mpg.
Cache fill:  0.00% (0 bytes)    ID_VIDEO_ID=0
ID_AUDIO_ID=0
MPEG-PS file format detected.
VIDEO:  MPEG2  720x480  (aspect 2)  29.970 fps  6000.0 kbps (750.0 kbyte/s)
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
ID_FILENAME=../firefly.mpg
ID_VIDEO_FORMAT=0x10000002
ID_VIDEO_BITRATE=6000000
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=1.3333
ID_AUDIO_CODEC=mp3
ID_AUDIO_FORMAT=80
ID_AUDIO_BITRATE=384000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_LENGTH=3597
Error opening/initializing the selected video_out (-vo) device.


Exiting... (End of file)
When I use any2vob-0.28.sh I end up with a VOB, if and only if I tell it not to convert the audio to 5.1 channel, as that fails completely. Even though I get a VOB though the audio is completely out of sync and if I move the video (like in xine) the audio does not sync up at all. That is mplayer and xine both get confused about the audio. I am assuming this is bad, or is that ok?

Pretty new at this.
User avatar
der bastler
Apprentice
Apprentice
Posts: 266
Joined: Sun Apr 13, 2003 6:15 pm
Contact:

Post by der bastler »

For those who are interested in howto obtain the BMWFilms quicktime movies (which include comments of the directors and some extra pics)...

First, we use modified URLs of BMWFilms-USA to bypass registration:

Season 1:
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y

Season 2:
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y


In each of these linked pages click on the option "Download Mac" under "Enhanced Film". This will open a small window with download instructions and a file link at the bottom of the instructions page. What you get are .sit files, a Mac compression format. The URLs of the movies I got (don't know if they are dynamically created):

Season 1:
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit

Season 2:
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit

Download these files, perhaps by putting the URLs into a text file and starting wget with the list option:

Code: Select all

wget -i my_url_list_text_file
After downloading the movie archives you have to unpack them. I used stuffit when I created my DVD some time ago. Although it is shareware-something, for unpacking one doesn't need to be registered. On the other hand I discovered macutils today, perhaps they can unpack these sit files, too?

app-arch/stuffit
app-arch/macutil

Anyway, after using unstuff (or macunpack) you should have eight mov files which can be played/transcoded with mplayer/mencoder. Most of them are NTSC material, some are 24 fps. Have fun with transcoding them to proper DVD-NTSC/-PAL! :wink:
Tempus fugit.
@frank@troet.cafe
User avatar
shiznix
Guru
Guru
Posts: 367
Joined: Sun Jun 29, 2003 4:02 am
Location: Adelaide, Australia

Re: Howto author AVI->DVD with menus using Linux only !

Post by shiznix »

geeojr wrote:
shiznix wrote:
geeojr wrote:

Code: Select all

<video format="ntsc" aspect="16:9" widescreen="nopanscan" />
Can you (or anyone else) confirm for sure that this fixes the NTSC overscan problem ?
I have confirmed it on two seperate DVD players here; but I would love to hear feedback from others.
Sweet, I'll include it as an alternative. Even better if it works well with PAL also as it'll be a good inclusion as a 'catch-all' for both PAL/NTSC.
Will test, many many thanks. :wink:
User avatar
shiznix
Guru
Guru
Posts: 367
Joined: Sun Jun 29, 2003 4:02 am
Location: Adelaide, Australia

Post by shiznix »

mongre26 wrote:I am starting with following input from my Hauppage WinTV PVR250 which was created within Mythtv 0.15 (I have not gotten around to upgrading). I am trying to get the mpeg output into a VOB so I can burn it to a DVD. I am not having much luck.

Code: Select all

85 audio & 196 video codecs
Playing ../firefly.mpg.
Cache fill:  0.00% (0 bytes)    ID_VIDEO_ID=0
ID_AUDIO_ID=0
MPEG-PS file format detected.
VIDEO:  MPEG2  720x480  (aspect 2)  29.970 fps  6000.0 kbps (750.0 kbyte/s)
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
ID_FILENAME=../firefly.mpg
ID_VIDEO_FORMAT=0x10000002
ID_VIDEO_BITRATE=6000000
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=1.3333
ID_AUDIO_CODEC=mp3
ID_AUDIO_FORMAT=80
ID_AUDIO_BITRATE=384000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_LENGTH=3597
Error opening/initializing the selected video_out (-vo) device.


Exiting... (End of file)
When I use any2vob-0.28.sh I end up with a VOB, if and only if I tell it not to convert the audio to 5.1 channel, as that fails completely. Even though I get a VOB though the audio is completely out of sync and if I move the video (like in xine) the audio does not sync up at all. That is mplayer and xine both get confused about the audio. I am assuming this is bad, or is that ok?

Pretty new at this.
Does the original file behave ok in mplayer ?
If it does, then run it through mencoder using the line mentioned in the guide first, then use either transcode or the any2vob script on the file mencoder produces.
If their are problems with the original file, then you should probably start at upgrading mythtv, & checking it's settings.
User avatar
shiznix
Guru
Guru
Posts: 367
Joined: Sun Jun 29, 2003 4:02 am
Location: Adelaide, Australia

Post by shiznix »

der bastler wrote:For those who are interested in howto obtain the BMWFilms quicktime movies (which include comments of the directors and some extra pics)...

First, we use modified URLs of BMWFilms-USA to bypass registration:

Season 1:
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y

Season 2:
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y
http://usa.bmwfilms.com/clap.asp?templa ... ypassreg=Y


In each of these linked pages click on the option "Download Mac" under "Enhanced Film". This will open a small window with download instructions and a file link at the bottom of the instructions page. What you get are .sit files, a Mac compression format. The URLs of the movies I got (don't know if they are dynamically created):

Season 1:
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit

Season 2:
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit
http://a177.ch1.akamai.net/7/177/8122/v ... FE_MAC.sit

Download these files, perhaps by putting the URLs into a text file and starting wget with the list option:

Code: Select all

wget -i my_url_list_text_file
After downloading the movie archives you have to unpack them. I used stuffit when I created my DVD some time ago. Although it is shareware-something, for unpacking one doesn't need to be registered. On the other hand I discovered macutils today, perhaps they can unpack these sit files, too?

app-arch/stuffit
app-arch/macutil

Anyway, after using unstuff (or macunpack) you should have eight mov files which can be played/transcoded with mplayer/mencoder. Most of them are NTSC material, some are 24 fps. Have fun with transcoding them to proper DVD-NTSC/-PAL! :wink:
Also, if you download the *.exe video files instead of the *.sit files (Download PC under Enhanced Film), you can just use 'unzip'. eg 'unzip Ambush_EFE.exe'
Get these while you can too, they go off-line on the 21st October, 2005
User avatar
der bastler
Apprentice
Apprentice
Posts: 266
Joined: Sun Apr 13, 2003 6:15 pm
Contact:

Post by der bastler »

shiznix wrote:Also, if you download the *.exe video files instead of the *.sit files (Download PC under Enhanced Film), you can just use 'unzip'. eg 'unzip Ambush_EFE.exe'
Get these while you can too, they go off-line on the 21st October, 2005
Back then I didn't know that one can extract self-extracting archives. Anyway, I'm securing a copy of the sit files right now.
Tempus fugit.
@frank@troet.cafe
User avatar
Zed Sesqui
n00b
n00b
Posts: 2
Joined: Sun Sep 04, 2005 12:41 am
Location: Indiana, USA
Contact:

Post by Zed Sesqui »

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'.
I thought that I was following the directions at the top of the guide, but after some digging I found out that transcode was not only keyword masked, but was also masked in /usr/portage/profiles/package.mask which I didn't expect since none of the other packages that you warn are masked had that additional kind of a mask. Once I found that package.mask entry I was able to dig around with your documentation pointers and find how to override it. The date on the package.mask entry is 8 July 2005.

The starter article in this thread mentions transcode-1.0.1 which I know exists, but here's what happens when I try to force it to emerge:

Code: Select all

ACCEPT_KEYWORDS='~x86' emerge -av '>transcode-1.0.0'

Code: Select all

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

Calculating dependencies   
emerge: there are no ebuilds to satisfy ">transcode-1.0.0".
(When I just 'emerge -av transcode' here, it only builds 1.0.0.)

Thanks for your help! I look forward to making use of this guide.

Bill
mongre26
n00b
n00b
Posts: 7
Joined: Tue Oct 18, 2005 2:57 am

Post by mongre26 »

shiznix wrote:
mongre26 wrote:I am starting with following input from my Hauppage WinTV PVR250 which was created within Mythtv 0.15 (I have not gotten around to upgrading). I am trying to get the mpeg output into a VOB so I can burn it to a DVD. I am not having much luck.
...
Pretty new at this.
Does the original file behave ok in mplayer ?
If it does, then run it through mencoder using the line mentioned in the guide first, then use either transcode or the any2vob script on the file mencoder produces.
If their are problems with the original file, then you should probably start at upgrading mythtv, & checking it's settings.

The problem is that the masked ffmpeg did not work properly I think. When I ran any2vob with the latest stable things seem to have worked and I have a stable VOB.

So I have a synced video/audo vob, I just now need to figure out what to do next.

I do not suppose you could update the instructions to go front to back with any2vob instead of transcode.

Oh and transcode, the latest masked version also just blows up when I try to use it. From what I can tell this is likely due to 64bit issues or other potential problems. I will stick with stable where I can I think.
User avatar
geeojr
n00b
n00b
Posts: 15
Joined: Tue Feb 11, 2003 11:11 am
Location: Missouri, USA
Contact:

Post by geeojr »

Zed Sesqui wrote:The newer versions are masked.

Code: Select all

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

Calculating dependencies   
emerge: there are no ebuilds to satisfy ">transcode-1.0.0".
Add

Code: Select all

media-video/transcode ~x86 
to /etc/portage/package.keywords

and

Code: Select all

>media-video/transcode-1
to /etc/portage/package.unmask

Then try

Code: Select all

# emerge -vp transcode
Shows it would install 1.0.1 for me...
mongre26
n00b
n00b
Posts: 7
Joined: Tue Oct 18, 2005 2:57 am

Post by mongre26 »

Ok so I got my first DVD made in Linux. :) What I am wondering though is why I have black bars around the top and bottom? That is the display is no overscanning to fill in the entire screen.

Here is the command I ran

any2vob-0.28.sh --surround=no --aspect=4:3 --overscan=yes --format=ntsc -i UKC.mpg

However I get what looks like a black border, both in the VOB and when I run it on a standalone DVD player.
User avatar
shiznix
Guru
Guru
Posts: 367
Joined: Sun Jun 29, 2003 4:02 am
Location: Adelaide, Australia

Post by shiznix »

mongre26 wrote:Ok so I got my first DVD made in Linux. :) What I am wondering though is why I have black bars around the top and bottom? That is the display is no overscanning to fill in the entire screen.

Here is the command I ran

any2vob-0.28.sh --surround=no --aspect=4:3 --overscan=yes --format=ntsc -i UKC.mpg

However I get what looks like a black border, both in the VOB and when I run it on a standalone DVD player.
The black border is added as a workaround for NTSC overscan.
You can try disabling overscan by specifying '--overscan=no', if you find the video image to be then slightly cropped around the edges you can try geeojr's idea of specifying

Code: Select all

<video format="ntsc" aspect="4:3" widescreen="nopanscan" />
in the <titles> section of your dvdauthor.xml
User avatar
geeojr
n00b
n00b
Posts: 15
Joined: Tue Feb 11, 2003 11:11 am
Location: Missouri, USA
Contact:

Post by geeojr »

shiznix wrote: if you find the video image to be then slightly cropped around the edges you can try geeojr's idea of specifying

Code: Select all

<video format="ntsc" aspect="4:3" widescreen="nopanscan" />
in the <titles> section of your dvdauthor.xml
I didn't have any problems with 4:3 material; and I think that adding the widescreen="nopanscan" to a 4:3 aspect ratio might not actually change anything since 4:3 isn't widescreen. Not sure; just a thought.
jsermer
n00b
n00b
Posts: 2
Joined: Fri Oct 21, 2005 1:20 am
Contact:

multimux and 2GB filesize limit

Post by jsermer »

I'm trying to multimux a bunch of *.wav files together, but when it gets to 1 byte less than 2GB (2147483647) it dies with the message "File size limit exceeded" (the infamous 2GB filesize limit). I'm using multimux 0.2.4 which is the latest version (I just created a new ebuild in my overlay because it's not in portage) and I also noticed that in version 0.2.2 support was added for filesizes greater than 2GB (according to the CHANGELOG). I've been able to successfully create a 2.5GB file using 'dd'. I'm root and my ulimit for filesizes is set to "unlimited". My configuration is Gentoo Linux with the 2.6.13-r4 kernel (gentoo sources) and the reiserfs filesystem on LVM. Am I missing something?

Any help would be greatly appreciated.

Thanks!
--
Jeremy
User avatar
mds32h
n00b
n00b
Posts: 18
Joined: Wed Jul 13, 2005 7:39 pm
Location: Italy

Post by mds32h »

Hello,

I hope I'm not OT. I'm trying to author a DVD with one main menu, three movies and one slide show. I'm using qDVDAuthor for that. Beginning of October I succeeded and produced a DVD that was readable with a standalone DVD player, but the three movies had no sound. It was a matter of audio format, because the same DVD played well on a PC.

This week I have generated a new version of the same movies, using AC3 audio format instead of mp3 (I used Kino and mencoder, for that). Now I have the same DVD structure as I had some weeks ago, but the authoring stops at the first step. The command (generated by qDVDauthor) and the output are:

Code: Select all

francesco@tworivers ~ $ jpeg2yuv -n 50 -I p -f 25 -j "/tmp/2005-federico-estate/Main Menu VMGM/background.jpg" | mpeg2enc -n p -f 8 -o "/tmp/2005-federico-estate/Main Menu VMGM/menu.m2v"
   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!
   INFO: [mpeg2enc] SETTING SSE and MMX for TRANSFORM!
   INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!
   INFO: [jpeg2yuv] Parsing & checking input files.
   INFO: [jpeg2yuv] YUV colorspace detected.

   INFO: [jpeg2yuv] Starting decompression
   INFO: [jpeg2yuv] Image dimensions are 720x576
   INFO: [jpeg2yuv] Movie frame rate is:  25.000000 frames/second
   INFO: [jpeg2yuv] Non-interlaced/progressive frames.
   INFO: [jpeg2yuv] Frame size:  720 x 576
   INFO: [jpeg2yuv] Number of Loops 1
   INFO: [jpeg2yuv] Now generating YUV4MPEG stream.
   INFO: [jpeg2yuv] Processing non-interlaced/interleaved /tmp/2005-federico-estate/Main Menu VMGM/background.jpg, size 286670
   INFO: [mpeg2enc] Selecting DVD output profile
   INFO: [mpeg2enc] Progressive input - selecting progressive encoding.
   INFO: [mpeg2enc] Encoding MPEG-2 video to /tmp/2005-federico-estate/Main Menu VMGM/menu.m2v
   INFO: [mpeg2enc] Horizontal size: 720 pel
   INFO: [mpeg2enc] Vertical size: 576 pel
   INFO: [mpeg2enc] Aspect ratio code: 1 = 1:1 pixels
   INFO: [mpeg2enc] Frame rate code:   3 = 25.0 (PAL/SECAM VIDEO / converted FILM)
   INFO: [mpeg2enc] Bitrate: 7500 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] DualPrime: no
   INFO: [mpeg2enc] Using one-pass rate controller
   INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 15
   INFO: [mpeg2enc] Setting colour/gamma parameters to "PAL B/G"
   INFO: [mpeg2enc] Progressive format frames = 1
   INFO: [mpeg2enc] Using default unmodified quantization matrices
   INFO: [mpeg2enc] Buffering 33 frames
   INFO: [mpeg2enc] Signaling last frame = -1
   INFO: [mpeg2enc] SETTING MMX and MMX for QUANTIZER!
   INFO: [mpeg2enc] NEW GOP INIT length 15
Segmentation fault
As you can see, the process ends with a segfault. I am convinced that this is due to something that happened with my last emerge -u world, one week ago, but I have no idea what's the matter.

I have googled around and searched this forum, but the only thing I found is bug [bug=]108810[/bug], that seems to be strictly related to what I am having. In the comments I posted to that bug you can also see my emerge --info and another example of segfault backtraced in gdb.

The bug has been classified as minor, but for what I am concerned it is blocking the use of mjpegtools. Maybe re-emerging mjpegtool with all its dependencies could solve the problem? If yes, sorry to ask a maybe trivial question, how do I force emerge to do it? The emerge --deep mjpegtools command is not enough:

Code: Select all

tworivers francesco # emerge --deep -p mjpegtools

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

Calculating dependencies ...done!
[ebuild   R   ] media-video/mjpegtools-1.8.0
While equery g mjpegtools shows a 79 packages dependency tree!

Thank you for any answer or comment.
User avatar
radagast
Apprentice
Apprentice
Posts: 217
Joined: Sat Mar 20, 2004 1:54 am
Location: sydney, .au
Contact:

Post by radagast »

i know this isn't a real solution to the problem,
but dvdstyler uses mplex instead of mpeg2enc, so it might work for you.

(and thanks to shiznix for the bmw films)
mongre26
n00b
n00b
Posts: 7
Joined: Tue Oct 18, 2005 2:57 am

Post by mongre26 »

shiznix wrote:
mongre26 wrote:Ok so I got my first DVD made in Linux. :) What I am wondering though is why I have black bars around the top and bottom? That is the display is no overscanning to fill in the entire screen.

Here is the command I ran

any2vob-0.28.sh --surround=no --aspect=4:3 --overscan=yes --format=ntsc -i UKC.mpg

However I get what looks like a black border, both in the VOB and when I run it on a standalone DVD player.
The black border is added as a workaround for NTSC overscan.
You can try disabling overscan by specifying '--overscan=no', if you find the video image to be then slightly cropped around the edges you can try geeojr's idea of specifying

Code: Select all

<video format="ntsc" aspect="4:3" widescreen="nopanscan" />
in the <titles> section of your dvdauthor.xml
No effect, the black bars are there regardless of this switch. Basically the image looks shrunk from the original with extremely large black area all around it.

here is the ffpmeg output

ffmpeg -y -i UKC.mpg -map 0:1 -ar 48000 -ab 384 -ac 2 tmp_any2vob/UKC.ac3 -map 0:0 -f mpeg2video -s 720x480 -padtop 38 -padleft 34 -padbottom 42 -padright 34 -hq -b 5000 -r ntsc - 2> /dev/null | ffmpeg -y -i - -hq -b 5000 -bufsize 224 -maxrate 7000 -s 720x480 -aspect 4:3 -r ntsc -f mpeg2video tmp_any2vob/UKC.m2v


I assume the part I want to stop is the -padtop 38 -padleft 34 -padbottom 42 -padright 34 but the option has no effect in turning this off.

Here is the output with overscan==yes

ffmpeg -y -i UKC.mpg -map 0:1 -ar 48000 -ab 384 -ac 2 tmp_any2vob/UKC.ac3 -map 0:0 -f mpeg2video -s 720x480 -padtop 38 -padleft 34 -padbottom 42 -padright 34 -hq -b 5000 -r ntsc - 2> /dev/null | ffmpeg -y -i - -hq -b 5000 -bufsize 224 -maxrate 7000 -s 720x480 -aspect 4:3 -r ntsc -f mpeg2video tmp_any2vob/UKC.m2v

The end result of this feature is that the output is cropped on all sides, and that includes on my NTSC TV.

I guess the script needs some hacking...
mongre26
n00b
n00b
Posts: 7
Joined: Tue Oct 18, 2005 2:57 am

Post by mongre26 »

I did not have the patience to go through the script and identify why the image was getting padding when I told it not to, so I just turned every instance of setting the crop values to "". Now I get the output from the scrip that I put into it, namely my fullscreen image...granted I should trim the edges a smidge as there are some residual few pixels of black on the right and left from source, but the image does not have the gratuitious black bars on all sides now that showed up in the final DVD on my NTSC standard 4:3 TV.
User avatar
mds32h
n00b
n00b
Posts: 18
Joined: Wed Jul 13, 2005 7:39 pm
Location: Italy

Post by mds32h »

radagast wrote:i know this isn't a real solution to the problem,
but dvdstyler uses mplex instead of mpeg2enc, so it might work for you.
Thanks for the suggestion, radagast, better a bypass for a problem than nothing, but unfortunately DVDStyler is crashing too. I cannot catch the output text (in the DVDStyler Manual there is a reference to a log file, but with version 1.4 I've found no way to specify it), I can only see that's on mpeg2enc, again. It is during the first phase of the process, therefore I guess mpeg2enc is called to generate the main menu with a background image (it is called just after ppmtoy4m).

I've no idea what to do, now: it seems my system is someway broken: I'll try to un-merge and emerge again mjpegtools (even if the author of bug 108810 did not succeed, doing so). If you have any other suggestion ...

[edit]

Code: Select all

emerge -C mjpegtools-1.8.0 
emerge "<media-video/mpegtools-1.8.0"
has been enough (a downgrade of ImageMagick has been needed too): now it seems to work again.
[/edit]
Hamman
n00b
n00b
Posts: 49
Joined: Thu Jun 09, 2005 10:19 pm
Location: Sweden

Post by Hamman »

I'm having a problem with multiplexing audio and video. I used Avidemux to merge and encode the two .avi-files. I also used Audio -- Save Audio to save my AC3-file. Now that I try to merge them using the mplex command i the guide i get

Code: Select all

**ERROR: [mplex] Can't find next AC3 frame: @ 178911488 we have 9ede - broken bit-stream=
It's happening about halfway trough the movie. Should I encode each file separetely instead?
bludger
Guru
Guru
Posts: 389
Joined: Wed Apr 09, 2003 7:14 am

Slight audio sync problem

Post by bludger »

Thanks for the above guide. I played around with the suggestions in the
guide and eventually came up with a solution that works fairly well for me.

transcode
-i dvfile.dv
-x mplayer,mplayer
-y ffmpeg
--export_prof dvd-pal -N 0x50
-o outputfile
--encode_fields b
--export_asr 3
--import_asr 3
-m outputfile.mp2

mplex
-f 8
-V
-o outputfile.mpg
outputfile.m2v
outputfile.mp2

This produces an mpeg file that I can burn as a dvd. After a few minutes of playing, however, there is a <i>slight</i> audio sync problem. It is barely noticeable, but slightly disturbing. You can only really notice it when you play a scene with voice and lips moving over and over, but when you view it without paying attention, you still get a slight sense that something is wrong. When I played the original dv file, however, everything was perfectly in sync.

Now I recently used dvd:rip to produce an mpeg4 file with the xvid codec. The command line that dvd:rip produces is as follows (second pass only shown):

transcode -H 10
-a 0
-T 1,-1,1
-x dvd
-i <input directory>
-w 1849
-b 192,0,0
--a52_drc_off
-J smartyuv=threshold=10:Blend=1:diffmode=2:highq=1
-f 25
-Y 0,6,0,10
-B 6,2,8
-R 2
-y xvid4
-o <output file>.avi
--print_status 20

This produces a perfectly synchronised mpeg4 file, with audio and video interleaved. Note that there is no subsequent mplex step necessary - xvid seems to interleave the audio and video information on the fly, which is probably why there are no sync problems. Is there a way to do the same when producing mpeg2? Is this a deficiency with the ffmpeg codec or some inherent mpeg2 attribute? Is there some other solution to my problem that anyone can think of?
User avatar
shiznix
Guru
Guru
Posts: 367
Joined: Sun Jun 29, 2003 4:02 am
Location: Adelaide, Australia

Re: Slight audio sync problem

Post by shiznix »

bludger wrote:Thanks for the above guide. I played around with the suggestions in the
guide and eventually came up with a solution that works fairly well for me.

transcode
-i dvfile.dv
-x mplayer,mplayer
-y ffmpeg
--export_prof dvd-pal -N 0x50
-o outputfile
--encode_fields b
--export_asr 3
--import_asr 3
-m outputfile.mp2

mplex
-f 8
-V
-o outputfile.mpg
outputfile.m2v
outputfile.mp2

This produces an mpeg file that I can burn as a dvd. After a few minutes of playing, however, there is a <i>slight</i> audio sync problem. It is barely noticeable, but slightly disturbing. You can only really notice it when you play a scene with voice and lips moving over and over, but when you view it without paying attention, you still get a slight sense that something is wrong. When I played the original dv file, however, everything was perfectly in sync.

Now I recently used dvd:rip to produce an mpeg4 file with the xvid codec. The command line that dvd:rip produces is as follows (second pass only shown):

transcode -H 10
-a 0
-T 1,-1,1
-x dvd
-i <input directory>
-w 1849
-b 192,0,0
--a52_drc_off
-J smartyuv=threshold=10:Blend=1:diffmode=2:highq=1
-f 25
-Y 0,6,0,10
-B 6,2,8
-R 2
-y xvid4
-o <output file>.avi
--print_status 20

This produces a perfectly synchronised mpeg4 file, with audio and video interleaved. Note that there is no subsequent mplex step necessary - xvid seems to interleave the audio and video information on the fly, which is probably why there are no sync problems. Is there a way to do the same when producing mpeg2? Is this a deficiency with the ffmpeg codec or some inherent mpeg2 attribute? Is there some other solution to my problem that anyone can think of?
Transcode really is a wonderful tool, but for encoding from a DV source, I recommend the use of mjpegtools exclusively.
Not only is it's quality far superior to anything else for DV, but it also handles interlaced PAL/NTSC conversions beautifully.

Here's a quick run down in it's most simplest form...

Create the video stream:

Code: Select all

lav2yuv -P 4:3 file.dv | mpeg2enc -a2 -f8 -s -o file.m2v
Create the audio stream:

Code: Select all

lav2wav file.dv > file_tmp.wav
ffmpeg -i file_tmp.wav -ar 48000 -ab 384 -ac 2 file.ac3
Then mplex:

Code: Select all

mplex -f8 -o file.vob file.m2v file.ac3
If you require converting either aspect ratio or PAL/NTSC format, then look at the dv_avi() function in any2vob.
bludger
Guru
Guru
Posts: 389
Joined: Wed Apr 09, 2003 7:14 am

Post by bludger »

Thanks for this, but when I try it I get the following error

Code: Select all

lav2yuv dvfile.dv
Unable to identify file (not a supported format - avi, quicktime).
**ERROR: [lav2yuv] Error opening dvfile.dv
The file was grabbed with:
dvgrab -i --timestamp --format raw --size 0
Post Reply