Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#7020 closed defect (invalid)

Distorted frames at stream start with Mediacodec in PORTRAIT VIDEOS

Reported by: kaushal86 Owned by:
Priority: normal Component: avcodec
Version: unspecified Keywords: Mediacodec
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
I compiles FFmpeg with Mediacodec support and tried to play a video with SDL.
It plays fine but when I used portrait video, the initial frames (at start) are distorted and then it resumes normal playing.
It happens everytime the same portrait video is played (in loop) or a new portrait video is loaded.
No issue with landscape videos.

Attachments (1)

Screenshot_20180212-184130.jpg (695.3 KB) - added by kaushal86 6 months ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 6 months ago by mateo

On which device does this happen ?
Can you share a portrait video which trigger the issue ?
Does it happen with both software and surface outputs ?

Thanks in advance.

comment:2 follow-up: Changed 6 months ago by kaushal86

No, this did not happen when I used generic h264 decoder, it only happens when I use "h264_mediacodec" decoder.
It happens with all my portrait videos which I have recorded on my android mobile.
My device is Android arm64-v8a (samsung s6 edge+), I am using this device as my test device.
One of my video files can be found at https://www.dropbox.com/s/82gfvtur3wpux6o/20180207_193212.mp4?dl=0

I am using FFplay with SDL in android, it was working fine and is still working fine when I used generic h264 decoder. Now I decided to use HWaccelerations and used Mediacodec.

Also, I used mediacodec decoder on same video with ffmpeg and encoded with mpeg4 encoder, no issue of frames here when played with other generic h264 decoder, and same issue when decoded using mediacodec in FFplay.

Thanks

Last edited 6 months ago by kaushal86 (previous) (diff)

Changed 6 months ago by kaushal86

comment:3 Changed 6 months ago by cehoyos

Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:4 in reply to: ↑ 2 Changed 6 months ago by mateo

Replying to kaushal86:

No, this did not happen when I used generic h264 decoder, it only happens when I use "h264_mediacodec" decoder.

I was not refering to the h264 software decoder. I was refering to the output of the h264_mediacodec decoder which can either be software buffers or surface.

It happens with all my portrait videos which I have recorded on my android mobile.
My device is Android arm64-v8a (samsung s6 edge+), I am using this device as my test device.
One of my video files can be found at https://www.dropbox.com/s/82gfvtur3wpux6o/20180207_193212.mp4?dl=0

I am using FFplay with SDL in android, it was working fine and is still working fine when I used generic h264 decoder. Now I decided to use HWaccelerations and used Mediacodec.

Also, I used mediacodec decoder on same video with ffmpeg and encoded with mpeg4 encoder, no issue of frames here when played with other generic h264 decoder, and same issue when decoded using mediacodec in FFplay.

I will investigate the output of the h264_mediacodec decoder with the video you provided and with the same device but without the FFplay/SDL integration.

Last edited 6 months ago by mateo (previous) (diff)

comment:5 Changed 6 months ago by cehoyos

  • Version changed from 3.4 to unspecified

And please test current FFmpeg git head.

comment:6 Changed 6 months ago by kaushal86

Thanks,

Working fine in snapshot.
How to close this ticket?

comment:7 Changed 6 months ago by cehoyos

  • Resolution set to invalid
  • Status changed from new to closed

Thank you for testing again!

comment:8 Changed 6 months ago by kaushal86

Thanks,
I tested it thoroughly, earlier when it was distorted at stream start, I was able to use filters with FFplay, but now, the frames are clear (no distortion at stream start) but are not editable i.e., I tried drawtext, negate, edgedetect and more but nothing worked, except vflip and hflip.

But thanks again, will wait for next stable release.

comment:9 Changed 6 months ago by cehoyos

There is nothing stable about a release, if you are not a distributor, please ignore them.

Note: See TracTickets for help on using tickets.