IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
H.264 MOD 16 problem, How to get around it
Matyas
post Aug 25 2005, 17:04
Post #1





Group: Members
Posts: 158
Joined: 8-August 03
From: Bratislava
Member No.: 8242



I am not sure, if this has been already answered before, but I could not find a relevant topic here, so here it goes:

Provided I have an avi where either its height or width is not dividable by 16. I want to encode this avi into MPEg4-AVC format using x264. By now i figured out, that I have to add - as I don't want to crop it - (probably black) borders in order to be able to encode the file. The question is how do I get rid of this black border at the end? I could not find a workaround in VirtualDub.
Any help appreciated.

Matyas

This post has been edited by Matyas: Aug 25 2005, 17:04
Go to the top of the page
+Quote Post
MugFunky
post Nov 14 2005, 11:12
Post #2





Group: Members
Posts: 493
Joined: 28-December 03
From: Melbourne, Aus
Member No.: 10767



there's cropping options in playback settings for a few decoders and things... but unless you're playing in a windowed app there shouldn't be a problem with black borders.

you could add mirrored borders or repeated-edge borders if you like smile.gif

but it's best to just resize to a mod16 res and add a pixel-aspect ratio into x264 that corresponds to the real ratio of the video. remember you can encode anamorphic and it'll be stretched back on playing.
Go to the top of the page
+Quote Post
Gabriel
post Nov 14 2005, 11:19
Post #3


LAME developer


Group: Developer
Posts: 2950
Joined: 1-October 01
From: Nanterre, France
Member No.: 138



I do not know about x264, but cropping can be signalled into the H264 bitstream.
Go to the top of the page
+Quote Post
smok3
post Nov 14 2005, 19:54
Post #4


A/V Moderator


Group: Moderator
Posts: 1742
Joined: 30-April 02
From: Slovenia
Member No.: 1922



from x264 help:

Video Usability Info (Annex E):
The VUI settings are not used by the encoder but are merely suggestions to
the playback equipment. See doc/vui.txt for details. Use at your own risk.

--sar width:height Specify Sample Aspect Ratio
--overscan <string> Specify crop overscan setting ["undef"]
- undef, show, crop
--videoformat <string> Specify video format ["undef"]
- component, pal, ntsc, secam, mac, undef
--fullrange <string> Specify full range samples setting ["off"]
- off, on
--colorprim <string> Specify color primaries ["undef"]
- undef, bt709, bt470m, bt470bg
smpte170m, smpte240m, film
--transfer <string> Specify transfer characteristics ["undef"]
- undef, bt709, bt470m, bt470bg, linear,
log100, log316, smpte170m, smpte240m
--colormatrix <string> Specify color matrix setting ["undef"]
- undef, bt709, fcc, bt470bg
smpte170m, smpte240m, GBR, YCgCo
--chromaloc <integer> Specify chroma sample location (0 to 5) [0]


i have no idea how/where all this settings apply.


--------------------
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung
Go to the top of the page
+Quote Post
i4004
post Nov 14 2005, 22:19
Post #5





Group: Members
Posts: 231
Joined: 7-December 03
From: Croatia
Member No.: 10252



perhaps by now x264 should be good for mod4.
try it and see if you have any problems(on motion).
Go to the top of the page
+Quote Post
Matyas
post Nov 15 2005, 08:57
Post #6





Group: Members
Posts: 158
Joined: 8-August 03
From: Bratislava
Member No.: 8242



Interesting that such an old topic found its answer. Thanks!
By accident, yesterday I read something about the differences between avi and mpg. It said something like x264 stream can be placed also into a generic container like avi, but then I loose the "sar" information.
If this is correct then the above suggestion only applies to containers like m4v or 3gp, etc.

If I want to place the resulting stream into avi, I will have to waint until mod4 will be allowed, speaking of which, I am going to have a look for a newer version.
Go to the top of the page
+Quote Post
stephanV
post Nov 15 2005, 12:15
Post #7





Group: Members
Posts: 394
Joined: 6-May 04
Member No.: 13932



You wont lose SAR by placing h264 in AVI. SAR is part of the video bit stream.


--------------------
"We cannot win against obsession. They care, we don't. They win."
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st November 2014 - 03:33