Tags down


opencv VideoWriter for Java does not work as expected on MacOS

By : Lei Cheung
Date : September 15 2020, 08:00 AM
it fixes the issue The issue was that the test images were PNG images which have 4 channels.
The following changes fixed the situation:
code :
 String msg = String.format("recording: %dx%d %d channel %s video with %s",
            testMat.width(), testMat.height(),testMat.channels(), ext, FOURCC);
-rw-r--r-- 1 wf     81845  9. Jan 11:05 test_avc1_2020-01-09110505.mov
-rw-r--r-- 1 wf     87402  9. Jan 11:05 test_avc1_2020-01-09110506.avi
-rw-r--r-- 1 wf     81920  9. Jan 11:05 test_avc1_2020-01-09110507.mpg
-rw-r--r-- 1 wf    389053  9. Jan 11:05 test_fmp4_2020-01-09110505.mov
-rw-r--r-- 1 wf    395162  9. Jan 11:05 test_fmp4_2020-01-09110506.avi
-rw-r--r-- 1 wf    391168  9. Jan 11:05 test_fmp4_2020-01-09110507.mpg
-rw-r--r-- 1 wf     81845  9. Jan 11:05 test_h264_2020-01-09110506.mov
-rw-r--r-- 1 wf     87402  9. Jan 11:05 test_h264_2020-01-09110507.avi
-rw-r--r-- 1 wf     81920  9. Jan 11:05 test_h264_2020-01-09110508.mpg
-rw-r--r-- 1 wf   3618564  9. Jan 11:05 test_jpeg_2020-01-09110506.mov
-rw-r--r-- 1 wf   3624510  9. Jan 11:05 test_jpeg_2020-01-09110507.avi
-rw-r--r-- 1 wf   3631104  9. Jan 11:05 test_jpeg_2020-01-09110508.mpg
-rw-r--r-- 1 wf   3618564  9. Jan 11:05 test_mjpg_2020-01-09110506.mov
-rw-r--r-- 1 wf   3624510  9. Jan 11:05 test_mjpg_2020-01-09110507.avi
-rw-r--r-- 1 wf   3631104  9. Jan 11:05 test_mjpg_2020-01-09110508.mpg
-rw-r--r-- 1 wf    389053  9. Jan 11:05 test_mp4v_2020-01-09110506.mov
-rw-r--r-- 1 wf    395162  9. Jan 11:05 test_mp4v_2020-01-09110507.avi
-rw-r--r-- 1 wf    391168  9. Jan 11:05 test_mp4v_2020-01-09110508.mpg
-rw-r--r-- 1 wf     81845  9. Jan 11:05 test_x264_2020-01-09110506.mov
-rw-r--r-- 1 wf     87402  9. Jan 11:05 test_x264_2020-01-09110507.avi
-rw-r--r-- 1 wf     81920  9. Jan 11:05 test_x264_2020-01-09110508.mpg
-rw-r--r-- 1 wf    389053  9. Jan 11:05 test_xvid_2020-01-09110506.mov
-rw-r--r-- 1 wf    395162  9. Jan 11:05 test_xvid_2020-01-09110507.avi
-rw-r--r-- 1 wf    391168  9. Jan 11:05 test_xvid_2020-01-09110508.mpg

Share : facebook icon twitter icon

Has anyone ever had OpenCV work with Python 2.7 on MacOS 10.6?

By : kaj
Date : March 29 2020, 07:55 AM
I wish did fix the issue. Coincidentally, I did this yesterday, and it works now. I used the guide found here, in Section 2, "Building via Homebrew".
Except, it says.
code :
sudo brew install python     ( the system python is not good enough)

Opencv java interface has no "VideoWriter" class

By : Denali Osborn
Date : March 29 2020, 07:55 AM
I wish this helpful for you this is a known bug . you'll have to wait a bit for it getting fixed.

OpenCV VideoWriter doesn't work

By : user2832940
Date : March 29 2020, 07:55 AM
I hope this helps you . Dimazavr's answer is not totally right. First, you need to change the output video filename extension from .mp4 to .avi. Then if you run the code, you will get the following error information:
code :
OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv backend does not support this codec.) in CvVideoWriter_GStreamer::open, file /home/rwduzhao/store/opencv-2.4.13/modules/highgui/src/cap_gstreamer.cpp, line 1372
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/rwduzhao/store/opencv-2.4.13/modules/highgui/src/cap_gstreamer.cpp:1372: error: (-210) Gstreamer Opencv backend does not support this codec. in function CvVideoWriter_GStreamer::open

Aborted (core dumped)
CV_FOURCC('P','I','M','1')    = MPEG-1 codec
CV_FOURCC('M','J','P','G')    = motion-jpeg codec
CV_FOURCC('M', 'P', '4', '2') = MPEG-4.2 codec
CV_FOURCC('D', 'I', 'V', '3') = MPEG-4.3 codec
CV_FOURCC('D', 'I', 'V', 'X') = MPEG-4 codec
CV_FOURCC('U', '2', '6', '3') = H263 codec
CV_FOURCC('I', '2', '6', '3') = H263I codec
CV_FOURCC('F', 'L', 'V', '1') = FLV1 codec

