Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#7020 closed defect (invalid)

Distorted frames at stream start with Mediacodec in PORTRAIT VIDEOS

Reported by: Kaushal Kumar Agrawal 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 Kaushal Kumar Agrawal 7 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by mateo, 7 years ago

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 by Kaushal Kumar Agrawal, 7 years ago

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 7 years ago by Kaushal Kumar Agrawal (previous) (diff)

by Kaushal Kumar Agrawal, 7 years ago

comment:3 by Carl Eugen Hoyos, 7 years ago

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

in reply to:  2 comment:4 by mateo, 7 years ago

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 7 years ago by mateo (previous) (diff)

comment:5 by Carl Eugen Hoyos, 7 years ago

Version: 3.4unspecified

And please test current FFmpeg git head.

comment:6 by Kaushal Kumar Agrawal, 7 years ago

Thanks,

Working fine in snapshot.
How to close this ticket?

comment:7 by Carl Eugen Hoyos, 7 years ago

Resolution: invalid
Status: newclosed

Thank you for testing again!

comment:8 by Kaushal Kumar Agrawal, 7 years ago

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 by Carl Eugen Hoyos, 7 years ago

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

Note: See TracTickets for help on using tickets.