Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to play raw iLBC frame
27 novembre 2014, par QuanlongI implemented a iLBC encoder, then I want to play the encoded iLBC frames in order to check if encoder works as expected.
I have tried with
ffmpeg
-
looking for the right regex expression to pick some specific sentences from a file using java regex
26 novembre 2014, par sachh_ke_nasdiikI am writing a program in java that records the screen. it is actually something that uses the ffmpeg tool with a simple GUI. what I actually need is a way to grab from the following file:
- ffmpeg version N-57367-g2f31b73 Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 23 2013 20:22:19 with gcc 4.8.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable->bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable- libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable- libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable- libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable- libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable- libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable- libxavs --enable-libxvid --enable-zlib
- libavutil 52. 47.101 / 52. 47.101
- libavcodec 55. 38.101 / 55. 38.101
- libavformat 55. 19.104 / 55. 19.104
- libavdevice 55. 4.100 / 55. 4.100
- libavfilter 3. 89.100 / 3. 89.100
- libswscale 2. 5.101 / 2. 5.101
- libswresample 0. 17.104 / 0. 17.104
- libpostproc 52. 3.100 / 52. 3.100
- [dshow @ 02482700] DirectShow video devices
- [dshow @ 02482700] "screen-capture-recorder"
- [dshow @ 02482700] DirectShow audio devices
- [dshow @ 02482700] "Microphone (ASUS Xonar DGX Audio Device)"
- [dshow @ 02482700] "virtual-audio-capturer"
- [dshow @ 02482700] "Line In (ASUS Xonar DGX Audio Device)"
- [dshow @ 02482700] "Stereo Mix (ASUS Xonar DGX Audio Device)"
- [dshow @ 02482700] "Aux (ASUS Xonar DGX Audio Device)"
- [dshow @ 02482700] "Wave (ASUS Xonar DGX Audio Device)"
- dummy: Immediate exit requested
only the sentences between the quotation marks, those that describes the different devices, that shows up at the end of the file, ignoring of course the line numbering, that does not appear in the output file, but inserted here for better fluency. does anyone have any ideas how to work it out using java regex? assuming I am using an enhanced for loop over a string array checking each line for its contents.
-
video processing on android using ndk with ffmpeg and opencv is very slow
26 novembre 2014, par Zhiqiang LiI'm doing some video processing on android using ndk.
What I'm doing now is decode the video using ffmpeg, grab the frame, convert it to opencv mat, then overlay some images on it, then convert it back to avframe, encode it back to a video.
But it's very slow! It takes about 50 seconds to process a 480*480 video with 15 fps.
I tried to do this using opengl es, reading the result image using glReadPixels, but from what I understand, glReadPixels doesn't really work on some devices. So I had to give it up.
As I understand, I have some very expensive operations in my current workflow,
- covert a AVFrame from yuv to bgr color space, then convert to opencv mat
- overlay a mat on another mat
- covert a opencv mat to AVFrame, then convert the frame from bgr to yuv space, then encode it into a video.
So, are there ways to improve my current workflow?
I'm adding multithread feature, but only devices with multicore cup can benefit from that.
-
ffmpeg Join MP4 videos, error (audio) of vine.co
26 novembre 2014, par user3537531I've tried everything bucar after searching and I have not managed to unite vine.co videos to upload to youtube. Sometimes youtube error notifies Encryption, sometimes the video is cut audio to half, and in other cases the audio does not match the video.
things I've tried
file '/path/to/1.mp4' file '/path/to/2.mp4' ffmpeg -f concat -i list.txt -c copy result.mp4
ffmpeg -i concat:"1.mp4|2.mp4" -codec copy result.mp4
ffmpeg -i "concat:1.mp4|2.mp4" -c copy result.mp4
The video is created, but always happen any errors or youtube audio conversion error tells me.
We are talking of joining between 300 and 1,000 videos of between 3 and 6 seconds.
From what I've read all would have to have the same frame rate and the same resolution.
I have also proven to mp4box and post on youtube gives me trouble conversion
mp4box-cat 1.mp4 -cat 2.mp4 -new result.mp4
And not more I can do, I hope you can help me to attach a lot of videos on console. A greeting and thanks.
-
Increase resolution of captured image using avconv
26 novembre 2014, par user3723711I am setting two virtual devices using gst-launch-0.10:
gst-launch-0.10 v4l2src device=/dev/video1 ! video/x-raw-rgb,framerate=30/1,width=640,height=480 ! ffmpegcolorspace ! tee name=t ! v4l2sink device=/dev/video2 t. ! queue ! v4l2sink device=/dev/video3
then for /dev/video2 I am using ffmpeg to stream video and then I send this stream to browser:
ffmpeg -s 640x480 -f video4linux2 -i /dev/video2 -f mpeg1video -b 800k -r 30 http://localhost:8082/pass/640/480/
now on my browser when user clicks on "capture" button I am using this function to capture the frame from ffmpeg stream using avconv:
function captureImage(res, path) { var ffmpeg_options = ['-s', '1280x720', '-f', 'video4linux2', '-i', '/dev/video3', '-ss', '0:0:0', '-frames', '1', path]; avcov_capture = spawn('avconv', ffmpeg_options, null); var stream = false; avcov_capture.stdout.on('data', function(buf) { console.log('CAP OUT: ' + buf.toString()); }); avcov_capture.stderr.on('data', function(data) { if (data.toString().indexOf('frame') >= 0) { var ret = { result : 'captured', path : path }; checkFile(res, ret, path); } }); };
My question is when I capture a frame using avconv (in captureImage function), how I can increase the resolution of that image and stop ffmpeg stream after I capture a frame?
Is it a better idea if I increase resolution of video stream sent to video2 in gst-launch pipeline?If so how can I add that setting to my pipeline.