Skip to content

Video plugin using libavcodec

Olivier Girondel requested to merge video_plugin_using_libavcodec_thread into master

This MR uses the ffmpeg C API instead of running external ffmpeg commands.

Decoding is done in a thread for maximum performance, so it's possible to run lebiniou and videos at different frame rates.

@sub26nico, @mr-kebab: a video for testing is here (to be put in ~/.lebiniou/videos/): 0000-CountdownTimer Sample sequence: 1601579395.json

$ ffprobe videos/0000-CountdownTimer.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'videos/0000-CountdownTimer.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
  Duration: 00:00:29.97, start: 0.000000, bitrate: 1859 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1600x900 [SAR 1:1 DAR 16:9], 1856 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler

Running lebiniou at 40fps (-m 40) the result here is:

[i] Played video in 29.693539 seconds
Edited by Olivier Girondel

Merge request reports