Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Get frame type for specific frame using ffmpeg
1er juin 2016, par DamnesiaI need to get the frame type (I/B/P) of a specific frame number for an x264 encoded movie.
How do I do this using ffmpeg/ffprobe? I'm open to other solutions as well.
-
How to Extract Timestamps and Corresponding Screenshots from .MTS File ?
1er juin 2016, par broyangI have a .MTS file, and I want to output its timestamps every n milliseconds. I have to match each timestamp with its corresponding screenshot of the video.
I tried using avchd2srt to output each timestamp, but it outputs a .srt file. I'm trying to output the timestamps in a .txt file, and the pictures in jpeg format. Does anyone have suggestions on what to do?
-
FFmpeg - Finally compiled. Now what ?
1er juin 2016, par GopgopOK So here is my story:
I am creating an app that requires me to take a couple images and a video and merge them together. At first I had no idea what to use, never heard of ffmpeg or ndk.. After around 5 days of battling NDK, switching to Ubuntu and going crazy with ndk-build commands I finally got FFmpeg to compile using the dolphin-player example. Now that I can run ffmpeg on my computer and android device I have no idea what to do next.
Here are the main questions I have:
To use FFmpeg, I saw that I need to use some sort of commands. First off what are these commands, where do I run them?
Second of all, Are the commands all I need? By that I mean can i just run my application normally, somewhere in it execute the commands in some way and it will do the rest for me? or do I need some sort of element in the code, for example VideoEncoder instance or something..
Third of all, I saw people using NDK to use FFmpeg, Do I have to? Or is it optional? I would like to avoid using C if possible as I don't know it at all..
OPTIONAL: Last but not least, Is this the best way of handling what I need to do in my application? If so, can someone guide me in a brief manner of how to use FFmpeg to accomplish said task (mention commands or anything like this)..
I know it's a wall of text but every question is important to me!
Thank you very much stackoverflow community!
-
C++ : Combine 4 YV12 images to a single image (4 quadrants). FFMPEG ?
1er juin 2016, par Paul KnopfI have 4 YV12 buffers that I need to combine to a single buffer (4 quadrants).
I could manually write a bunch of
memcpy
stuff with offsets, but I fear performance issues.Is there an FFMPEG method that I can use to achieve this?
AVFrame* topLeft = ... AVFrame* topRight = ... AVFrame* bottomLeft = ... AVFrame* bottomRight = ... AVFrame* destination = ... // topLeft-size + topRight->size + bottomLeft->size + bottomRight ->size
Maybe there is a method with a similar signature here?
void blend_image(AVFrame* src, AVFrame dest, int x, int y);
Then...
blend_image(topLeft, destination, 0, 0); blend_image(topRight, destination, 1920, 0); blend_image(bottomLeft, destination, 0, 1080); blend_image(bottomRight, destination, 1920, 1080);
Any guidance would be greatly appreciated.
-
I can't seem to install opencv2.4.13 for Python3.4 on Mac El Capitan
1er juin 2016, par ThatProgrammerDudeThis has been driving me nuts. I have been working on this non stop for a week. I have looked at many tutorials online they did not help.
I have tried so much I don't even remember what I tried. I can say the last thing I tried though.. which is this video https://www.youtube.com/watch?v=U49CVY8yOxw.
So I download opencv2.4.13, create the build folder, open cmake, configure, generate and then go to terminal and type in make.
I get this:
Richie's Macbook Air:build Richie$ make [ 2%] Built target zlib [ 6%] Built target libtiff [ 10%] Built target libjpeg [ 14%] Built target libjasper [ 16%] Built target libpng [ 23%] Built target IlmImf [ 26%] Built target opencv_core [ 31%] Built target opencv_imgproc [ 32%] Built target opencv_video [ 32%] Built target opencv_flann [ 32%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o In file included from /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg.cpp:45: /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:71:6: error: "libswscale is necessary to build the newer OpenCV ffmpeg wrapper" #error "libswscale is necessary to build the newer OpenCV ffmpeg wrapper" ^ /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:481:9: error: use of undeclared identifier 'sws_freeContext' sws_freeContext(img_convert_ctx); ^ /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:965:17: error: use of undeclared identifier 'SWS_BICUBIC' SWS_BICUBIC, ^ /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:998:5: error: use of undeclared identifier 'sws_scale' sws_scale( ^ /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1639:46: error: use of undeclared identifier 'SWS_BICUBIC' SWS_BICUBIC, ^ /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1645:14: error: use of undeclared identifier 'sws_scale' if ( sws_scale(img_convert_ctx, input_picture->data, ^ /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1693:9: error: use of undeclared identifier 'sws_freeContext' sws_freeContext(img_convert_ctx); ^ /Users/Richie/Downloads/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:2290:9: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result] avformat_write_header(oc_, NULL); ^~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ 1 warning and 7 errors generated. make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1 make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: *** [all] Error 2 Richie's Macbook Air:build Richie$
From what I can see, it says
"libswscale is necessary to build the newer OpenCV ffmpeg wrapper"
I have tried googling though to no avail, does anyone know?
EDIT: I do have ffmpeg installed... (brew).