Opened 6 years ago

Closed 6 years ago

#7388 closed defect (invalid)

Using -threads causes distorted output in some frames

Reported by: John Luther Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: libx264
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary:

I am encoding a 1080p H.264 Main Profile MP4 source to 180p scaled Baseline MP4 using CRF rate control.

When I run my FFmpeg command with a -threads value greater than 8, there are heavily distorted frames in the lower half of the output at around 00:00:01 into playback.

When -threads param is removed from the command, the frames are not distorted.

Reproducing:

Behavior is reproducible on Mac 10.13.6 using FFmpeg built from August 28th Git master.

However, it is only reproducible with this one video. Other samples encode fine.

Command that produces the distorted output:

ffmpeg -y -report -i jluther-threads-bug-report-source.mp4 -pix_fmt yuv420p -vsync cfr -r 25 -filter:v '[in] scale=320:-2 [out]' -c:v libx264 -profile:v baseline -x264opts keyint=100:vbv-maxrate=300:vbv-bufsize=300 -threads 12 -an out/with-12-threads.mp4

Console output and -report log are in attached archive.

Attachments (1)

jluther-threads-bug-report.zip (452.5 KB ) - added by John Luther 6 years ago.

Download all attachments as: .zip

Change History (8)

by John Luther, 6 years ago

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: ffmpegundetermined

Where can we find the input video?

comment:2 by Carl Eugen Hoyos, 6 years ago

Resolution: needs_more_info
Status: newclosed

Please reopen this ticket if you can provide the input file.

comment:3 by John Luther, 6 years ago

Resolution: needs_more_info
Status: closedreopened

Connections to the FFmpeg upload ftp server are timing out for me.

The behavior happens one second into the source, so I put the first 10MB of it at http://jluther.net/ticket-7388-bug-report-source-10mb.mp4

comment:4 by Carl Eugen Hoyos, 6 years ago

Can you reproduce the issue with the following command line?

$ ffmpeg -threads 1 -i ticket-7388-bug-report-source-10mb.mp4 -threads 12 -vcodec libx264 out.mp4

comment:5 by John Luther, 6 years ago

No, that command encodes fine.

comment:6 by Carl Eugen Hoyos, 6 years ago

Which option(s) is missing?

comment:7 by Carl Eugen Hoyos, 6 years ago

Keywords: libx264 added
Resolution: invalid
Status: reopenedclosed

If there is an issue, it is reproducible with x264:

$ ffmpeg -i ticket-7388-bug-report-source-10mb.mp4 -s 320x180 out.yuv
$ x264 --input-res 320x180 --profile baseline --vbv-maxrate 300 --vbv-bufsize 300 --threads 12 -o out.h264 out.yuv

So I don't think there is a problem that can be fixed in FFmpeg.

Note: See TracTickets for help on using tickets.