

This tutorial assumes that the FFmpeg is already installed because it is based on NVENC support. Please refer to this documentation for further details.

The trivial method os its usage will be explained in this tutorial. This module is employed for execution and dealing external commands, intended to supersede the os.sys module. This can be done using subprocess python module. Instead, the python interface is being used to run commands in the terminal. In this tutorial, we do not use the terminal commands directly for employing the FFmpeg with NVENC support. In this tutorial, the primary goal is to show how to do resize a video with GPU-accelerated libraries in Linux. The full code for this tutorial is available at this GitHub repository. Moreover, The NVENC programming guide can be found here. Documentation on NVENC can be found here. The full documentation of FFmpeg integrated with NVIDIA can be found here. To be able to utilize this GPU-accelerated encoder, FFmpeg must be installed with NVENC support. The popular x264 is the one which is widely used as the encoder however, it is not super fast! The latest NVIDIA GPUs contain a hardware-based video encoder called NVENC which is much faster than traditional ones. IntroductionįFmpeg is one of the most famous multimedia frameworks which is widely used for processing videos. I'm not sure how to draw the box and scale it separately from the source video.In this tutorial, I describe how to resize a video using GPU accelerated libraries supported by FFMPEG in Ubuntu 16.04.

Now, if I set the width to a fixed value, it runs, but then there's the problem that the overlay contains the whole video itself as it is the input of the drawbox filter. With this I get an error of: Error when evaluating the expression 'if(gte(t*20,600),600,t*20)'. I've seen some solutions using overlay, but they are fixed width and are rather used to move the box around.

Since drawbox does not support the 't' (as in time) variable, I'm at a loss here. I need to draw a box that grows in size horizontally over a video (scaling its width as time goes by)
