Hi, I have found that in general it is best for most encoders if the frame sizes are divisible by 16 (i.e. each of the width and height are divisible by 16). If necessary, you can frame your video with a border or else use swscale to resize. You may get away with divisible by 8 in some cases, but 16 works with most codecs.
Andrew :) --------------------------------------------------------- Andrew G D Rowley Senior Development Officer Research Computing Services The University of Manchester Devonshire House, Oxford Road Manchester, M13 9PL t : +44 (0) 161 275 0685 e : [email protected] w : www.manchester.ac.uk/researchcomputing --------------------------------------------------------- > -----Original Message----- > From: [email protected] [mailto:libav-user- > [email protected]] On Behalf Of Mark Kenna > Sent: 07 December 2010 16:38 > To: Libav* user questions and discussions > Subject: [libav-user] H264 Encoding Width/Height > > Hi Guys > > Can someone tell me if there are certain frame sizes that H264 encoding > will just completely fail on? Here is my scenario: > > I'm capturing a snapshot of a windows form (w=142, h=116) and saving it > as a JPEG, this then gets passed to my encoder which is encoding to > H264 > format, this size does not work at all. When I run this again and > resize > the JPEG to (w=640, h=480) it works perfectly. > > If there are only certain sizes that you can use for encoding I will > have to make a check to resize if needed, I just don't know what they > are. > > Thanks guys, > Mark > > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
