Table of Contents need accomplish The front-end plays the picture of Hikvision camera Record video Method 1: HTMLVideoElement (obsolete) Method 2: HTMLCanvasElement (obsolete) Method three: javaCV code question Requirement The front end receives the hls stream converted from rtsp by webrtc-streamer Click the start button to start recording for a while Click the Stop button […]
Tag: javac
Java obtains video, audio, picture and other metadata information (resolution, size, frame and other information) through javacv
I believe that we all need to return some video or audio information to the front end more or less, so today’s article uses javacv to obtain video, audio, picture and other metadata information (resolution, size, frame, etc.) through Java language 1. First import dependencies You can first import the javacv/javacv-platform dependency. Since the dependency […]
Use POI and JavaCsv tools to read excel files (*.xls, *.xlsx, *.csv) and store them in the MySQL database
First configure maven: import related dependencies 1 <dependency> 2 <groupId>org.apache.poi</groupId> 3 <artifactId>poi</artifactId> 4 <version>3.14</version> 5 </dependency> 6 <dependency> 7 <groupId>org.apache.poi</groupId> 8 <artifactId>poi-ooxml</artifactId> 9 <version>3.14</version> 10 </dependency> 11 <!– https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas –> 12 <dependency> 13 <groupId>org.apache.poi</groupId> 14 <artifactId>poi-ooxml-schemas</artifactId> 15 <version>3.14</version> 16 </dependency> 17 <!– https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans –> 18 <dependency> 19 <groupId>org.apache.xmlbeans</groupId> 20 <artifactId>xmlbeans</artifactId> 21 <version>3.0.0</version> 22 </dependency> 23 […]
Convert video using ffmpeg or Javacv
Background Recently, there was a need to convert an mp4 video into an avi video. To this end, I searched for information and found methods such as ffmpeg, Javacv, and Xuggler. Among them, I couldn’t import the dependency on Xuggler, so I gave up. Here is a brief record of FFmpeg and Use of Javacv. […]
JAVACV operations on video streams and video files
MAVEN dependencies <!– mac platform error https://gitee.com/52jian/EasyMedia/issues/I5ZMMR–> <!– The media only uses the following two, javacv, ffmpeg –> <dependency> <groupId>org.bytedeco</groupId> <artifactId>javacv</artifactId> <version>1.5.7</version> </dependency> <!–ffmpeg for all platforms–> <dependency> <groupId>org.bytedeco</groupId> <artifactId>ffmpeg-platform</artifactId> <version>5.0-1.5.7</version> </dependency> <!– hutool tool package –> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>5.3.3</version> </dependency> JavaCvUtil package com.xiaobu.util; import cn.hutool.core.util.StrUtil; import lombok.extern.slf4j.Slf4j; import org.bytedeco.ffmpeg.global.avcodec; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacv.FFmpegFrameGrabber; […]
springboot (JavaCV) realizes the Nth frame of video interception and saves the picture
springboot (JavaCV) realizes the Nth frame of video interception and saves the picture Now the display list of video websites is displayed with img tags, and gif is used for animations, but when we upload videos, there is no video cover, so we need to automatically generate and save the cover when uploading to the […]
IOC uses JavaConfig to implement configuration
IOC uses JavaConfig to implement configuration DI injection can also be configured through JavaConfig 1. Attribute injection 1.1 Ordinary attribute injection //A color class public class Color {<!– –> @Value(“blue”) private String color; } //This is the configuration class @Configuration public class SpringConfig {<!– –> @Bean public Color getColor(){<!– –> return new Color(); } } […]
JavaCV magic: 0.1% CPU usage, efficient processing of real-time RTSP video streams
When dealing with real-time video streams, we often want to be able to capture key frames (I-frames) in order to reduce the overhead of computing resources during video display and processing. A key frame is an important frame in a video coding sequence, and other frames (P frame and B frame) are coded by referring […]
javacv realizes video recording, ffmepg intercepts the video according to the time node, and realizes the first playback
Requirements: Use javacv to record and upload the video to the srs server of server A; transfer the video from server A to server B to intercept according to the time node, and use the srs streaming media server of server B to realize online playback 1. Use javacv to upload video Key code 1: […]
JavaCV implements byte[] to RTMP stream
Requirement: Through the private api, I can continuously receive the encapsulation format data named “dhav” in the form of byte[], now I need to process these data, and finally push out the RTMP stream. Implementation: Convert the continuously received byte[] video data into an input stream through the pipeline stream and then provide it to […]