#10494 closed defect (invalid)

Incorrect h264 video generated after passing it through some of the filters.

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

Description

I have video like this:

Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 26 kb/s, 25 fps, 25 tbr, 12800 tbn (default)

provided in the attachment. I think any video with yuv420p(tv, bt709, progressive) will reproduce the problem.

When I pass this video through some of the default filters , for example "edgedetect" and will try to encode it with libx264 codec, the video will be broken (black, some vertical strips etc.)

This command illustrates the problem:

ffmpeg_g -i video.mp4 -vf "edgedetect" -c:v libx264 blank_video.mp4 -y

However, I've also found a filter for which the video is encoded fine:

ffmpeg_g -i video.mp4 -vf "pixelize" -c:v libx264 blank_video.mp4 -y

After some investigation, I think that the problem lies in automatic conversion of pixel format outputted by the filter and accepted by the codec.

I've also tested this for libx265 and in this case it works correctly:

ffmpeg_g -i video.mp4 -vf "edgedetect" -c:v libx265 blank_video.mp4 -y

Tested on: multiple versions of FFmpeg (main branch and 6.0) and on custom built libx264 as well as official Ubuntu package.

Attachments (1)

video.mp4 (211.0 KB ) - added by Wodzu 16 months ago.

Download all attachments as: .zip

Change History (3)

by Wodzu, 16 months ago

Attachment: video.mp4 added

comment:1 by Wodzu, 16 months ago

Component: avfilterffmpeg

comment:2 by Wodzu, 16 months ago

Component: ffmpegavfilter
Resolution: invalid
Status: newclosed

Output file is not played correctly under VLC on Ubuntu but it works in Chrome browser. So I guess, this is not a bug.

Note: See TracTickets for help on using tickets.