
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (21)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
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 -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (5311)
-
How to use Jaffree with Spring Boot for streaming a RTSP flow
25 août 2022, par JmarchiIm trying to build a APIRest and one of the things i want to do is recirculate the rtsp video provided by some security cameras to the frontend.


I have found the Jaffree, a dependency that integrates the ffmpeg into spring, until then all is good.


The problem is when i try to send the video to the frontend (make in React) i recieve this error :




Starting process : ffmpeg


Waiting for process to finish


...


Input #0, mpjpeg, from __________


Duration : N/A, bitrate : N/A


Stream #0:0 : Video : mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn


[warning] Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (tcp ://127.0.0.1:52225) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.


Output #0, ismv, to 'tcp ://127.0.0.1:52225' :


Metadata :


encoder : Lavf59.27.100


Stream #0:0 : Video : mjpeg (Baseline) (mp4v / 0x7634706D), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 tbr, 10000k tbn


Stream mapping :


Stream #0:0 -> #0:0 (copy)


frame= 21 fps=7.2 q=-1.0 size= 252kB time=00:00:00.80 bitrate=2580.9kbits/s speed=0.275x


...


: Interrupting starter thread (task-1) because of exception : TCP negotiation failed




The code in the backend is this :


@GetMapping(value = "/{id}/video")
public ResponseEntity<streamingresponsebody> getVideo() {
 String url = "**********";

 return ResponseEntity.ok()
 .contentType(MediaType.APPLICATION_OCTET_STREAM)
 .body(os ->{
 FFmpeg.atPath()
 .addArgument("-re")
 .addArguments("-acodec", "pcm_s16le")
 // .addArguments("-rtsp_transport", "tcp")
 .addArguments("-i", url)
 .addArguments("-vcodec", "copy")
 .addArguments("-af", "asetrate=22050")
 .addArguments("-acodec", "aac")
 .addArguments("-b:a", "96k" )
 .addOutput(PipeOutput.pumpTo(os)
 .disableStream(StreamType.AUDIO)
 .disableStream(StreamType.SUBTITLE)
 .disableStream(StreamType.DATA)
 .setFrameCount(StreamType.VIDEO, 100L)
 //1 frame every 10 seconds
 .setFrameRate(0.1)
 .setDuration(1, TimeUnit.HOURS)
 .setFormat("ismv"))
 .addArgument("-nostdin")
 .execute();
 });
 }
</streamingresponsebody>


And this is the html part :


<video width="100%" height="auto" controls="controls" autoplay="autoplay" muted="muted" src="http://localhost:7500/***/1/video">
 Sorry, your browser doesn't support embedded videos.
 </video>



What is it missing for the TCP negotiation ?


-
Joining/Concatenating more than one video files in Java Spring Boot
7 décembre 2020, par Rohan ShahI am trying to join/concate multiple files in Java, so far the procedure that I was following (
https://github.com/bramp/ffmpeg-cli-wrapper
) was going alright, but in this procedure, there were a couple of lines that I could not understand.

Code I am following :


FFmpeg ffmpeg = new FFmpeg("/path/to/ffmpeg");
FFprobe ffprobe = new FFprobe("/path/to/ffprobe");

FFmpegBuilder builder = new FFmpegBuilder()

 .setInput("input.mp4") // Filename, or a FFmpegProbeResult
 .addInput("input2.mp4") // <-------------------------------- Second file that I added
 .overrideOutputFiles(true) // Override the output if it exists

 .addOutput("output.mp4") // Filename for the destination
 .setFormat("mp4") // Format is inferred from filename, or can be set
 .setTargetSize(250_000) // Aim for a 250KB file

 .disableSubtitle() // No subtiles

 .setAudioChannels(1) // Mono audio
 .setAudioCodec("aac") // using the aac codec
 .setAudioSampleRate(48_000) // at 48KHz
 .setAudioBitRate(32768) // at 32 kbit/s

 .setVideoCodec("libx264") // Video using x264
 .setVideoFrameRate(24, 1) // at 24 frames per second
 .setVideoResolution(640, 480) // at 640x480 resolution

 .setStrict(FFmpegBuilder.Strict.EXPERIMENTAL) // Allow FFmpeg to use experimental specs
 .done();

FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe);

// Run a one-pass encode
executor.createJob(builder).run();

// Or run a two-pass encode (which is better quality at the cost of being slower)
executor.createTwoPassJob(builder).run();



These are the lines throwing error :


FFmpeg ffmpeg = new FFmpeg("/path/to/ffmpeg");
FFprobe ffprobe = new FFprobe("/path/to/ffprobe");



In these lines, I am providing a path like this,


FFmpeg ffmpeg = new FFmpeg("D:/");
FFprobe ffprobe = new FFprobe("D:/");



which leads to an error


java.io.IOException: CreateProcess error=5



I believe the
ffmpeg
in/path/to/ffmpeg
andffprobe
in/path/to/ffprobe
are files, not directories, which is why it threw an execution permission error, but as I looked into the repository (link given above) I was not able to find this particular file in the given link.

There were a couple of Java files named
ffmpeg.java
andffprobe.java
, but when I tried using them in the code then I got the same error, so I want to know which files am I supposed to have in these paths

-
How to split the Video into Frames using FFMPEG in Spring-Boot ?
8 octobre 2020, par Abhinay KTo fetch Frames from Video with 5fps rate with specified Start and end Time in video with following FFMPEG command,


ffmpeg -i input.mp4 -ss 00:00:54 -to 00:01:53 -r 5 -f image2 image-%13d.png,


I want to implement the same in the Spring-boot application,


I found the following code snippet to fetch frames from Video,


public static void main(String[] args) {
 Java2DFrameConverter bimConverter = new Java2DFrameConverter();
 FFmpegFrameGrabber g = new FFmpegFrameGrabber("input.mp4");
 try {
 g.start();
 for (int i = 0; i < 50; i++) {
 ImageIO.write(bimConverter.convert(g.grab()), "png", new File(
 "image-" + System.currentTimeMillis() + ".png"));
 }
 g.stop();
 } catch (IOException ie) {
 ie.printStackTrace();
 } catch (Exception e) {
 e.printStackTrace();
 }
}



but I required logic to implement as output from following command,


ffmpeg -i input.mp4 -ss 00:00:54 -to 00:01:53 -r 5 -f image2 image-%13d.png,


Please help me out the logic need to implement,