
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (35)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (9281)
-
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>```



-
JAVA Spring : Grabbing Image from a multipartFile video via FFMPEG JavaCV
29 août 2023, par Thanh Hiếu NguyễnI'm trying to achieve Grabbing a frame from a MultipartFile or URL and here's my attempt.


URL :


InputStream inputStream = new java.net.URL(video.getUrl()).openStream();

FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(inputStream);
grabber.start();

int frameRate = (int) grabber.getFrameRate();
int targetFrameNumber = (int) (frameRate * timeLengthSeconds);

grabber.setFrameNumber(targetFrameNumber);
Frame frame = grabber.grab();

grabber.stop();

if (frame != null) {
 Java2DFrameConverter converter = new Java2DFrameConverter();
 BufferedImage bufferedImage = converter.getBufferedImage(frame);
 ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
 ImageIO.write(bufferedImage, "jpeg", byteArrayOutputStream);
 byte[] bytes = byteArrayOutputStream.toByteArray();



MultipartFile :


byte[] videoBytes = video.getBytes();

FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(new ByteArrayInputStream(videoBytes));
int frameRate = (int) 30;
int targetFrameNumber = (int) (frameRate * timeLengthSeconds);

grabber.setFrameNumber(targetFrameNumber);
grabber.setVideoStream(10);
grabber.start();


Frame frame = grabber.grab();

grabber.stop();

if (frame != null) {
 Java2DFrameConverter converter = new Java2DFrameConverter();
 BufferedImage bufferedImage = converter.getBufferedImage(frame);
 ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
 ImageIO.write(bufferedImage, "jpeg", byteArrayOutputStream);
 byte[] bytes = byteArrayOutputStream.toByteArray();



Both of them generates an AUDIO type of Frame, so later I can't buffer an image out of it, tried different videos, frameRate, frameNumber, same result.


UPDATE :

So I manage to get the frame with following code

byte[] videoBytes = video.getBytes();
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(new ByteArrayInputStream(videoBytes));
grabber.setFormat("mp4");
int frameRate = (int) grabber.getFrameRate();
int targetFrameNumber = (int) (frameRate * timeLengthSeconds);

grabber.setFrameNumber(targetFrameNumber);
grabber.setVideoStream(0);
grabber.start();


Frame frame = grabber.grabImage();

grabber.stop();



But another problem occurred


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

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000001dd6cac79d6, pid=20824, tid=21048 
 JRE version: Java(TM) SE Runtime Environment 18.9 (11.0.12+8) (build 11.0.12+8-LTS-237)
 Java VM: Java HotSpot(TM) 64-Bit Server VM 18.9 (11.0.12+8-LTS-237, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
 Problematic frame:
 J 657 c1 jdk.internal.misc.Unsafe.getByte(J)B java.base@11.0.12 (7 bytes) @ 0x000001dd6cac79d6 [0x000001dd6cac79a0+0x0000000000000036]



Any help is appreciated !


-
Spring content + MPD manifest and Dash.js player [closed]
31 octobre 2024, par IupaI'm total newbie to video content from web, however I was curious how those things work actually, and I found so far that for web pages there are already js libs which firstly customize the video html tag to support many features like resolution/subtitles/speed etc,secondly they work with specific manifest file as a src for video, it's *.mpd extension and xml format where is described how to play the chunks of video, now in order to generate such manifests I need another libs like ffmpeg that can generate not only manifests but the chunks as well in different resolutions and other tons of settings (kinda crazy ¯_(ツ)_/¯), anyway now I understood that in order to use spring content lib I need to generate all of those during the uploads of files, are there some tutorials/best practices for such ?