Skip to content

Instantly share code, notes, and snippets.

View Deshdeepak1's full-sized avatar
:octocat:
Contributing in OSS.

Deshdeepak Deshdeepak1

:octocat:
Contributing in OSS.
View GitHub Profile
@Deshdeepak1
Deshdeepak1 / mp4-to-jpg
Created August 2, 2021 05:31 — forked from hteumeuleu/mp4-to-jpg
Commands to generate a background sprite from an MP4 video (using ffmpeg and ImageMagick)
ffmpeg -i video.mp4 -r 1 img/frames_%04d.png
montage -tile 34x1 -geometry 640x960 *.png background.jpg
@Deshdeepak1
Deshdeepak1 / get_video_info.py
Created July 31, 2021 12:13
Get video attributes and thumbnail
''' Get video attributes and thumbnail '''
import tempfile
from subprocess import getstatusoutput
def get_video_attributes(file: str):
''' Returns video duration, width, height '''
class FFprobeAttributesError(Exception):