576 +46 +66 = 688 . I think it must be adding the padding after -target pal-dvd
+ Reply to Thread
Results 31 to 60 of 67
-
-
DVD Resolutions are:
NTSC
720x480 or 704x480
PAL
720x576 or 704x576
There are other resolutions that can be used but these are the standard resolutions. Almost every commercial DVD uses 720x480 NTSC or 720x576 PAL"The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
According to FitCD a resolution of 544x256 (assuming this is 1:1 pixel resolution) should be resized to 720x496 with a padding of 40 (on the top) and 40 (on the bottom). This will make a 16x9 720x576 PAL DVD compliant image with the correct aspect ratio.
Again FitCD is simply a tool to help one see how to properly resize a source for a destination type, or in this case, from AVI to PAL DVD.
*** EDIT ***
Your MediaInfo output on the source says the aspect ratio is 2.125 and that is what I'm getting in FitCD when I enter 544x256 using 1:1 pixel resolution so yeah my numbers above are correct.
Unfortunately it isn't going to look pretty because your resolution is fairly low (in the original). You might be better off making this a 4:3 WS PAL DVD instead of a 16x9 WS PAL DVD but only if the intended TV is a 4:3 TV
Resizing to 720x368 and padding the top 104 and the bottom 104 will give you a 4:3 WS PAL DVD but again this only makes sense if watching it on a 4:3 TVLast edited by FulciLives; 26th Aug 2012 at 13:56.
"The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
Yes, you are right, I did not see the Height in the output of mediainfo. Thank you for telling me. The trouble is that I can not guess how does ffmpeg choose the height as function of my parameters. For example:
Code:-s 720x466 -padtop 2 -padright 0 -padbottom 2 -padleft 0
Code:-s 720x464 -padtop 2 -padright 0 -padbottom 2 -padleft 0
-
-
-
Originally Posted by doru001
So whatever ffmpeg commands you are using it seems to be adding the padding after resizing to 720x576
What you want is something that resizes 544x256 to 720x496 and then pads 40 on top/bottom to make it 720x576
But whatever you are doing ... it isn't working that way.
I don't know ffmpeg commands and I'm not about to learn so ... good luck."The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
I'm using now:
Code:ffmpeg -i file.avi -target pal-dvd -s 720x464 -padtop 56 -padright 0 -padbottom 56 -padleft 0 -acodec ac3 -ab 448000 -mbd 2 -qscale 1.0 -aspect 16:9 file.mpg
-
-
Sorry, I've been busy this afternoon - forgot to check in on this thread.
Glad you've got it sorted. There doesn't seem to be any logic to why the position of -target makes a difference here. If it's a bug, it could well have been fixed in later versions of ffmpeg.
uh oh- and I was having to give suggestions for this older version of ffmpeg blindly
But with regard to the scaling and padding, putting -target before those options doesn't make any sense. But, if it works...
EDIT: actually, it does make sense. If -target:
- always uses the original videos dimensions as a basis for calculating the re-scaling needed to make the resolution DVD compliant
- ignores any changes in frame size by using the -s and pad parameters
- applies what it thinks is the right scaling correction - but does this wherever it's placed in the argument list
That would explain what we're seeing.Last edited by intracube; 26th Aug 2012 at 15:49.
-
If the aspect ratio is correct on the original AVI then my resizing numbers are correct.
However I have seen AVI files with an incorrect aspect ratio. For instance something that should be perfectly round (like the tire of a car) won't be and that's because the person who made the AVI managed to **** up the aspect ratio. In which case you have to eyeball it when resizing to fix their aspect ratio mistake.
However if the aspect ratio on the original IS correct (and things that should be perfectly circular are in fact perfect circles) then you have to keep it the same aspect ratio when resizing or you end up changing the aspect ratio.
I mention circular objects because that's one of the best ways to tell if the aspect ratio is off or not. Look for car tires or clocks (most are perfectly round) or the sun or anything like that which may be in the video.
Also don't get confused over 16x9 WS anamorphic enhancement and the real aspect ratio. For instance the original video, at 544x256, has an aspect ratio of 2.125:1 and my resizing numbers will keep the aspect ratio at 2.125 but make it 16x9 WS anamorphic enhanced.
Here's an example of what I'm talking about:
The following image is 544x256 and has an aspect ratio of 2.125 and is taken from an XviD AVI file
Now when you take this and convert it to PAL DVD with 16x9 WS anamorphic enhancement you get the following image:
Please note that the 2nd image is 720x576 but is stretched. That's 16x9 WS anamorphic enhancement. Now when this gets played back on a 16x9 WS TV then the image gets stretched out to the proper aspect ratio and becomes the following:
That last image is the same as the second one, but stretched out from 720x576 to 1024x576 and this is what a DVD player does when displaying a 16x9 WS anamorphic enhanced DVD. It's basically a trick to get more resolution out of the DVD spec. Of course in this case it doesn't look ultra sharp because the original source of the DVD was a low resolution video at 544x256
- John "FulciLives" Coleman"The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
Just a quick update - the problem with ffmpeg and the -target option has been fixed in the last few months.
Not sure exactly when it was fixed; 0.11.1 has the problem, but a newly compiled version of ffmpeg from a current snapshot of the source code doesn't.
So I didn't actually need to submit a bug report yesterday. I was accidentally running the older version of ffmpeg instead of the up-to-date self-compiled version - and thought the bug was still present... -
Thank you, I finally understand what you say. Moreover, I can see the video correctly on a 4:3 computer monitor but probably it would be distorted on the WS TV, so I have to use your data.
The original scale is correct. I did use round objects to eye scale the video, indeed they are the best.
Indeed, the original has a low resolution. It has been compressed to fit a CD.
I'll post here the results.Last edited by doru001; 27th Aug 2012 at 07:37. Reason: everything
-
Last edited by doru001; 27th Aug 2012 at 07:29.
-
Short summary: -target after -s cancelled -s. Because of padding, the resulting image was too tall. Being too tall, it looked blurred.
Horizontal red lines on fast motion: they are also visible in the original video, but are very faint. mencoder without yadif sharpened the video, including the horizontal lines. This again made ffmpeg image look blurred, by contrast. mencoder with yadif fainted them back again. I don't know why.
Video formatting is not a walk in a park, but I start to like it. Thank you all for your great help.
PS: intracube: Why do you add -mbd 2 in ffmpeg? How did you get to this option?Last edited by doru001; 27th Aug 2012 at 07:36. Reason: PS
-
One last comment I want to make about 16x9 WS anamorphic enhancement.
This is done so the image looks better on a 16x9 WS TV but the DVD player will resize the image to fit a 4:3 TV or a 16:9 TV so it will work and look proper either way. That is why you have to tell the DVD player what type of TV it is plugged into (in the set-up menu).
So in short you should always encode 16x9 WS anamorphic when you have a widescreen source UNLESS you never ever expect to watch it on anything BUT a 4:3 TV but if you ever then get a 16x9 TV you will curse yourself for not having made 16x9 WS DVD's LOL
OK just wanted to make sure that was clear!"The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
There are two separate bugs here:
1. With old versions of ffmpeg (like your version - 0.5.9) placing the -target option after -s and pad causes the image size to end up wrong (too tall in your case). As you've found, putting it before the -s and pad options is a workaround.
2. in more recent versions of ffmpeg, -target caused a different problem with the -vf (Video Filters). The source video would be resized (non-interlace aware scaling) before the video filters - for interlaced video, this caused the pixels of the odd/even interlaced scan lines to merge into each other and stopped de-interlacing filters like yadif from working. (Putting -target before/after the -vf filters didn't make any difference.)
Both these problems appear to be fixed. The old pad options no longer exist - they've been integrated into the -vf video filters. The second bug has only recently been fixed. You will need to wait for the next stable version of ffmpeg (after 0.11.1) or compile your own from source.
If you haven't read about ffmpeg's Video Filters - they're a relatively new feature and give a lot more control over the video. In addition to scaling, cropping and padding, there are now controls for colour correction, sharpening, and also higher quality de-interlacing with yadif, etc.
As I mentioned, some of the old options like padleft, padtop, etc have been moved to the video filters. To re-size and pad an image:
in older versions of ffmpeg:
-s 720x464 -padtop 56 -padright 0 -padbottom 56 -padleft 0
in newer versions of ffmpeg, to do exactly the same thing using the video filters:
-vf scale=720:464,pad=720:576:0:56
Each filter option is now in a comma separated list. Any number of filters can be listed together in this way.
Also, in older versions of ffmpeg there was only one option for de-interlacing (-deinterlace), and this gave poor results compared to de-interlace filters like yadif:
*right click and open image in new tab or window and make sure zoom is at 100% (1:1px)
**text should read "ffmpeg used to have more limited controls for adjusting the video compared to mencoder"
When the next version of ffmpeg is available (the version after 0.11.1) I'd recommend updating to it. -
FulciLives: I have a question. I want to resize 544/256 to 1024/x. x=1024*256/544=481.8823529~=482. However, you say that I should use 496. Why?
intracube: Total disaster, of course. I needed to concatenate two input files, and my old ffmpeg does not do that. It multiplexes the input files, one video and one audio, or something like that (the man is incomplete). I went hunting for PPA's. Then I finally understood why is my ffmpeg so outdated. It has been a fork. The big boss went one way, the group of programmers another (http://askubuntu.com/questions/32189/what-are-the-implications-of-the-ffmpeg-libav-fork-for-users). This happened with disk writing utilities, too (http://ubuntuforums.org/showthread.php?t=1677034). This is bad, because the big boss controls the official distribution and makes life difficult to those who need the good version. So I went to the outcast ffmpeg (http://ffmpeg.org/download.html, https://launchpad.net/~jon-severinsson/+archive/ffmpeg). Of course, I rely on your example for the new version.
About deinterlacing, I would understand that image if I would have learned about it already. However, I do not need it now, I believe. mediainfo was supposed to discover it, right? Interesting enough, mediainfo does not say that output file is PAL. Does PAL result from a set of parameters reported by mediainfo?Last edited by doru001; 27th Aug 2012 at 16:08.
-
If you recall I made an XviD AVI with a resolution of 544x256 so that I had a file similar to the one you were working with. I think I even uploaded it here (see my post about this on page 1 of this thread) to give you the same file (in case you needed to play around with ffmpeg or HCenc and needed a similar source but one that was short and therefore could be encoded quickly ... my file is only a 53 second clip).
Anyway when I load this into FitCD it says to resize it to 720x496 (see FitCD image below)
FitCD has been around for years and it don't lie
Your confusion probably stems from the fact that DivX/XviD AVI files use 1:1 pixels (square pixels) whereas DVD uses rectangular pixels which obviously aren't 1:1 pixels NOT to mention that NTSC DVD and PAL DVD get resized differently. I mean 720x480 can be 4:3 for NTSC but for PAL it is 720x576 yet both are 4:3 ratios. Also 16x9 can fit in the same window but again they get resized differently. For instance PAL 16x9 at 720x576 gets stretched out to 1024x576 whereas NTSC 16x9 at 720x480 gets stretched out to roughtly 853x480
Anyway that is why tools like FitCD exist. It makes it fool proof to get your resizing correct."The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
The syntax to join several files together in recent versions of ffmpeg (on Linux):
Code:ffmpeg -i concat:input1.mp4\|input2.mp4\|input3.mp4
*the resolution and framerate of the input files must match or concat won't work.
- the backslashes might not be needed on other operating systems
Then I finally understood why is my ffmpeg so outdated. It has been a fork. The big boss went one way, the group of programmers another (http://askubuntu.com/questions/32189/what-are-the-implications-of-the-ffmpeg-libav-fork-for-users). This happened with disk writing utilities, too (http://ubuntuforums.org/showthread.php?t=1677034). This is bad, because the big boss controls the official distribution and makes life difficult to those who need the good version. So I went to the outcast ffmpeg (http://ffmpeg.org/download.html)
About deinterlacing, I would understand that image if I would have learned about it already. However, I do not need it now, I believe. mediainfo was supposed to discover it, right?
Interesting enough, mediainfo does not say that output file is PAL. Does PAL result from a set of parameters reported by mediainfo?
Digital video shouldn't be called PAL as it refers to the analogue tv signal, but it's sometimes used as identification for 25fps video. -
Why do you want to resize to 1024x482?? The DVD resolution should be 720x576 (or 704x576).
As to the reason for 496px instead of 482 - some video codecs need the resolution to be mod16. 496 is mod16, 482 isn't.
I don't know why FitCD chooses 496 over 480 though.
If you posted some stills from your source video, we might be able to suggest what the aspect ratio should be. -
Thanks, I did not know that. And it is not clearly stated in the documentation.
Well, not for Ubuntu.
It is the old version, which I used until now. No filters etc. And more than two times slower, in my case.
There is idet in ffmpeg. How should I use it?
You are right, I had the wrong vertical size, 688. -
-
I know about these now, I read http://en.wikipedia.org/wiki/Pixel_aspect_ratio.
-
-
Keep the clip around 30 seconds ... maybe 60 seconds tops ... and that is A-OK despite the source. Even if it is copyrighted it would fall under 'fair use'
"The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
The image I see on the dvdplayer is cropped on the left and right margins. Is is cropped a lot for 702:482 and less (I believe) for 720:496. Maybe I should add another 16 to 496?
-
This is what we call TV OVERSCAN
http://en.wikipedia.org/wiki/Overscan
If you have a modern TV like some sort of flat panel LCD or Plasma etc. then you might be able to turn it off but if it is an older tube type TV or some sort of rear projection then you cannot."The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
Last edited by doru001; 31st Aug 2012 at 10:21. Reason: completion
Similar Threads
-
How to convert MKV to AVI or OGM to AVI using mencoder
By Baldrick in forum User guidesReplies: 75Last Post: 17th Dec 2013, 11:19 -
How To: Choose Your Own Adventure Film?
By morari in forum Authoring (DVD)Replies: 2Last Post: 3rd Mar 2010, 23:18 -
Mencoder line help for trekstor i.beat move player [linux] - (solved)
By tolostoi in forum Video ConversionReplies: 0Last Post: 2nd Jul 2009, 02:10 -
Vegas 8: Overlay text in multimcamera mode?
By stantheman1976 in forum EditingReplies: 0Last Post: 4th Feb 2008, 13:08 -
Worse video quality on Linux than Windows with mencoder
By chiun in forum Video ConversionReplies: 1Last Post: 19th Dec 2007, 03:29