can anybody tell me example of c code for openmax, to play an video file located in local drive.
you can find header files at the link given below-
http://www.khronos.org/registry/omxal/
Thanks.
use the audio.s() method, then reverse the autpout to video linking
Related
I am creating a project in c++ with QtCreator (5.14.1, MingGW compiler) and trying to use OpenCv (3.4.16) to read video files. I have tried many files of standard formats and codecs (H.264, yuv420, .mov etc). However, no matter what I try, VideoCapture() always silently fails. It doesn’t crash or show any error code, instead isOpened() is just always false.
I think the cause is that I am building opencv (via this tutorial https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows) without internet connection (I cannot have internet connection on this machine, so please do not ask me to) and therefore it can’t download the FFMPEG libraries during this process. I have been looking everywhere for information about how to download the FFMPEG libraries for opencv directly but I haven’t had any luck.
Can someone please explain what libraries I need to download and how opencv goes about looking for them? because at the moment I don’t know what I need, nor where to put them, and I cant find any information on the topic.
Or, can someone explain why calling VideoCapture(“video.mov”, cv::CAP_ANY) doesn’t have any effect? (despite being able to play the video easily in VLC, MediaPlayer etc).
Code:
`
int main()
{
VideoCapture cap(“C://video.mov”);
//VideoCapture cap(“C:/video.mov”);
//VideoCapture cap(“C:\video.mov”);
//VideoCapture cap(“C:\video.mov”);
if (!cap.isOpened()){
cout << "Error opening video stream or file"<< endl;
return -1;
}
}
`
I have tried downloading some ffmpeg DLLs and the EXEs and adding them to the PATH, no success. I have also tried downloading the shared GPL of ffmpeg (that comes with the libs and include) and added them my .pro file but no change in VideoCapture behavior.
I have also tried moving the opencv_ffmpeg_64.dll (found in opencv/build/bin) to my executable directory but that didn't fix anything.
In the end I used this guys answer,
How do i compile opencv_ffmpeg.dll file using mingw on windows 10 64 bit?
Just note that some of the directories are a little different now. You don't need to put them in a folder named after the hash, or in a 'download' subdirectory, and you need to copy all of them to opencv-build/3rd party/ffmpeg/. I also put them in opencv/source/3rd party/ffmpeg, but not sure if I needed to do that. Finally you need to go into the ffmpeg.cmake file and set 'status' to TRUE when the download fails (or just remove the download part altogether), this lets it call ffmpeg_version.cmake and set things up.
I downloaded the files from the timit speech corpus found here: https://github.com/philipperemy/timit
When I try playing the .WAV files with groove music or windows media player I get an error saying the file cannot be played.
However after converting the file to mp3 using an online converter, the file suddenly works.
The .WAV files are only around 100-200KB in size.
Does anyone know what the reason for this problem might be?
Found the answer here: reading a WAV file from TIMIT database in python
Apparently it is not actually a .WAV file but a NIST file.
I need a simple ffmpeg conversion task to be done inside an application:
ffmpeg -i input_file.m4v -vcodec copy -acodec copy -vbsf h264_mp4toannexb output_file.ts
This works well using the terminal. I've successfully compiled ffmpeg's static lib. Some examples work perfectly, that means the lib is working. How do I implement the behaviour of the above command line with this library?
I looked into ffmpeg.c. But there is so much code inside that it took me hours to get an idea on how it works. Finally I still don't really understand the whole structure.
I would be very happy if someone could help me understanding how to use the library to do the very same what the example command line does. (At the end I just want to transmux mp4 files to ts files without reencoding)
Thanks in advance
Jack
I'm using Wischik's example code for creating AVI files, however after I run the code and it exits successfully no AVI file is created. I looked through the code and cannot find where it writes/saves/creates an AVI file on your computer. Does anyone know where the code saves AVI file or if it doesn't, a way to make it save the AVI file created to your computer? Thanks
link to source code here
Wischik source code
You should find test.avi in the project directory. Since you know it's name, you could also use Windows explorer to search for it.
To examine further, (assuming you are using VC++), goto
Tools > Options > Projects and Solutions > VC++ Directories,
and Show Directories for Include files.
That will tell you where the headers are.
Alternatively, set a break point at the line where AVIFileOpen is called, and follow the execution path to see what it does.
I use this code to create an mkv file with a webm video:
Code
The video that is generated can be opened in vlc and mplayer, however, firefox sais: video can't be played because the file is corrupt
How do I have to change the header so I can open it in firefox, too?
Found the solution... this code actually outputs a so called ivf format, while the real mkv output code can be found here:
(Much more complicated, though)