mencoder

Best way to call terminal command repeatedly

吃可爱长大的小学妹 提交于 2019-12-11 02:41:42
问题 I'm using mencoder to split files and I'd like to turn this into an Object Oriented approach, if possible, using Java or similar, for example. But I'm not sure the best way, so I leave it in the open. Here is what I need: I have an excel file with start times and end times, and I need to extract out the appropriate clips from a video file. In the terminal (I'm on Mac OS X) I've had success using, for example: mencoder -ss 0 -endpos 10 MyVideo.avi -oac copy -ovc copy -o Output.avi Which

Java实现视频网站的视频上传、视频转码、视频关键帧抽图, 及视频播放功能

萝らか妹 提交于 2019-12-06 20:05:31
视频网站中提供的在线视频播放功能,播放的都是FLV格式的文件,它是Flash动画文件,可通过Flash制作的播放器来播放该文件.项目中用制作的player.swf播放器. 多媒体视频处理工具FFmpeg有非常强大的功能包括视频采集功能、视频格式转换、视频抓图、给视频加水印等。 ffmpeg视频采集功能非常强大,不仅可以采集视频采集卡或USB摄像头的图像,还可以进行屏幕录制,同时还支持以RTP方式将视频流传送给支持RTSP的流媒体服务器,支持直播应用。 1.能支持的格式 ffmpeg能解析的格式:(asx,asf,mpg,wmv,3gp,mp4,mov,avi,flv等) 2.不能支持的格式 对ffmpeg无法解析的文件格式(wmv9,rm,rmvb等),可以先用别的工具(mencoder)转换为avi(ffmpeg能解析的)格式. 实例是将上传视频转码为flv格式,该格式ffmpeg支持,所以我们实例中需要ffmpeg视频处理工具. 数据库 MySQL5.5 实例所需要的数据库脚本 drop database if exists db_mediaplayer; create database db_mediaplayer; use db_mediaplayer; create table tb_media( id int not null primary key auto

Black overlay appears when merging a transparent video to another video

岁酱吖の 提交于 2019-12-06 11:07:40
This is what I have done so far: Command to create a transparent PNG image: convert -size 640x480 -background transparent -fill blue \ -gravity South label:ROCK image1-0.png Command to create a transparent video: ffmpeg -loop 1 -f image2 -i image1-0.png -r 20 -vframes 100 \ -vcodec png -pix_fmt bgra mov-1.mov (as per this post ) - I expect this video to be a transparent video . Command to overlay a video with another: ffmpeg -i final-video.mov -sameq -ar 44100 \ -vf "movie=mov-1.mov [logo];[in][logo] overlay=0:0 [out]" \ -strict experimental final-video.mov Above commands works perfect and I

ffmpeg vs mencoder

て烟熏妆下的殇ゞ 提交于 2019-12-02 17:05:50
I'm doing a bunch of video encoding for a variety of devices and platforms. I've bounced back and forth a few times between mencoder and ffmpeg . Which do you recommend and why? Side question: From googling it seems that mencoder uses ffmpeg. Does it do this all the time or only when it deems necessary? You are right, mencoder uses ffmpeg. Mencoder is actually a universal interface to a number of different codecs or codec libraries like ffmpeg. So, beyond ffmpeg, mencoder can be compiled with support to x264, xvid, lame mp3 and various others that I haven't used. The point is that if you have

How to split flv file by size using FFmpeg or mencoder or smth else?

瘦欲@ 提交于 2019-12-02 05:50:55
I need to split an flv file into chunks of the known size on linux server. For example my original file is 9Mb and the chunk size is 4Mb. So I should get 3 parts - 4Mb, 4Mb and 1 Mb. Seems that FFmpeg can split only by time. Mencoder can start by time (-ss TIME) and finish by size ( -endpos SIZE MB). But if start second of the first chunk is obviously 0, then how can I get start second for next chunks? Do you have any suggestions? Thanks in advance. calculate ~time (sec) of every block & use -ss X -t X+avg_block_time for split video There is a commandline utility which does just that: http:/

Using Python to execute a command on every file in a folder

喜夏-厌秋 提交于 2019-11-28 04:38:18
I'm trying to create a Python script that would : Look into the folder "/input" For each video in that folder, run a mencoder command (to transcode them to something playable on my phone) Once mencoder has finished his run, delete the original video. That doesn't seem too hard, but I suck at python :) Any ideas on what the script should look like ? Bonus question : Should I use os.system or subprocess.call ? Subprocess.call seems to allow for a more readable script, since I can write the command like this : cmdLine = ['mencoder', sourceVideo, '-ovc', 'copy', '-oac', 'copy', '-ss', '00:02:54',

Using Python to execute a command on every file in a folder

可紊 提交于 2019-11-26 18:05:00
问题 I'm trying to create a Python script that would : Look into the folder "/input" For each video in that folder, run a mencoder command (to transcode them to something playable on my phone) Once mencoder has finished his run, delete the original video. That doesn't seem too hard, but I suck at python :) Any ideas on what the script should look like ? Bonus question : Should I use os.system or subprocess.call ? Subprocess.call seems to allow for a more readable script, since I can write the