Opened 8 weeks ago

Closed 4 weeks ago

#7388 closed defect (invalid)

Using -threads causes distorted output in some frames

Reported by: jluther 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 jluther 8 weeks ago.

Download all attachments as: .zip

Change History (8)

Changed 8 weeks ago by jluther

comment:1 Changed 7 weeks ago by cehoyos

  • Component changed from ffmpeg to undetermined

Where can we find the input video?

comment:2 Changed 7 weeks ago by cehoyos

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

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

comment:3 Changed 7 weeks ago by jluther

  • Resolution needs_more_info deleted
  • Status changed from closed to reopened

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 Changed 7 weeks ago by cehoyos

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 Changed 7 weeks ago by jluther

No, that command encodes fine.

comment:6 Changed 7 weeks ago by cehoyos

Which option(s) is missing?

comment:7 Changed 4 weeks ago by cehoyos

  • Keywords libx264 added
  • Resolution set to invalid
  • Status changed from reopened to closed

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.