[FFmpeg-user] Why are half the frames "duplicate" ?

sean darcy seandarcy2 at gmail.com
Thu Sep 27 23:13:32 EEST 2018


On 9/27/18 5:55 AM, DopeLabs wrote:
> 
> input: 90k tbn, 59.94 tbc
> 
> output: 30k tbn, 29.97 tbc
> 
> try explicitly specifying the output frame rate
> 
> -c:v h264 -r 29.97
> 
> 
>> On Sep 26, 2018, at 7:27 26PM, sean darcy <seandarcy2 at gmail.com> wrote:
>>
>> I'm transcoding mpeg2 -> x264.
>>
>> Stream #0:0[0x64]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 720x480 [SAR 8:9 DAR 4:3], Closed Captions, 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
>>
>> When I run ffmpeg:
>>
>> ffmpeg -i in.mpg -map 0:0 -map 0:2 -c:v libx264 -tune film -preset slow -crf 22 -c:a copy out.mp4
>>
>> almost half the frames are dups:
>>
>> frame=394550 fps=135 q=-1.0 Lsize= 2218652kB time=03:39:24.71 bitrate=1380.6kbits/s dup=175142 drop=0 speed=4.51x
>>
>> Does this really mean that there were 175,142 frames with exact copies ? So only ( 394,550 less 175,142 ) unique frames ?
>>
>> The output looks fine. The input looks fine. What are these duplicated frames? Is it an interlacing issue ? But the input is progressive.
>>
>> Does it have to do with this warning:
>>
>> [mp4 @ 0x921c80] track 1: codec frame size is not set
>> Output #0, mp4, to 'out.mp4':
>>   Metadata:
>>     encoder         : Lavf58.18.103
>>     Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc
>>     Metadata:
>>       encoder         : Lavc58.31.100 libx264
>>
>> Puzzled.
>>

But isn't that what ffmpeg does anyway:

ffprobe out.mp4
.........
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf58.18.103
   Duration: 00:21:40.97, start: 0.000000, bitrate: 1346 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
720x480 [SAR 8:9 DAR 4:3], 944 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 
59.94 tbc (default)
     Metadata:
       handler_name    : VideoHandler

Does specifying the frame rate do anything but silence the dup warnings 
? I mean, does ffmpeg do anything different when it's transcoding ?






More information about the ffmpeg-user mailing list