
Recherche avancée
Autres articles (26)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (6451)
-
Process vide files to take screen grabs in java spring boot
10 octobre 2023, par Haleema KhanI am using JavaCV library with ffmpeg bindings to process video files and taking screen grabs at specific frames.
Adding JavaCV library dependency to my spring project increases the size of my jar file from around 90Mb > 1+ Gb.
This is a big issue becuase my project is deployed on AWS elastic beanstalk that accepts a max size of 500 Mb for a jar file.


Need help to resolve this issue with the jar file or else any other alternate library that could do this.


What I tried : I have removed all accept the abosultely necessary dependencies in my project to reduce the jar size.
I have also tried to find alternate solutions but couldnt get anything.
My pom file looks like


<dependencies>
 
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-data-jpa</artifactid>
 </dependency>
 <dependency>
 <groupid>com.google.oauth-client</groupid>
 <artifactid>google-oauth-client</artifactid>
 <version>1.32.1</version>
 </dependency>
 <dependency>
 <groupid>com.google.http-client</groupid>
 <artifactid>google-http-client</artifactid>
 <version>1.32.1</version>
 </dependency>
 
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-oauth2-client</artifactid>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-web</artifactid>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-test</artifactid>
 <scope>test</scope>
 </dependency>
 
 <dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>javacv</artifactid>
 <version>1.5.9</version>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-validation</artifactid>
 </dependency>
 <dependency>
 <groupid>org.apache.commons</groupid>
 <artifactid>commons-csv</artifactid>
 <version>1.10.0</version>
 </dependency>
 <dependency>
 <groupid>io.jsonwebtoken</groupid>
 <artifactid>jjwt</artifactid>
 <version>0.9.1</version>
 </dependency>
 
 <dependency>
 <groupid>mysql</groupid>
 <artifactid>mysql-connector-java</artifactid>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-devtools</artifactid>
 </dependency>
 <dependency>
 <groupid>org.projectlombok</groupid>
 <artifactid>lombok</artifactid>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-configuration-processor</artifactid>
 <optional>true</optional>
 </dependency>
 <dependency>
 <groupid>com.amazonaws</groupid>
 <artifactid>aws-java-sdk-s3</artifactid>
 <version>1.12.550</version>
 </dependency>
 
 <dependency>
 <groupid>commons-io</groupid>
 <artifactid>commons-io</artifactid>
 <version>2.6</version>
 </dependency>
 
 
 
 <dependency>
 <groupid>com.github.ozlerhakan</groupid>
 <artifactid>poiji</artifactid>
 <version>3.0.3</version>
 </dependency>
 <dependency>
 <groupid>org.springframework.cloud</groupid>
 <artifactid>spring-cloud-starter-aws</artifactid>
 <version>2.2.6.RELEASE</version>
 </dependency>
 <dependency>
 <groupid>org.springframework.cloud</groupid>
 <artifactid>spring-cloud-starter-aws-messaging</artifactid>
 <version>2.2.6.RELEASE</version>
 </dependency>
 </dependencies>```



-
Where to (long time) host Spring Boot Application with Data Base Backup and Linux Root Access [closed]
22 mai 2024, par Lord HelmchenI developed a small application for my father. It uses Spring Boot, MySQL and FFMPEG, which I currently installed on Linux.


I want to host it, deploy it automatically, have a back up and root access for FFMPEG installation.


It runs smoothly locally on Windows / Linux, now I want to host it somewhere.


What I would like to have :


- 

- Ease of deployment : I got experience in adminstration of linux root servers, but I look for something easy to integrate and maybe automatically deploy it from Github or Gitlab
- Backup : I want to backup the database ideally to another service provider in case something goes wrong.
- Linux : One Part of it, amongs others is to convert different audio formats using ffmpeg.
So, (I think) I need linux root access as well.
- Time Horzion : I would like to make sure it still runs in ten+ years, so it should be a reliable provider where I only update the application from time to time if needed.
- Money : As it is only for personal use at this moment, I don't want to invest a fortune.












What provider and deployment pipeline would you recommend to me ?


-
why am i getting this error when using FFmpeg in a spring boot app on a mac intel device : SIGSEGV (0xb) at pc=0x000000013d71b0e0, pid=49777, tid=42755
19 juillet 2024, par Godwill ChristopherI am working with FFmpeg library in spring boot app to stream live recording from an ip camera via RSTP and save to S3 bucket but i am running into the error below.


A fatal error has been detected by the Java Runtime Environment :


SIGSEGV (0xb) at pc=0x000000013d71b0e0, pid=49777, tid=42755


JRE version : OpenJDK Runtime Environment Corretto-19.0.2.7.1 (19.0.2+7) (build 19.0.2+7-FR)
Java VM : OpenJDK 64-Bit Server VM Corretto-19.0.2.7.1 (19.0.2+7-FR, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
Problematic frame :
C [libavutil.56.dylib+0xa0e0] av_strstart+0x10


No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
An error report file with more information is saved as :
/Users/CODA/Desktop/videoSaleService/hs_err_pid49777.log


If you would like to submit a bug report, please visit :
https://github.com/corretto/corretto-19/issues/
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.


Process finished with exit code 134 (interrupted by signal 6:SIGABRT)


public static void main(String[] args) {
 OkHttpClient client = new OkHttpClient();
 try (S3Client s3Client = S3Client.create()) {
 VideoService videoService = new VideoService(new VideoRepositoryImpl(),
 new S3Service(s3Client), new VideoExtractor(client), new ISApiClient());
 videoService.streamLiveVideoRSTP(System.out);
 } catch (IOException e) {
 log.error("Error occurred while streaming live video: {}", e.getMessage(), e);
 } catch (Exception e) {
 log.error("Unexpected error occurred: {}", e.getMessage(), e);
 }
}

public void streamLiveVideoRSTP(OutputStream outputStream) throws IOException {
 File tempFile = File.createTempFile("live_stream", ".mp4");

 try (InputStream inputStream = client.getLiveStreamingVideoRSTP();
 OutputStream fileOutputStream = new FileOutputStream(tempFile)) {
 byte[] buffer = new byte[4096];
 int bytesRead;
 while ((bytesRead = inputStream.read(buffer)) != -1) {
 outputStream.write(buffer, 0, bytesRead);
 fileOutputStream.write(buffer, 0, bytesRead);
 }
 } catch (Exception e) {
 log.error("Error occurred while streaming live video: {}", e.getMessage(), e);
 throw new IOException("Error occurred while streaming live video", e);
 }

 // Upload the captured video file to S3
 try {
 uploadStreamedVideoToS3(tempFile);
 } finally {
 if (tempFile.exists()) {
 if (!tempFile.delete()) {
 log.warn("Failed to delete temporary file: {}", tempFile.getAbsolutePath());
 }
 }
 }
}

private final BlockingQueue frameQueue = new ArrayBlockingQueue<>(10);

public ISApiClient() {
 new Thread(this::startGrabbingFrames).start();
}

public InputStream getLiveStreamingVideoRSTP() {
 return new InputStream() {
 private ByteArrayInputStream currentStream;

 @Override
 public int read() {
 if (currentStream == null || currentStream.available() == 0) {
 byte[] frame = frameQueue.poll();
 if (frame != null) {
 currentStream = new ByteArrayInputStream(frame);
 } else {
 return -1;
 }
 }
 return currentStream.read();
 }
 };
}

private void startGrabbingFrames() {
 try (FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(rtspUrl)) {
 frameGrabber.setOption("rtsp_transport", "tcp");
 frameGrabber.start();

 FFmpegFrameFilter frameFilter = new FFmpegFrameFilter("format=yuv420p",
 frameGrabber.getImageWidth(), frameGrabber.getImageHeight());
 frameFilter.setPixelFormat(frameGrabber.getPixelFormat());
 frameFilter.start();

 log.info("Started grabbing frames from RTSP stream.");

 while (true) {
 Frame frame = frameGrabber.grab();
 if (frame != null && frame.image != null) {
 log.info("Frame grabbed: width={} height={} timestamp={}",
 frame.imageWidth, frame.imageHeight, frame.timestamp);
 frameFilter.push(frame);
 Frame filteredFrame = frameFilter.pull();

 if (filteredFrame != null && filteredFrame.image != null) {
 log.info("Frame filtered: width={} height={} timestamp={}",
 filteredFrame.imageWidth, filteredFrame.imageHeight, filteredFrame.timestamp);
 byte[] imageBytes = convertFrameToBytes(filteredFrame);
 if (imageBytes.length > 0) {
 frameQueue.offer(imageBytes);
 log.info("Frame added to queue, queue size={}", frameQueue.size());
 }
 }
 }
 }
 } catch (IOException e) {
 log.error("Error grabbing frames: {}", e.getMessage(), e);
 }
}

private byte[] convertFrameToBytes(Frame frame) {
 if (frame == null || frame.image == null) {
 return new byte[0];
 }

 ByteBuffer byteBuffer = null;
 for (Object img : frame.image) {
 if (img instanceof ByteBuffer) {
 byteBuffer = (ByteBuffer) img;
 break;
 }
 }

 if (byteBuffer == null) {
 return new byte[0];
 }

 byte[] bytes = new byte[byteBuffer.remaining()];
 byteBuffer.get(bytes);
 return bytes;
}