RTSP Server using ffmpeg code has wrong ffmpeg version? - c++

I'm trying to reuse the sample code of next topic, but it does not run with ffmpeg-20190320.
Topic: FFMPEG to send RTSP encoded stream C++
I tried to change the include line to the right paths, but some files are simple gone.
All of the code can be found on the topic referring to.
I'm expecting the code from the referring topic to build and run as expected with the newer version of ffmpeg or to know what version was used so I can try to refactor it myself.

I've got the code building and running with
ffmpeg-2.0.1-win32-shared and
ffmpeg-2.0.1-win32-dev found on
https://ffmpeg.zeranoe.com/builds/win32/dev/ and https://ffmpeg.zeranoe.com/builds/win32/shared/, but I had to use the wayback machine.

Related

RTSP with Qt and VLC

I'm trying to use Qt5 to view a RTSP flow in a Windows 7 environment.
I read that QtMultimedia doesn't support RTSP (I did it well with videos of my computer and videos .mp4 on internet, but it doesn't seem to work with RTSP).
I can see the flow with VLC, so I came up with the idea of using vlc-qt
I found a sample code describing a basic usage of the library :
https://wiki.videolan.org/LibVLC_SampleCode_Qt
In order to make it work, I needed to include the libvlc.lib.
However I'm getting compiling errors such as:
QX11EmbedContainer not found
libvlc_exception_t not found
It seems that the libvlc_exception_t is deprecated in the newest version of VLC.
Are there any other possibilities? I wish I could only use Qt to include a live stream in a QWidget but I have not found anything.

Using Qt Media Player on Raspberry Pi 1

I have a project built using Qt5 which has to play a video. Just like in the videowidget sample code.
I've followed these instructions to build qt5 on my Pi. And it went just fine. But when I try to run any qt program that uses QMediaPlayer, I get the error message:
defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
Which means I don't have a backend to play the video, right? Is there any one that I can use which will with Qt, like ffmpeg? And how can I get it to work? Specially for h264 videos.
I've tried to install gstreamer as is told on this link, but it's not working. Will I have to rebuild the entire qt5 again?
P.S.: I have the raspberry pi 1 model B with raspbian installed.
Edit: As mentioned by Greenflow, I checked the ./configure log and saw that the GStreamer was compiled in, but the video apps are still not working...
The message on the log was like this:
GStreamer .............. yes (0.10)
And the message on Greenflow's log was like this:
GStreamer .............. yes (1.0)
Clearly it's another version of GStreamer, but is it the problem?
I've also found this post which says QtMultimedia on the Pi is rather useless, but the post is from 2013, so I'm not sure if it's really relevant. I'd like to have this app playing hardware accelerated videos on my Raspberry Pi, but I'm almost dropping the idea.
Anyways, thanks Greenflow for the head start.
Edit 2: Found this thread on the Qtcentre. Damn, this thing is not going to be easy to solve, I guess...
sudo apt-get install libqt5multimedia-plugins solved this for me.

C++ REST SDK Sample on Galileo

I would like to run the sample of C++ REST SDK posted in the Windows Developer Program site: https://ms-iot.github.io/content/Casablanca.htm
I was very careful to follow the steps, also using the version 2.2 of cpprest lib instead the latest one (2.4), the result is that I could run successfully the project and deploy it on my Galileo, but when the client object try to resolve the request using the sample posted in the page I received the following error:
Error exception:Error in: WinHttpSendRequest.
The code is the main.cpp in the link above, and I'm trying to run it in my Intel Galileo.
Appreciate any help because it's a bit frustrating can't find info about this error.
The most common cause of errors in the WinHttpSendRequest API are networking/DNS/firewall issues.
One easy thing to check is to ping www.bing.com from the Galileo (Telnet) command line. If that fails, then that's almost certainly the cause. You can replace www.bing.com with the IP address as a quick-and-dirty workaround.
If that's not it, is there a possibility that a firewall is blocking your request (e.g. if you are behind a corporate firewall)?
Did you run the code in the Visual Studio debugger? Can you narrow down where the exception occurs?
If that doesn't help and you're stuck, you might want to try the non-Casablanca approach: http://msdn.microsoft.com/en-us/library/windows/desktop/ms737889(v=vs.85).aspx. Personally, I find Casablanca's asynchronous structure to be confusing, and it's not of much benefit in my projects (basic HTTP client requests). Support for Winsock is packaged with the Windows image running on the Galileo, so no messy prereq configuration required.
Dan.

OpenCV haartraining: Mergevec error: Input file does not exist or not readable

Following this tutorial, I've created my positive samples but need to merge them now, using mergevec. I downloaded the mergevec.exe binary file provided and got the two required dlls cxcore100.dll and highgui100.dll. However, when I run it like so:
mergevec samples.txt samples.vec
it gives me the error:
ERROR: Input file <filename> does not exist or not readable.
What should I do to fix this? My vec files are fine, because I was able to view them using the opencv_createsamples utility. So I know they're fine.
I ran into this issue as well and made a python utility that combines .vec files to avoid installing openCV again: https://github.com/wulfebw/mergevec
Hope it helps.
I was in the same situation as you few days ago so i'll try to help you out =P.
First of all i am interested to know where you found the mergevec.exe, because it isn't available to download anymore if i recall. I ask because i think that you might have downloaded an exe compiled on Linux. I had the same error when i tried to execute the mergevec, i had compiled on Ubuntu, on my Windows computer. Even with the 2 dlls.
As i explained it here , The mergevec from Naotoshi was originally made for Unix distribution, so under windows you will encounter a lot of problems. I first tried to do it on windows but i abandonned because it was too complicated and even with a full Cygwin installation i could not compile the mergevec.cpp.
What i advise you to do is to create yourself an Ubuntu virtual machine and to compile your own mergevec.exe. Once done you can copy your vec files in your virtual machine and merge them under Ubuntu. After this you can bring back the merged vec file to Windows if you want (It is better to not run the training under a VM: less computation power).
Here is what i did:
Installed VMware player with Ubuntu 14.0.4 (although i don't recommend it, still some bugs)
Installed OpenCV from the sources with TBB. There are a lot of tutorials, but the only one that worked for me is the OPenCV website, they are the more accurate on the libraries you mandatorily need.
I downloaded the GitHub classifier training and then I followed the commands given and it worked well.
If you encounter any library problem or OpenCV Installation issue don't hesitate i went through them too.

OpenCV - How do I get started?

I just don't seem to be able to get OpenCV to work properly. Here's what I want to accomplish:
Use CodeBlocks (which I installed using codeblocks-10.05mingw-setup.exe) with OpenCV (installer: OpenCV-2.4.2.exe) on my Windows x64.
I've tried a lot of different configurations which will only bother you if I posted them all, so I hope you don't mind if I just ask the simple question: how do I get this to work?
I think I'm missing the smallest detail right now, so a detailed description of how to get started would be welcome.
If the OpenCV installer did the job, you should have by now OpenCV libraries and headers already installed in your system.
I would then go ahead and try to compile a hello world basic code, like the one you can get from here. If you would like to program using an IDE, like VisualC++ in Windows, you can follow this guide that will help you setting up the environment.
OpenCV team just introduced their new web site. There you can find Introduction to OpenCV section with installation instructions, including detailed instructions for Windows. Don't forget to cleanup your system before installation to avoid problems with mixing different install options. If you still can't get it working with CodeBlocks, follow Dan's advice and try compiling from command line.
When you are done with installation, go on and read there great new tutorials!