Opened 5 months ago

Last modified 5 months ago

#7799 new defect

hevc_mp4toannexb filter inserts extradata wrong position

Reported by: gudbooy Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: hevc
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

After applied hevc_mp4toannexb filter to the attached video (refer to the below link),
the frames become broken from the video players (e.g. VLC, ffplay)

The problem is caused by prepending the extra-data to IRAP frames in libavcodec/hevc_mp4toannexb_bsf.c.

This video contains own vps/sps/pps for every IRAP frames.
The extradata from hevcc is slightly different from every IRAP frames have (in this case QP value is different) and the hevc_mp4toannexb filter prepends the different extradata to every IRAP frames, causing the broken frames.

Video File Repo :
https://www.dropbox.com/s/tpyohk6vf096zxm/hevc_after_mp4toannexb_conversion_qp_value_modified.mp4?dl=0

I am afraid that I can't connect to ftp://upload.ffmpeg.org, so I just attached to the dropbox url
How to reproduce:

% ffmpeg -i hevc_after_mp4toannexb_conversion_qp_value_modified.mp4 -codec copy -bsf:v hevc_mp4toannexb output.hevc
$vlc output.hevc

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

hevc_after_mp4toannexb_conversion_qp_value_modified.mp4 (719.7 KB) - added by cehoyos 5 months ago.

Download all attachments as: .zip

Change History (9)

comment:1 follow-ups: Changed 5 months ago by cehoyos

How did you create the input file?

comment:3 in reply to: ↑ 1 ; follow-up: Changed 5 months ago by gudbooy

Replying to cehoyos:

How did you create the input file?

Unfortunately, I did not create the video. It is automatically transcoded via a messenger application. (I do not exactly know how they transcode)

I know how to avoid this issue, (just not prepend the extra-data, if the extra-data has already existed on IRAP frames)

However, I do not exactly know whether this solution is correct or not.

comment:2 in reply to: ↑ 1 Changed 5 months ago by gudbooy

Last edited 5 months ago by gudbooy (previous) (diff)

comment:3 in reply to: ↑ 3 ; follow-up: Changed 5 months ago by cehoyos

Replying to gudbooy:

Replying to cehoyos:

How did you create the input file?

Unfortunately, I did not create the video. It is automatically transcoded via a messenger application. (I do not exactly know how they transcode)

Which one? The file indicates that it was created with FFmpeg.

comment:4 Changed 5 months ago by gudbooy

The file I uploaded (hevc_after_mp4toannexb_conversion_qp_value_modified.mp4​).

comment:5 Changed 5 months ago by cehoyos

Which messenger application?

comment:6 Changed 5 months ago by gudbooy

The messenger application called KAKAO-TALK, which is the famous app in Korea
The original one is H.264 encoded Video transcoded by Xiomi video editing application.

comment:7 Changed 5 months ago by cehoyos

  • Keywords hevc added
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.