I have a few video files that have already been converted to DVD
compatible mpg format, but the problem is that they are 4x3 letterbox and
not proper 16x9.
I've tried cropping them Avidemux but it wants to format the file (if you
use filters, which you have to if you want to crop), leading to
degredation in picture quality. I've also tried ffmpeg with -sameq but
ended up with a huge filesize.
I've also tried -vcodec copy -acodec copy but this gave me a file that,
when played in mplayer, reported "no audio", and the filesize was also
huge.
Does anybody know a method for /just/ cropping without any formatting?
Tia
Suggest you take a look at transcode, which is a quite good and powerful tool
to manipulate video.
--
//Aho
You can't modify the actual video frames without re-encoding. It just
isn't possible. You're always going to get some loss of quality. But,
if you do it right, it shouldn't be noticeable.
You could try ffmpeg with -croptop -cropbottom -cropleft -cropright
-target dvd parameters (recommended for mpeg files). Or you could try
mencoder with -of mpeg -vf crop=w:h:x:y,scale=x:y -oac copy -ovc lavc
and -lavcopts vcodec=mpeg2video:vhq:vqscale=4:aspect=4/3 parameters
(which I have found useful for cropping - except that I use mpeg4 and
convert to mpeg2 later, after editing). This will take time to encode,
of course, but will produce good results. You could adjust the vqscale
parameter, if using mplayer, to trade off encoding speed and quality.
--
Dig the sig!
----------- Peter 'Shaggy' Haywood ------------
Ain't I'm a dawg!!
> Groovy hepcat Mike Jones was jivin' in alt.os.linux on Sun, 30 Jan 2011
> 8:32 am. It's a cool scene! Dig it.
>
>> I have a few video files that have already been converted to DVD
>> compatible mpg format, but the problem is that they are 4x3 letterbox
>> and not proper 16x9.
>>
>> I've tried cropping them Avidemux but it wants to format the file (if
>> you use filters, which you have to if you want to crop), leading to
>> degredation in picture quality. I've also tried ffmpeg with -sameq but
>> ended up with a huge filesize.
>>
>> I've also tried -vcodec copy -acodec copy but this gave me a file that,
>> when played in mplayer, reported "no audio", and the filesize was also
>> huge.
>>
>> Does anybody know a method for /just/ cropping without any formatting?
>
> You can't modify the actual video frames without re-encoding. It just
> isn't possible. You're always going to get some loss of quality. But, if
> you do it right, it shouldn't be noticeable.
> You could try ffmpeg with -croptop -cropbottom -cropleft -cropright
> -target dvd parameters (recommended for mpeg files).
This generates a massive filesize.
> Or you could try
> mencoder with -of mpeg -vf crop=w:h:x:y,scale=x:y -oac copy -ovc lavc
> and -lavcopts vcodec=mpeg2video:vhq:vqscale=4:aspect=4/3 parameters
I'll give this a go and see what happens.
> (which I have found useful for cropping - except that I use mpeg4 and
> convert to mpeg2 later, after editing). This will take time to encode,
> of course, but will produce good results. You could adjust the vqscale
> parameter, if using mplayer, to trade off encoding speed and quality.
Speed isn't the problem, the huge sie of the output file is.
I'm wondering why this happens. All thats required is the same data in
the same format, just with some cropping, which should mean a smaller
file, not a massively larger one?
Are you sure they aren't dvd-incompatible h.264 mpeg files?
what's the problem with 4x3?
--
⚂⚃ 100% natural
Originally converted to DVD complient mpg files using Avidemux, and
recording from a Freeview+ box come with a 16x9 movie in a letterbox in a
4x3 frame (thick black blocks top and bottom to make it 4x3), which kinda
screws the point of having a 16x9 screen to watch stuff on.
Anyhoo, it does indeed look as if I can't just crop without reprocessing,
though it does seem odd that I can't reprocess same-to-same without
generating a massive output file.
May I ask why you are cropping the files to begin with? If you are
playing the file on a computer connected to a TV, you can just crop them
in your player, on the fly, with no loss in quality. Mplayer, and all
others, support this.
Any way, try avidmux, a simple an powerful editing tool. Should help.
- B
Note comments regarding file size.
> Any way, try avidmux, a simple an powerful editing tool. Should help.
>
Note comments regarding Avidemux.
> Responding to Peter 'Shaggy' Haywood:
>
>> Groovy hepcat Mike Jones was jivin' in alt.os.linux on Sun, 30 Jan
>> 2011 8:32 am. It's a cool scene! Dig it.
>>
>>> I have a few video files that have already been converted to DVD
>>> compatible mpg format, but the problem is that they are 4x3
>>> letterbox and not proper 16x9.
[Snip...]
>>> Does anybody know a method for /just/ cropping without any
>>> formatting?
>>
>> You can't modify the actual video frames without re-encoding. It
>> just
>> isn't possible. You're always going to get some loss of quality. But,
>> if you do it right, it shouldn't be noticeable.
>> You could try ffmpeg with -croptop -cropbottom -cropleft -cropright
>> -target dvd parameters (recommended for mpeg files).
>
> This generates a massive filesize.
Well, perhaps you need to fiddle with the encoding parameters a bit.
Sacrifice a bit of quality for size.
>> Or you could try
>> mencoder with -of mpeg -vf crop=w:h:x:y,scale=x:y -oac copy -ovc lavc
>> and -lavcopts vcodec=mpeg2video:vhq:vqscale=4:aspect=4/3 parameters
>
> I'll give this a go and see what happens.
Your results will be similar to using ffmpeg. But, again, you can
fiddle with the parameters to see what works best.
>> (which I have found useful for cropping - except that I use mpeg4 and
>> convert to mpeg2 later, after editing). This will take time to
>> encode, of course, but will produce good results. You could adjust
>> the vqscale parameter, if using mplayer, to trade off encoding speed
>> and quality.
>
> Speed isn't the problem, the huge sie of the output file is.
Adjusting vqscale will also affect file size. The higher the
parameter, the lower the quality and the smaller the file. Try
vqscale=8, vqscale=12 or vqscale=16. You could even try higher values.
Another consideration is the visual quality of the original video.
Glitches, artifacts and imperfections take more bits to encode, so file
size will be greater. A clean image will produce a smaller file.
Also, if you don't need the video frame to be the same size as the
original, you can leave out the scale filter (-vf ...,scale=x:y). This
will produce a smaller file, but also a smaller video frame size
(assuming the scaling was increasing the size, not reducing).
> I'm wondering why this happens. All thats required is the same data in
> the same format, just with some cropping, which should mean a smaller
> file, not a massively larger one?
Well, it's not quite the same data. It's re-encoded data. And you may
be re-encoding it with higher quality parameters than the original
encoding. (Of course, it can never actually improve the visual quality,
since you can't get out more than you put in. You can only lose quality
by using lower quality encoding parameters. But by making sure the
parameters aren't too low, you can minimise the loss.)
These seem to be the only options really.
As I've only got a limited number of files to worry about, I think I'm
just going to use a crop-while-watching wrapper script and make sure I
don't make the mistake of processing 16x9 stuff in a 4x3 box again.
Live and learn.