Opened 4 months ago

Last modified 4 months ago

#7025 new defect

Framerate changes when using prores and copy codec

Reported by: FrugalCourtland Owned by:
Priority: normal Component: undetermined
Version: Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

Framerate changes when using the "copy" command with a prores video, when the length of the video doesn't land on a clean second boundary. In this example, the input video is 4 frames. FFProbe will show the framerate at 30 fps, but after copying, the framerate changes to slightly less than 30.

How to reproduce:

% ffprobe input.mov

Stream #0:0(eng): Video: prores (apcn / 0x6E637061), yuv422p10le(progressive), 100x62, 92 kb/s, SAR 1:1 DAR 50:31, 30 fps, 30 tbr, 15360 tbn, 15360 tbc (default)

% ffmpeg -i input.mov -c:v copy output.mov
% ffprobe output.mov

Stream #0:0(eng): Video: prores (ap4h / 0x68347061), yuv444p10le(progressive), 100x62, 91 kb/s, SAR 1:1 DAR 50:31, 29.85 fps, 30 tbr, 15360 tbn, 15360 tbc (default)

ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
ffprobe version 3.4.1 Copyright (c) 2007-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)

The video was originally created with this command:

% ffmpeg -framerate 30 -i %02d.png -codec prores input.mov

Attachments (2)

input.mov (2.3 KB) - added by FrugalCourtland 4 months ago.
ProRes? Input File
output.mov (2.3 KB) - added by FrugalCourtland 4 months ago.
Output File with incorrect framerate

Download all attachments as: .zip

Change History (4)

Changed 4 months ago by FrugalCourtland

ProRes? Input File

Changed 4 months ago by FrugalCourtland

Output File with incorrect framerate

comment:1 follow-up: Changed 4 months ago by Gyan

Related to duration of last frame. In the input, ffprobe shows it as longer than the other frames.

Round-tripping via a NUT pipe works

ffmpeg -i input.mov -c copy -f nut - | ffmpeg -i - -c copy output.mov

comment:2 in reply to: ↑ 1 Changed 4 months ago by FrugalCourtland

Replying to Gyan:

Related to duration of last frame. In the input, ffprobe shows it as longer than the other frames.

Thank you so much for taking a look and replying here! We will give that workaround a try. I will also file another ticket for the encode process that's creating the long last frame.

Note: See TracTickets for help on using tickets.