| View previous topic :: View next topic |
| Author |
Message |
Aquous l33t

Joined: 08 Jan 2011 Posts: 619
|
Posted: Tue Apr 03, 2012 2:37 pm Post subject: Converting H.264 to xvid |
|
|
Hi guys.
I have a bunch of 45-minutes-long HD (h264) video files which I'd like to convert to 350 MB xvid video files. I've already tried doing this with ffmpeg, mencoder, and avidemux, and they all give the same result: the file is both too large and the aspect ratio (which is ordinary 720p) is completely screwed up. Do any of you guys know the proper way to do what I want?
Thanks  |
|
| Back to top |
|
 |
avx Advocate


Joined: 21 Jun 2004 Posts: 2063
|
Posted: Tue Apr 03, 2012 5:24 pm Post subject: |
|
|
avidemux? You can play with the GUI at first until you're satisfied and then use the provided CLI client to automate it(provided the files aren't that different). _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
| Back to top |
|
 |
Aquous l33t

Joined: 08 Jan 2011 Posts: 619
|
Posted: Wed Apr 04, 2012 5:10 pm Post subject: |
|
|
| As I said before - the file is both too large (I can only set target size for the video portion, not for both video and audio) and the aspect is completely whacked. |
|
| Back to top |
|
 |
avx Advocate


Joined: 21 Jun 2004 Posts: 2063
|
Posted: Wed Apr 04, 2012 5:16 pm Post subject: |
|
|
Sorry, overread you already used it.
It's simple, avidemux has a calculator, use it to get the size needed for video so that video + audio = desired size.
As for aspect, for some reason it defaults to use a strange aspect, in video config options, there's a radio check, set it to aspect 1:1 to keep the original. _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
| Back to top |
|
 |
Aquous l33t

Joined: 08 Jan 2011 Posts: 619
|
Posted: Thu Apr 05, 2012 8:56 am Post subject: |
|
|
OK, using the calculator I can get the desired filesize, so that problem's solved.
However, the aspect ratio is still screwed up.
Both the source file and the transcoded file are reported by VLC to have a resolution of 720x480 pixels. However, the source file is (correctly) scaled to 1280x723 (not a typo) when I play it in VLC, while the transcoded file is scaled to 1280x854 pixels, which is of course incorrect. This happens when selecting the 1:1 aspect option. |
|
| Back to top |
|
 |
avx Advocate


Joined: 21 Jun 2004 Posts: 2063
|
Posted: Thu Apr 05, 2012 12:40 pm Post subject: |
|
|
Did you use any filters in terms of dimensions(ie removing black bars or something) and which container are you using? Same behaviour with other players, mplayer f.e.?
Could you share say a 20s sample of one source-file? _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
| Back to top |
|
 |
Aquous l33t

Joined: 08 Jan 2011 Posts: 619
|
Posted: Fri Apr 06, 2012 12:03 pm Post subject: |
|
|
I'm not sure if sharing a sample would be legal or whether that would be considered piracy, so I'm a little hesistant to do so.
What I can give you is the information that both VLC and mplayer scale the output file wrongly. Also, I did not use any filters or such in avidemux.
Perhaps this information is useful:
For the source file, mplayer outputs (translated - mplayer seems to ignore LC_ALL=C):
| Code: | <snip>
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (ac3), -aid 0, -alang eng, English
VIDEO: [H264] 720x480 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
<snip>
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
Film aspect is 1.77:1 - prescaling to correct film aspect.
VO: [vdpau] 720x480 => 850x480 Planar YV12 |
Is it possible that the mkv container is lying about the true aspect ratio (since 720x480 is incorrect and 850x480 is correct) and that that's upsetting avidemux?
Edit: Indeed, the transcoded file has mplayer output:
| Code: | Film aspect is 1.50:1 - prescaling to correct film aspect.
VO: [vdpau] 720x480 => 720x480 Planar YV12 |
|
|
| Back to top |
|
 |
|