Where is the mistake with my -apply_video command line?

(bill) #1

I tried to apply some effect to my video, i use Gmic 2.0.3

gmic -w -apply_video harry.avi,\"-fx_highlight_bloom 0,255,30,0,0\",0,-1,1,Harry2.avi

The output video Harry2.avi is created but with 0mb size. The input video have 15 seconds, i tried other video mp4 and avi, same result.

The command line is wrong?


(G'MIC staff) #2

Just tested on one of my video file. That command works perfectly for me, and generate the expected output video file.
So right now, I don’t have an answer. I’m using G’MIC 2.1.0_pre on Ubuntu 16.04 (64bits).
It may be that your version of OpenCV (which is the lib used to read/write video files) is not working properly.
What if you run the same command line with the -debug flag ? Is there any error message displaying ?
Do you see the video being processed in the opened window ?

(bill) #3

With -debug i got many lines code, i found only this error: File ‘harry.avi’, unable to detect format of video file.
ok i include the debug result in text file: gmic debug.txt (16.8 KB)

I use the exe gmic version in windows 10.

Thank you!

(G'MIC staff) #4

OK, so I suspect OpenCV on Windows not to be able to read your video file.
Is it possible you put it somewhere so I can test with the same file on Linux, to see if that is working as expected ?


@bil80 @David_Tschumperle I am using win7 and encountering the same problem, except the output file is nowhere to be found. debug.txt (16.4 KB).

gmic -debug -w -apply_video BigBuckBunny_320x180.mp4,\"-fx_highlight_bloom 0,255,30,0,0\",0,-1,1,output.mp4 > debug.txt

(G'MIC staff) #6

To be honest, I’m not even sure OpenCV is linked with the cli binary of G’MIC in Windows.
Cannot check before Monday, but if this is the case, there are no hope to get streaming video support for Windows users.


@David_Tschumperle Are you suggesting that the dlls that come with G’MIC-CLI might not be linked? Maybe it is missing a module related to video (see http://docs.opencv.org/3.3.0/). I have no idea; I am not a developer.

(Borys) #8

I have the same problem/error with this command:
gmic -w -average_video MOVI0001.mp4 -n 0,255 -o MOVI0001avg.jpg
and error looks:
*** Error *** Command ‘-output’: File ‘MOVI0001avg.jpg’, instance list (0,00000000) is empty.
Below I include -debug listing for this command.
gmic_dbg.txt (17.3 KB)
I use Win10pro and the last version (2.0.4) of GMIC CLI.

I write it in hope my input can help in resolving this problem.


(G'MIC staff) #9

Tested today on my Win7 VM, and indeed, it seems that the default codec used (MPEG4) is not supported by default on Windows. I had to switch to codec MPEG2 instead.
I’ll probably make MPEG2 as default on Windows for the next release.


Interesting… Would something like this help? http://docs.opencv.org/3.3.0/d0/d61/group__cudacodec.html

(bill) #11


(Tobias Fleischer) #12

This is a common problem with the Windows build of the GMIC binaries with OpenCV and has been discussed several times already, but still no solution in sight, I think.
Check for example these threads:

(bill) #13

As David said the solution will be probably in the next release.

(G'MIC staff) #14

You may try with the latest version posted on the G’MIC web site (numbered 2.1.1).
I’ve changed the default video codec (for writing) used by G’MIC on Windows. If this doesn’t work, I don’t know what other thing I can do, to be honest.