Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good library for encoding videos in a dynamic language?

I'm looking for an effective library for encoding videos. I would prefer something in one of the Ruby/Python ilk type languages, but I'd use libraries in C or PHP that were good. Essentially, I'm looking for something that wraps ffmpeg, and would allow me to convert H.264 .mp4's into .theora.ogv, .webm, and (this would be nice) .flv files.

Worst case, I could always just use any language to natively execute ffmpeg, using something like command("ffmpeg -i ...etc."), but I'd prefer something a bit higher level/in-language if possible.

I've already looked at RVideo, but couldn't get it to work correctly.

like image 783
rybosome Avatar asked Nov 08 '11 18:11

rybosome


People also ask

What is H 264 AVC format?

H. 264 is a well-known video compression standard for high-definition digital video. Also known as MPEG-4 Part 10 or Advanced Video Coding (MPEG-4 AVC), H. 264 is defined as a block-oriented, compensation-based video compression standard that defines multiple profiles (tools) and levels (max bitrates and resolutions).

What are the different video encoders?

Today, the most common and best video codec is H. 264. Just about every device in existence supports this protocol and it's common for use with online video. However, there are several other codecs available, including MPEG-2, HEVC, VP9, Quicktime, and WMV.

How video codecs work?

Codecs are essentially standards of video content compression. Codecs are made up of two components, an encoder to compress the content, and a decoder to decompress the video content and play an approximation of the original content. An enCOder and a DECoder, hence the name codec.


1 Answers

For Python there is PyMedia and pyffmpeg.

If you need a raw usage example, see this.

like image 192
Víctor Romero Avatar answered Sep 26 '22 19:09

Víctor Romero