html5 ogv格式转换,GitHub - kubes/videoconverter: A python video conversion script that outputs html5 (og...

介绍了一个Python脚本,用于服务器端将视频转换为HTML5及Flash格式。该脚本支持多种输出格式,包括flv、ogg、mp4和webm,确保了广泛的浏览器兼容性。通过使用mediainfo命令收集信息,脚本能够智能调整输出视频的质量和大小。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Server Side HTML5 and Flash Video Converter

A python script for server side conversion of videos to HTML5 and Flash video

formats. Converts input videos to flv, ogg, mp4, and webm allowing them to be

played on a wide range of browsers including mobile devices.

Script usage:

flash_converter.py [-hitpfdebvg]

[-h | --help] prints this help and usage message

[-i | --input-dir] the video input root directory.

[-t | --output-dir] the video output directory.

[-p | --prefix] a filename prefix for video outputs.

[-f | --input-file] the input video file to convert

[-d | --dry-run] dry run, print commands, don't convert

[-e | --exists] ignore file if output already exists.

[-b | --backup] backup old videos, rename to *.bak

[-v | --verbosity] the verbosity level, quiet to debug

[-g | --logfile] the conversion logfile

[-m | --format] list of output formats, overrides default

To operate correctly serveral pieces of software must be installed from source.

The following guide explains in detail how to download and install the software

correctly. Other libraries such as libtheora may also need to be installed.

In general the script takes a single file or directory structure of files to

convert. For each video it uses the mediainfo command to gather information,

using this information to create a web video of good quality at an acceptable

size. This involves setting correct frame rates, sampling rates, and scaling

widths and heights. Aspect ratios are kept the same as the original video and

it is scaled up or down as needed. The video is padded with black bars to get

a final scaled output. Ffmpeg is used to do the conversion to different video

output formats.

Please feel free to send any improvements or bug fixes.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值