View previous topic :: View next topic |
Author |
Message |
darkmanPPT Veteran


Joined: 13 Apr 2006 Posts: 1069 Location: vi/bo
|
Posted: Sun Aug 05, 2007 10:56 am Post subject: Problem in encoding Divx avi to PAL dvd with mencoder |
|
|
Hi,
I am converting a Divx movie to PAL DVD fomat, with mencoder. The original movie is an avi file with resolution 640x336. I want to encode it to a PAL DVD, 720x576, with aspect ratio 16:9. Following mencoder documentation and various Howtos, I use the following command:
Code: |
# mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf crop=$1,scale=720:544,expand=720:576,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 -o out.mpg in.avi
|
The scale factor 720:544 has been obtained in order to keep the original aspect ratio, as described in the HOWTO "mencoder divx to dvd". The formula I used is:
xscale = 720 (the PAL DVD horizontal resolution)
yscale = 576*16/9*336/640 = 538,
where 576 is the PAL DVD vertical resolution, and 640x336 is the resolution of the original DivX file. Then, as suggested in the mencoder documentation, I rounded yscale to the nearest multiple of 16, that is, 544.
If I play the output movie out.mpg with mplayer, everything seems ok (but see later).
Then I create the dvd with:
Code: |
# dvdauthor -o dvd/ -t out.mpg
# dvdauthor -o dvd/ -T
|
The problem is the following. When I put the DVD in my home DVD player (PAL, with a 4:3 screen), the resulting movie is "cropped" on the left and right sides. That is, it seems like the movie is too large on the horizontal axis and the DVD player cuts it. Adding the option --video=pal+16:9+720x576 to dvdauthor does not change the result.
It seems like the DVD player does not recognize the 16:9 format correctly. I noticed that if I put a "real" dvd in my computer, mount the dvd and manually use mplayer to play a VOB file, mplayer states "VIDEO: MPEG2 720x576 (aspect 2)", while on a movie generated with the above commands, it says "VIDEO: MPEG2 720x576 (aspect 3)".
Anybody has a clue?
Thanks. _________________ Darkman |
|
Back to top |
|
 |
Abraxas l33t


Joined: 25 May 2003 Posts: 814
|
Posted: Sun Aug 05, 2007 7:42 pm Post subject: Re: Problem in encoding Divx avi to PAL dvd with mencoder |
|
|
darkmanPPT wrote: | Hi,
I am converting a Divx movie to PAL DVD fomat, with mencoder. The original movie is an avi file with resolution 640x336. I want to encode it to a PAL DVD, 720x576, with aspect ratio 16:9. Following mencoder documentation and various Howtos, I use the following command:
Code: |
# mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf crop=$1,scale=720:544,expand=720:576,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 -o out.mpg in.avi
|
The scale factor 720:544 has been obtained in order to keep the original aspect ratio, as described in the HOWTO "mencoder divx to dvd". The formula I used is:
xscale = 720 (the PAL DVD horizontal resolution)
yscale = 576*16/9*336/640 = 538,
where 576 is the PAL DVD vertical resolution, and 640x336 is the resolution of the original DivX file. Then, as suggested in the mencoder documentation, I rounded yscale to the nearest multiple of 16, that is, 544.
If I play the output movie out.mpg with mplayer, everything seems ok (but see later).
Then I create the dvd with:
Code: |
# dvdauthor -o dvd/ -t out.mpg
# dvdauthor -o dvd/ -T
|
The problem is the following. When I put the DVD in my home DVD player (PAL, with a 4:3 screen), the resulting movie is "cropped" on the left and right sides. That is, it seems like the movie is too large on the horizontal axis and the DVD player cuts it. Adding the option --video=pal+16:9+720x576 to dvdauthor does not change the result.
It seems like the DVD player does not recognize the 16:9 format correctly. I noticed that if I put a "real" dvd in my computer, mount the dvd and manually use mplayer to play a VOB file, mplayer states "VIDEO: MPEG2 720x576 (aspect 2)", while on a movie generated with the above commands, it says "VIDEO: MPEG2 720x576 (aspect 3)".
Anybody has a clue?
Thanks. |
Try playing the ISO directly with mplayer before you burn it and see if it still has that problem on you computer. Test out the DVD in mplayer after it is burned also. It's possible that your DVD is set to get the resolution automatically and it is not working on the burned disk. Set it manually and see if that works. |
|
Back to top |
|
 |
darkmanPPT Veteran


Joined: 13 Apr 2006 Posts: 1069 Location: vi/bo
|
Posted: Mon Aug 06, 2007 8:16 pm Post subject: Re: Problem in encoding Divx avi to PAL dvd with mencoder |
|
|
Abraxas wrote: |
Try playing the ISO directly with mplayer before you burn it and see if it still has that problem on you computer. Test out the DVD in mplayer after it is burned also. It's possible that your DVD is set to get the resolution automatically and it is not working on the burned disk. Set it manually and see if that works. |
Thanks for the suggestion. I tested the dvd with mplayer, before burning by reading the dvd filesystem
Code: |
# mplayer dvd://1 -dvd-device dvd/
|
and then, after burning, by reading the dvd with mplayer
Code: |
# mplayer dvd://1 -dvd-device /dev/cdrw
|
In both cases the movie is ok. However, in my DVD player the movie appears cropped on the left and right side.
In setting the DVD player video output, I have 3 choices:
- 4:3 panscan
- 4:3 letterbox
- 16:9
As I have a 4:3 TV, the right choice is the second one. It is also the current setting of the DVD player, however the movie appears cropped. The same result is obtained if I set 16:9 output and I set my TV to the 16:9 source input. If I choose 4:3 panscan on the DVD player, the result is even worse: the cropped sides are even larger.
So, the default behaviour of the DVD would suggest that it is automatically setting the panscan mode. However, this is not true, since if I manually select the panscan output the movie is even more cropped. This means that the DVD player is cropping the left and right sides before showing the output.
Could this be a bug in the DVD player? _________________ Darkman |
|
Back to top |
|
 |
|
|
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
|
|