[FFmpeg-user] “Real Time”, “Slow Motion” and “Time Lapse”

Bryce Newman bryce.newman at gettyimages.com
Mon May 10 22:50:54 EEST 2021


Hi,
I have - for example - three videos that which visually can be classified as “Real Time”, “Slow Motion” and “Time Lapse”.
My understanding is the speed of the video is controlled by the filter PTS.
Below are three ffprobe outputs; “Real Time”, “Slow Motion” and “Time Lapse”. The PTS for “Slow Motion” seems easy to detect using the PTS value.
The “Real Time” and “Time Lapse” appear to have similar PTS values.
My goal is to be able to accurately detect if a video is “Real Time”, “Slow Motion” or “Time Lapse” within the first 3-5 seconds of the video.
I know portions of the video can change from “Real Time”, “Slow Motion” or “Time Lapse” and that is ok and we may classify them as all-the-above.

What is the best way using ffprobe to detect if the first X seconds of a video is “Real Time”, “Slow Motion” or “Time Lapse”?

Thank you for your time.
Bryce

****************************
Real Time output grepping for pts.
****************************
ffprobe -show_frames real-time.mov | grep pts
ffprobe version 4.4 Copyright (c) 2007-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
 libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ffcb000ac00] st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ffcb000ac00] st: 0 edit list 1 Cannot find an index entry before timestamp: 0.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'real-time.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2018-01-26T06:13:02.000000Z
    com.apple.finalcutstudio.media.uuid: E0702E27-070F-431D-9845-20D305F7441D
    com.apple.quicktime.player.movie.audio.gain: 1.000000
    com.apple.quicktime.player.movie.audio.treble: 0.000000
    com.apple.quicktime.player.movie.audio.bass: 0.000000
    com.apple.quicktime.player.movie.audio.balance: 0.000000
    com.apple.quicktime.player.movie.audio.pitchshift: 0.000000
    com.apple.quicktime.player.movie.audio.mute:
    com.apple.quicktime.player.movie.visual.brightness: 0.000000
    com.apple.quicktime.player.movie.visual.color: 1.000000
    com.apple.quicktime.player.movie.visual.tint: 0.000000
    com.apple.quicktime.player.movie.visual.contrast: 1.000000
    com.apple.quicktime.player.version: 7.6.6 (7.6.6)
    com.apple.quicktime.version: 7.7.3 (2978.8) 0x7738000 (Mac OS X, 10.12.6, 16G1114)
  Duration: 00:00:44.63, start: 0.000000, bitrate: 36046 kb/s
  Stream #0:0(eng): Video: mpeg2video (Main) (xdvd / 0x64766478), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 34495 kb/s, 23.98 fps, 23.98 tbr, 23976 tbn, 47.95 tbc (default)
    Metadata:
      creation_time   : 2018-01-26T06:13:02.000000Z
      handler_name    : Apple Video Media Handler
      vendor_id       : appl
      encoder         : XDCAM EX 1080p24 (35 Mb/s VBR)
      timecode        : 01:03:00:05
    Side data:
      cpb: bitrate max/min/avg: 35000000/0/0 buffer size: 9781248 vbv_delay: N/A
  Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2018-01-26T06:13:02.000000Z
      handler_name    : Apple Sound Media Handler
      vendor_id       : [0][0][0][0]
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2018-01-26T06:13:07.000000Z
      handler_name    : Time Code Media Handler
      timecode        : 01:03:00:05
Unsupported codec with id 0 for input stream 2
pkt_pts=0
pkt_pts_time=0.000000
pkt_pts=1000
pkt_pts_time=0.041708
pkt_pts=2000
pkt_pts_time=0.083417
pkt_pts=3000
pkt_pts_time=0.125125
….



*******************************
Slow Motion output grepping for pts.
*******************************
ffprobe -show_frames slow-motion.mov | grep pts
ffprobe version 4.4 Copyright (c) 2007-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[mjpeg @ 0x7f9d5c809000] EOI missing, emulating
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'slow-motion.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2017-08-28T09:44:11.000000Z
  Duration: 00:00:18.56, start: 0.000000, bitrate: 49170 kb/s
  Stream #0:0(eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj422p(pc, bt470bg/smpte170m/bt709), 1920x1080 [SAR 72:72 DAR 16:9], 49166 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2017-08-28T09:44:11.000000Z
      handler_name    : Apple Video Media Handler
      vendor_id       : appl
      encoder         : Photo - JPEG
      timecode        : 00:00:00:00
  Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2017-08-28T09:45:45.000000Z
      handler_name    : Time Code Media Handler
      timecode        : 00:00:00:00
Unsupported codec with id 0 for input stream 1
pkt_pts=0
pkt_pts_time=0.000000
pkt_pts=1
pkt_pts_time=0.040000
pkt_pts=2
pkt_pts_time=0.080000
pkt_pts=3
pkt_pts_time=0.120000
pkt_pts=4
pkt_pts_time=0.160000
pkt_pts=5
pkt_pts_time=0.200000
pkt_pts=6
pkt_pts_time=0.240000
pkt_pts=7
pkt_pts_time=0.280000
pkt_pts=8
…


*******************************
Time Lapse output grepping for pts.
*******************************
ffprobe -show_frames time-lapse.mov | grep pts
ffprobe version 4.4 Copyright (c) 2007-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'time-lapse.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2013-08-29T18:32:53.000000Z
  Duration: 00:00:29.90, start: 0.000000, bitrate: 145674 kb/s
  Stream #0:0(eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj422p(pc, bt470bg/bt709/bt709), 1920x1080 [SAR 72:72 DAR 16:9], 145664 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
    Metadata:
      creation_time   : 2013-08-29T18:32:53.000000Z
      handler_name    : Procedura obs�ugi wideo Apple
      vendor_id       : appl
      encoder         : Photo - JPEG
      timecode        : 00:00:00;01
  Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2013-08-29T19:15:50.000000Z
      handler_name    : Procedura obs�ugi no�nik�w kodu czasowego
      timecode        : 00:00:00;01
Unsupported codec with id 0 for input stream 1
pkt_pts=0
pkt_pts_time=0.000000
pkt_pts=1001
pkt_pts_time=0.033367
pkt_pts=2002
pkt_pts_time=0.066733
pkt_pts=3003
pkt_pts_time=0.100100
pkt_pts=4004
pkt_pts_time=0.133467
pkt_pts=5005
pkt_pts_time=0.166833
…
    
    

Bryce Chester Newman | Principal Developer
 
p: +12069255045 | 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0.png
Type: image/png
Size: 2684 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210510/55b3b874/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.png
Type: image/png
Size: 2260 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210510/55b3b874/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.png
Type: image/png
Size: 2256 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210510/55b3b874/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.png
Type: image/png
Size: 7110 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210510/55b3b874/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4.jpg
Type: image/jpeg
Size: 10362 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210510/55b3b874/attachment.jpg>


More information about the ffmpeg-user mailing list