boghe icon indicating copy to clipboard operation
boghe copied to clipboard

Problem with height and width when decoding H264 with FFMPEG

Open cfantasy74 opened this issue 10 years ago • 2 comments

It seems that when decoding h264 with FFMPEG, avcodec_decode_video2 turns height into width and visa versa. So if I call from IMSdroid with SVGA (800 * 600), I can trace that the engine sets the decoder defaults to 800 * 600 in h264->decoder.context, but when the first frame is received h264->decoder.context.width is set to 600 and h264->decoder.context.height is set to 800.

Any idea why?

cfantasy74 avatar Apr 15 '16 15:04 cfantasy74

Also if I call from one boghe client to another in Full HD 1920 / 1080, the screen on both clients is in 4/3 and not 16/9.

cfantasy74 avatar Apr 19 '16 07:04 cfantasy74

A camera from a mobile device (Android, iOS, WP...) is oriented at 90° on portrait and 0° on landscape. This is why on portrait the height and width are reverted.

DoubangoTelecom avatar Apr 19 '16 07:04 DoubangoTelecom