How to debug JavaCV cvCreatefileCapture on Ubuntu 13.03 - javacv

I have some JavaCV code that works on windows and I'm trying to get it to work on Ubuntu. All of the image processing is working fine, but I can't get any video to work.
When I call cvCreateFileCapture on Ubuntu it always returns null. I can verify the file is present (java.io.File.exists returns true on the line before), so I assume this is a codec problem.
However, I have tried using video files with MPEG-2, H.264, AVI, and basic mjpeg encodings and get the same result for all of them. The same code works fine on my windows machine.
My question is what are the next debugging steps to figure out my problem. Randomly trying further codecs doesn't seem productive. Is there some way to figure out which codecs are available and why they are not getting selected?
It is picking up the opencv libraries by having opencv-linux-x86_64.jar and ffmpeg-linux-x86_64.jar in the path.

Related

ffmpeg crashes when extracting PNG's from video

I am attempting to extract PNG's from a video (.avi) using ffmpeg. My code is:
ffmpeg -i vidx.avi -f image2 imgx_%d.png
Normally that would work fine, but just now it has been causing ffmpeg to crash, a box appears telling me 'ffmpeg.exe has stopped working .. etc...', however changing from png's to jpeg's and the problem goes away.
The format of the video doesn't seem to matter, an mp4 and mpg also have the same issue as the avi.
This has only just happened (in the past day) on a Windows 10(x64)PC so, could it be related to a MS/Windows Update.. is that possible? Does anyone know what else could cause this?
Looking at recently installed programs, realised I'd installed ImageMagick, which has a command-line interface and the Environmental Variable, which was automatically set, is for the folder that not only includes the "magick.exe" but also an "ffmpeg.exe" (version 3.4), and as this was on the Environmental Variables list first, Windows assumed that was the version to use, and not the standalone version that I normally use (a nightly-build from http://ffmpeg.zeranoe.com/builds/).
So just moving the standalone version above the ImageMagick entry did the trick.

ffmpeg streaming multiple avi files as created

Backstory:
I have a VB.net program (that is using a much older COM object accessing a DVR) to create sequentially numbered AVI files each 15 seconds in length. A new AVI is created every 15 seconds with the most recent 15 seconds of video in it. I know the exact datetime that correlates to each file. So files may be named (20121008-133445.avi, so yyyyMMdd-hhmmss.avi).
Question: Using ffmpeg/ffserver (preferably but I'm open), how can I create a stream such that when a person accesses it that they are presented a continuous video that starts at a position that is as recent as possible and continues to stream the avi files as they are created?
I don't have a problem shipping these files off to a Linux box via a samba share (or have the linux box access a share on the windows box) if Linux is more capable. I am however stuck with Windows for the actual generation of the original AVI files.
The ultimate goal is to be able to view these streams on an iPad, but that process seems pretty well documented elsewhere.
I found a question that reads similar to my needs but didn't seem to go anywhere: FFmpeg make mpeg2 ts without discontinuity
Thanks in advance!
Why don't you write a small program that simply reads these files one after another continously and dumps them to a named pipe. Ffmpeg can then read from the named pipe and it will think it is one file.
The more complex solution is to use multifilesrc from gstreamer.

DirectShow Filters - how to use and find correct filters

I have a program that was developed using capFilter-"Ds.Net Video Capture Device" and baseGrabFlt-"Ds.Net Grabber".
I am not that familiar with DirectShow and have been trying to determine why this program suddenly stopped working on two machines that it had been working fine. I have used a program to look at the installed filters and don't see any filters named "Ds.Net".
Two questions - can I change these filters? Or how do I find them and install them again on these machines to make the application work again.

Get available X11 video modes without extensions

I've been searching around and can't find a solution for this. The official NVIDIA Tegra 2 Linux SDK (L4T) doesn't include both XRandR or the VideoMode X11 extension for querying available video modes. My next thought was to parse the log file for video modes. Of course most of the time it's at /var/log/Xorg.0.log but I'd rather not always make that assumption. The XF86misc extension provides a way to get the log path but that extension is also not installed by default.
So I'm wondering if anyone knows of any other way to figure out what video modes are available and also what the current video mode of the display is.
The core X protocol does not mention modes. You have to use extensions. There's nothing wrong with that, that's what extensions are for.
Also, remember that there's no guarantee that the machine you're displaying on is the same machine as you're running on, so parsing the X log file is destined to fail if your app ever runs across the network.

Video for Windows error 80044066

I'm using Video for Windows to record screen grabs to AVI files. Usually it works fine, but some users report the error:
AVI error (80044066): Bad format
Any explanations of what this error means and what might be causing it would be gratefully accepted.
Is it possible that some machines have the right codec installed but others do not?

Resources