opencv for java videowriter can't open

By : Михаил Кузнецов
Date : March 29 2020, 07:55 AM
I wish did fix the issue. The openCV download contains the mp4 codec in the dynamic link library file opencv_ffmpeg343_64.dll. To make that visible to the JVM, run a lines like this before you open the VideoWriter.
code :
System.setProperty("java.library.path", "C:\pathToFolderContainingDLL")
val fieldSysPath = ClassLoader::class.java.getDeclaredField("sys_paths")
fieldSysPath.isAccessible = true
fieldSysPath.set(null, null)
//next time path is accessed, the new path will be imported


macos with vscode ctrl+f2 does not work on macos as expected

By : Chester238
Date : March 29 2020, 07:55 AM
help you fix your problem This issue is related to Electron-based applications like VSCode, Azure Data Studio and Microsoft Teams. See https://en.wikipedia.org/wiki/Electron_(software_framework)
It doesn't happen with bundled macOS applications, Chrome or Office applications. So, it seems to be related to the Electron infrastructure and should be solved at that level. You can report the issue to their GitHub repository at https://github.com/electron/electron
Related Posts Related Posts :
  • Java MIDI sequencer never ends
  • Java Spring: getting the generic type
  • copy specific elements if condition is met
  • How to parse time from string?
  • After upgrading spring version getting java.lang.NoClassDefFoundError:
  • How to close application on onBackPressed() in home activity
  • NullPointerException while setting field in Test Class
  • Order of serialization in Java
  • Vaadin 14 Grid + Dialog: How to refresh grid after closing dialog?
  • finding words within String and returning as String + spaces Java
  • Negative Values when calculating time of a java date
  • when case switch between kernel mode and user mode for synchronized keyword in JAVA
  • Creating a repetitive action in a GUI without 'time drift'
  • Why Map api doesn't provide stream capabilities in Java?
  • Multi threaded issue with myMethod()
  • Is Java Synchronization required when loading data from another thread once?
  • Pass Multiple Keys in @Requestparam with a Single String Variable
  • PriorityQueue returning elements in wrong order
  • How to get sum of doubles in list using stream?
  • How to remove field from object conditionally, by other ENUM field value
  • MariaDB and flyway syntax error but not in JAVA
  • How to check in an array list if an item is immediately followed by another - Java
  • Class FIle has no arguments at the constructor
  • JavaFx 13 - TableView Vertical ScrollBar handler returns NullPointerException
  • Code crashes every time the helper class is executed
  • Java Problem- Null char prints no character on Mac OS but does print a blank space on Windows
  • Configuration of a Spring Data Repository class to hit read_replica_db for read/select methods and main_db for write/ins
  • Java PriorityQueue poll() order of values
  • Intiize the Custom object with empty string in java
  • Facing issue to handle more then two window with selenium webdriver
  • How to set connectTimeout in case of slow internet and if I don't know the size of file to download
  • Regular expression to remove the dot (.) from a number
  • Access shared folder from linux machine using java code
  • java code style: returning specific Map implementation when generic contract is not sufficient
  • Java function inside __groovy executes but the result is not being assigned to a variable
  • Decorating a concrete class, bad practice?
  • Copy table from Oracle to Redis
  • Moshi Multiple Custom Names
  • Create actual date in string format from microseconds with precision of microseconds
  • How to generate a spinner in Android with different background color in each item with Java?
  • Java8 variable in for loop
  • Why is my java code throwing an error when I get input from the user?
  • Why does Java's Stream.reduce method take an identity element instead of a default result?
  • Upload arraylist using httpurlconnection multipart/form-data
  • Java split() method can not distinguish "." and "-" on Windows
  • Java HashMap Did Not Return Expected Result when put the data
  • I am doing an attendence program with java and mySQL, and its not working well with me. Here's the code:
  • IBM MQ JMS java listener code keeping the program running
  • Java 'finally' clause in a nested 'try' block
  • How to call methods in functional interfaces without .Method()
  • how to make list of duplicates in custom arraylist Java
  • Safe publication of array/collection/map contents written once
  • How to set a new value (Date) for a Java bean property?
  • ExecutorService thread safety
  • StringBuilder - setLength(0) vs new instantiate, what is better?
  • Upgraded spring boot from 2.1.0 to 2.2.2.RELEASE , now getting exception while starting
  • Is it possible to find the original sequence of integers from its prefix sums and suffix sums?
  • How can I round up to 3 Decimal places in Java such that .000 shoould be there at the end of the value even if it is a s
  • What is the correct regex for a 24 hour clock with alphabet support (java)
  • Calculate next Birthday date given a birhdate?
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk