All Projects → jiashaokun → Ffmpeg

jiashaokun / Ffmpeg

基于FFmpeg的python视频处理包-因疫情影响,工作比较繁忙,心情也没在视频上面再研究,该项目已经搁置,源码很简单,大家可以自己研究一下自己扩展

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Ffmpeg

Trim.lua
Trim mode for mpv — Turn mpv into Lossless Audio / Video Editor.
Stars: ✭ 24 (-42.86%)
Mutual labels:  ffmpeg
Ffcreator
一个基于node.js的高速短视频加工库 A fast short video processing library based on node.js
Stars: ✭ 948 (+2157.14%)
Mutual labels:  ffmpeg
Pyimagevideo
write animated GIF, multipage append TIFF, AVI OGV video in Python
Stars: ✭ 36 (-14.29%)
Mutual labels:  ffmpeg
Bull Record Everything
Bull-Record-Everything is a convenient tool which can be used to record everything, eg : desktop, camera, window , and it's also has capacities to mix speaker or microphone to a media file.
Stars: ✭ 25 (-40.48%)
Mutual labels:  ffmpeg
Ijkplayer
Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
Stars: ✭ 29,752 (+70738.1%)
Mutual labels:  ffmpeg
Rtsp Client Ffmpeg Opencv On Qt
RTSP Client Program using FFmpeg and OpenCV on Qt
Stars: ✭ 31 (-26.19%)
Mutual labels:  ffmpeg
Bzijkplayer
基于cmake构建的ijkPlayer
Stars: ✭ 23 (-45.24%)
Mutual labels:  ffmpeg
Ipcamera Cpython Interface
兼容主流海康和雄迈IPC的适用于C++和python的帧数据获取接口
Stars: ✭ 38 (-9.52%)
Mutual labels:  ffmpeg
Fijkplayer
ijkplayer for flutter. ijkplayer 的 flutter 封装。 Flutter video/audio player. Flutter media player plugin for android/iOS based on ijkplayer. fijkplayer 是基于 ijkplayer 封装的 flutter 媒体播放器,开箱即用,无需编译 ijkplayer
Stars: ✭ 943 (+2145.24%)
Mutual labels:  ffmpeg
Tricycle
Video transcoding... easier than riding a bike.
Stars: ✭ 35 (-16.67%)
Mutual labels:  ffmpeg
Flavy
Simple API for convert audio/video files, get thumbnails from video, information of files
Stars: ✭ 25 (-40.48%)
Mutual labels:  ffmpeg
Tdarr
Tdarr - Distributed transcode automation using FFmpeg/HandBrake + Audio/Video library analytics + video health checking (Windows, macOS, Linux & Docker)
Stars: ✭ 911 (+2069.05%)
Mutual labels:  ffmpeg
Youtube Fetcher
📺 Youtube Podcasting 🎧
Stars: ✭ 31 (-26.19%)
Mutual labels:  ffmpeg
Pyjumpcutterv2
carykh's but with improvements and a GUI!
Stars: ✭ 25 (-40.48%)
Mutual labels:  ffmpeg
Analysisavp
音视频学习,相关文件格式/协议分析。h264 nalu aac adts flv
Stars: ✭ 38 (-9.52%)
Mutual labels:  ffmpeg
Alltomp3 App
Download and Convert YouTube, SoundCloud & Spotify in MP3 with full tags (title, artist, genre, cover, lyrics 🔥)
Stars: ✭ 920 (+2090.48%)
Mutual labels:  ffmpeg
Headless
Create a virtual X screen from Ruby, record videos and take screenshots.
Stars: ✭ 951 (+2164.29%)
Mutual labels:  ffmpeg
Aframe Phantomjs Continuous Streaming
Browse the web in VR by live streaming a web page into Aframe using PhantomJS and ffmpeg.
Stars: ✭ 40 (-4.76%)
Mutual labels:  ffmpeg
Go Transcode
Live on-demand transcoding in go using ffmpeg. Also with NVIDIA GPU hardware acceleration.
Stars: ✭ 39 (-7.14%)
Mutual labels:  ffmpeg
Video To Ascii
It is a simple python package to play videos in the terminal using characters as pixels
Stars: ✭ 960 (+2185.71%)
Mutual labels:  ffmpeg

ffmpeg python

  • 该项目是使用 python 对 FFmpeg 的类库做了一次封装使用,因最近不搞视频,所以很长时间不维护了,大家可以参照写法,使用 python 构建自己的视频处理服务(Dont forget GPU)。

系统依赖

ffmpeg 3.0 及以上 python 3.0 及以上

mac,linux,windows 相应的 gpu 显卡驱动 (使用硬编码时需支持)

Install

pip install ffmpeg

Use Demo 向视频(指定位置和时间,默认坐标为 0 )添加 n 张图片

from ffmpeg import video

# 输入视频
input_file = "demo.mp4"

# 输出视频
out_file = "demo_out.mp4"

# 图片列表
img_data = [
        {
            "img": "demo1.png",
            "x": "",
            "y": "",
            "str_time": "5",
            "end_time": "15",
        },
        {
            "img": "demo2.png",
            "x": "",
            "y": "",
            "str_time": "20",
            "end_time": "25.5"
        }
    ]

video.ins_img(input_file, img_data, out_file)

Demo 视频添加动图 gif apng 等

from ffmpeg import video

input_file = "demo.mp4"

out_file = "demo_out.mp4"

img_data = {
    "img": "img.apng",
    "x": "20",
    "y": "20",
    "str_time": "2",
    "end_time": "10"
}


video.ins_dynamic_img(input_file, img_data, out_file)

图片处理 图片转 mp4 5: 时长为 5 秒的 mp4

from ffmpeg import image

image.img_trans_video("png/text_%02d.jpg", "5", "out.mp4")

复合模式

from ffmpeg import stream
stream = Stream()
# 输入文件
stream.input(input_file)
# 图片
stream.img("t1.png")
stream.img("t2.png", "10", y=10, str_time=5, end_time=10)
# 动图
stream.img_dynamic("t1.apng", x=10, y=10, str_time=5, end_time=10)
stream.img_dynamic("t2.gif", x=10, y=10, str_time=5, end_time=9)
# 文字水印
stream.word_water_mark("test1", x="10", y="10", str_time="0", end_time="20", font="ttf.ttf", color="blue")
stream.word_water_mark("test2", x="10", y="10", str_time="0", end_time="20", font="ttf.ttf", color="blue")
# 字幕
stream.subbtitle("tt.srt")
# 输出文件
stream.out(out_file)
stream.run()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].