

Take a look at each of the links in the Additional Resources section at the end of this README. This dilemma is intrinsic to ffmpeg, and ffmpeg-python tries to stay out of the way while users may refer to the official ffmpeg documentation as to why certain filters drop audio.Īs usual, take a look at the examples ( Audio/video pipeline in particular).

video operators can be used to reference the audio/video portions of a stream so that they can be processed separately and then re-combined later in the pipeline. Some ffmpeg filters drop audio streams, and care must be taken to preserve the audio in the final output. Make sure you ran pip install ffmpeg-python and not pip install ffmpeg or pip install python-ffmpeg. When in doubt, refer to the existing filters, examples, and/or the official ffmpeg documentation.

Time ~/ffmpeg/ffmpeg -hwaccel cuda -y -i /tmp/input.mkv /tmp/out.mp4 Time command outputs with CPU used: realđm40.678sĪlso note down the speed: frame= 7320 fps= 73 q=-1.0 Lsize= 58306kB time=00:02:02.03 bitrate=3914.0kbits/s speed=1.22xĪnd now same file with NVIDIA GPU acceleration (note the path, I am calling the compiled version): Time /bin/ffmpeg -y -i /tmp/input.mkv /tmp/out.mp4 In this example, I am converting input.mkv to out.mp4 as follows without using GPU acceleration: Related: Top 7 Linux GPU Monitoring and Diagnostic Commands Line Tools Result
