Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How do i know in the ffmpeg arguments command line what each argument do ?
24 mai 2013, par Revuen Ben DrorI have this code:
public void Start(string FileName, Bitmap Sample_Bitmap, int BitmapRate ) { p = new NamedPipeServerStream(pipename, PipeDirection.Out, 1, PipeTransmissionMode.Byte); byte[] b = new byte[1280 * 720 * 3]; // some buffer for the r g and b of pixels of an image of size 720p System.Diagnostics.Process process = new System.Diagnostics.Process(); process.StartInfo.FileName = @"D:\pipetest\pipetest\ffmpegx86\ffmpeg.exe"; process.EnableRaisingEvents = false; process.StartInfo.WorkingDirectory = @"D:\pipetest\pipetest\ffmpegx86"; process.StartInfo.Arguments = @"-f rawvideo -pix_fmt rgb24 -video_size 1280x720 -i \\.\pipe\mytestpipe -map 0 -c:v libx264 -r " + BitmapRate + " " + FileName; process.Start(); process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = false; p.WaitForConnection(); }
So i know what BitmapRate do and the FileName but the rest of the arguments.
What odes it mean the
-f ?
and the rawvideo is that from the decoders or encoders? -i ? -c:v ? libx264
is a codec i guess and-r ?
Tried to google for this arguments format but didn't find any.
I have 4 text files lists:
encoders.txt decoders.txt
in both files i have rawvideo too. I havepixfmts.txt and fileformats.txt
files.I want to build the arguments string from variables.
So for example BitmapRate is int and FileName is string. And the rest of the arguments what types of variables each one i should put to get in the function ?
For example
the rgb24 what type is it ? the 1280x720 what type of variable it should be ?
-
Play YUV sequence of images with JSP
24 mai 2013, par Simon WangI could get YUV images from Camera for 20 frames per second, i want to play it as live streaming on JSP page.
I have done some research about JMF/FFMpeg, maybe they could work with J2SE(Swing),but seems hard to work on web application(Tomcat+JSP pages).
Any suggestion will be appreciated!
-
FFMPEG SCREENSHOT GENERATE ERROR : No such filter : 'tile' [duplicate]
23 mai 2013, par itseasy21This question is an exact duplicate of:
i have been trying on making multiple screenshots from a video file using ffmpeg and i succeed too in command but the only problem is while executing that i am getting this error:
No such filter: 'tile' Error opening filters!
The command i execute is:
ffmpeg -ss 00:00:10 -i './tmp/try.avi' -vcodec mjpeg -vframes 1 -vf 'select=not(mod(n\,1000)),scale=320:240,tile=2x3' './tmp/try.jpg'
The output i get is:
xxxxx@xxxx.com [~/public_html/xxxx]# ffmpeg -ss 00:00:10 -i './tmp/try.avi' -vcodec mjpeg -vframes 1 -vf 'select=not(mod(n\,1000)),scale=320:240,tile=2x3' './tmp/try.jpg' ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers built on Mar 10 2012 18:07:20 with gcc 4.4.6 20110731 (Red Hat 4.4.6-3) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-pthreads --enable-x11grab --enable-vdpau --disable-avisynth --enable-frei0r --enable-libopencv --enable-libdc1394 --enable-libdirac --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --disable-stripping libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 25.00 (25/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './tmp/try.avi': Metadata: major_brand : 3gp4 minor_version : 512 compatible_brands: isomiso23gp4 creation_time : 1970-01-01 00:00:00 Duration: 00:09:24.82, start: 0.000000, bitrate: 118 kb/s Stream #0.0(und): Video: h263, yuv420p, 176x144 [PAR 12:11 DAR 4:3], 102 kb/s, 25 fps, 25 tbr, 25 tbn, 29.97 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream #0.1(und): Audio: amrnb, 8000 Hz, 1 channels, flt, 12 kb/s Metadata: creation_time : 1970-01-01 00:00:00 Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p' [buffer @ 0x1ad89a0] w:176 h:144 pixfmt:yuv420p tb:1/1000000 sar:12/11 sws_param: No such filter: 'tile' Error opening filters!
any solution for this ????
-
error of streaming video using fluent-ffmpeg node.js module
23 mai 2013, par user824624I am running the fluent-ffmpeg sample to stream the video, which works well. Now in contract show the video in flashe version based flowplayer, I am now using html5 version flowplayer, but it said the video file not found.
app.get('/video2/abc', function(req, res) { console.log('/video/:filename'); res.contentType('mp4'); var pathToMovie = 'public/flowplayer/470x250.mp4' ; var proc = new ffmpeg({ source: pathToMovie, nolog: true }) .writeToStream(res, function(retcode, error){ if(error) console.error('error',error); else console.log('file has been converted succesfully'); }); });
here is my html template.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"> </script>
<script src="http://releases.flowplayer.org/5.4.0/flowplayer.min.js"></script>
<script>
// global configuration (optional)
flowplayer.conf = {
rtmp: "rtmp://s3b78u0kbtx79q.cloudfront.net/cfx/st",
swf: "http://releases.flowplayer.org/5.4.0/flowplayer.swf"
};
// force flash with query - only for testing, do not use this switch in production!
if (/flash/.test(location.search)) flowplayer.conf.engine = "flash";
// install player manually
$(function() {
$(".player").flowplayer({
// reverse fraction of video aspect ratio
// video dimensions: 470px / 250px
ratio: 25/47
});
});
</script> -
Ffmpeg set duration using node-fluent-ffmpeg
23 mai 2013, par VprnlI'm really new to the world of ffmpeg so please excuses me if this is a stupid queston.
I'm using the module Node-fluent-ffmpeg to stream a movie and convert it from avi to webm. So far so good (it plays the video), but I'm having trouble parsing the duration to the player. My ultimate goal is to be able to skip ahead in the movie. But first the player needs to know how long the video is.
my code is as followed:
var stat = fs.statSync(movie); var start = 0; var end = 0; var range = req.header('Range'); if (range != null) { start = parseInt(range.slice(range.indexOf('bytes=')+6, range.indexOf('-'))); end = parseInt(range.slice(range.indexOf('-')+1, range.length)); } if (isNaN(end) || end == 0) end = stat.size-1; if (start > end) return; res.writeHead(206, { // NOTE: a partial http response 'Connection':'close', 'Content-Type':'video/webm', 'Content-Length':end - start, 'Content-Range':'bytes '+start+'-'+end+'/'+stat.size, 'Transfer-Encoding':'chunked' }); var proc = new ffmpeg({ source: movie, nolog: true, priority: 1, timeout:15000}) .toFormat('webm') .withVideoBitrate('1024k') .addOptions(['-probesize 900000', '-analyzeduration 0', '-bufsize 14000']) .writeToStream(res, function(retcode, error){ if (!error){ console.log('file has been converted succesfully',retcode); }else{ console.log('file conversion error',error); } });
I tried to set the header with a start and a end based on this article: http://delog.wordpress.com/2011/04/25/stream-webm-file-to-chrome-using-node-js/
I also looked in the FFmpeg documentation and found -f duration and -ss. But I don't quite know how to convert the byte range to seconds.
I feel like I'm pretty close to a solution but my inexperience with the subject matter prohibits me from getting it to work. If I'm unclear in any way please let me know. (I have a tendency of explaining things fuzzy.)
Thanks in advance!