[FFmpeg-user] Unexpected result when discarding keyframes

James Fowkes jamesfowkes at gmail.com
Tue Dec 24 15:59:32 EET 2019


> Does it work without -c copy? I ask because I suspect discarding
> cannot work reliably without decoding.

There are still the unexpected extra frames at the start of the video.
The file generated is closer to a "normal" video in that it has
preserved the 1s timing between keyframes.

> For future questions: Please post the console output in your mail,
> do not use external resources and please (only) test current FFmpeg
> git head, not a two-year old version.

Apologies, I didn't want to lengthen an already long and verbose post
with the console output, but yes I will do in future.
I have updated my ffmpeg build to 20191223-5b42d33 from
https://ffmpeg.zeranoe.com/builds/ and the result is the same.

I have run ffprobe against the working and non-working input files,
here is the output:

ffprobe version git-2019-12-23-5b42d33 Copyright (c) 2007-2019 the
FFmpeg developers
  built with gcc 9.2.1 (GCC) 20191125
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
--enable-gmp --enable-libvidstab --enable-libvorbis
--enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex
--enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec
--enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 36.101 / 56. 36.101
  libavcodec     58. 65.100 / 58. 65.100
  libavformat    58. 35.101 / 58. 35.101
  libavdevice    58.  9.101 / 58.  9.101
  libavfilter     7. 69.101 /  7. 69.101
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2019-12-24_13-51-34.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : NVT
    encoder         : Lavf57.83.100
    comment         : From NVT
  Duration: 00:00:14.93, start: 7290.494000, bitrate: 3701 kb/s
    Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661),
yuvj420p(pc, bt709), 1280x720, 3700 kb/s, 14.07 fps, 14 tbr, 90k tbn,
180k tbc (default)
    Metadata:
      handler_name    : VideoHandler

and

ffprobe version git-2019-12-23-5b42d33 Copyright (c) 2007-2019 the
FFmpeg developers
  built with gcc 9.2.1 (GCC) 20191125
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
--enable-gmp --enable-libvidstab --enable-libvorbis
--enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex
--enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec
--enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 36.101 / 56. 36.101
  libavcodec     58. 65.100 / 58. 65.100
  libavformat    58. 35.101 / 58. 35.101
  libavdevice    58.  9.101 / 58.  9.101
  libavfilter     7. 69.101 /  7. 69.101
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2019-12-24_13-57-25.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Unnamed
    encoder         : Lavf57.83.100
    comment         : N/A
  Duration: 00:00:14.97, start: 7665.101000, bitrate: 2815 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720, 2812 kb/s, 25.05 fps, 50 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      handler_name    : VideoHandler

Are there any clues there that might explain why one video converts
correctly and one does not?
The frame rates are different, this is expected.
> For future questions: Please post the console output in your mail,
> do not use external resources and please (only) test current FFmpeg
> git head, not a two-year old version.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list