
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (11)
-
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (4214)
-
unity recorder use at runtime in C#
5 février 2020, par bluejaykeI’m using the unity recorder package in the editor, but I wasn’t sure / didn’t see in the docs if its possible to use the unity recorder package to capture video at runtime — meaning after the project is built to webGL etc., can unity record, and perhaps send / stream the video result to a server ? If not how else would this be accomplished ?
-
There was error in the HLS Video stram endpoin in springBoot
12 août 2024, par Abir SarkarThis is my controller When I call for the first time with the actual endpoint with the proper ID, it gives the output but when I send it, it gets error-prone. It will automatically change the video ID with the segment_000.ts


@GetMapping("/stream/{videoId}")
public ResponseEntity<resource> streamVideo(
 @PathVariable String videoId,
 @RequestHeader(value = HttpHeaders.RANGE, required = false) String rangeHeader) {

 try {
 System.out.println("Video Id : "+videoId);
 // Fetch the video metadata
 Video video = videoService.findById(videoId);

 if (video == null) {
 return ResponseEntity.notFound().build();
 }

 // Construct the path to the HLS playlist
 Path playlistPath = Paths.get(video.getFilePath());

 // Check if the playlist file exists
 if (!Files.exists(playlistPath)) {
 return ResponseEntity.notFound().build();
 }

 // Load the file as a resource
 Resource resource = new FileSystemResource(playlistPath);
 String contentType = "application/vnd.apple.mpegurl";
 long fileLength = Files.size(playlistPath);

 if (rangeHeader != null) {
 try {
 // Handle range requests for seeking
 String[] ranges = rangeHeader.replace("bytes=", "").split("-");
 long rangeStart = Long.parseLong(ranges[0]);
 long rangeEnd = ranges.length > 1 ? Long.parseLong(ranges[1]) : fileLength - 1;

 // Validate range end
 if (rangeEnd >= fileLength) {
 rangeEnd = fileLength - 1;
 }

 // Validate range start
 if (rangeStart > rangeEnd) {
 return ResponseEntity.status(HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE)
 .header(HttpHeaders.CONTENT_RANGE, "bytes */" + fileLength)
 .build();
 }

 // Calculate content length
 long contentLength = rangeEnd - rangeStart + 1;

 // Prepare headers
 HttpHeaders headers = new HttpHeaders();
 headers.add(HttpHeaders.CONTENT_RANGE, "bytes " + rangeStart + "-" + rangeEnd + "/" + fileLength);
 headers.add(HttpHeaders.CONTENT_LENGTH, String.valueOf(contentLength));
 headers.add(HttpHeaders.CACHE_CONTROL, "no-cache, no-store, must-revalidate");
 headers.add(HttpHeaders.PRAGMA, "no-cache");
 headers.add(HttpHeaders.EXPIRES, "0");
 headers.add(HttpHeaders.CONTENT_TYPE, contentType);

 // Serve the partial content
 InputStream inputStream = Files.newInputStream(playlistPath);
 inputStream.skip(rangeStart);

 return ResponseEntity.status(HttpStatus.PARTIAL_CONTENT)
 .headers(headers)
 .body(new InputStreamResource(inputStream));
 } catch (NumberFormatException e) {
 return ResponseEntity.status(HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE)
 .header(HttpHeaders.CONTENT_RANGE, "bytes */" + fileLength)
 .build();
 }
 } else {
 // Serve the full content
 HttpHeaders headers = new HttpHeaders();
 headers.add(HttpHeaders.CONTENT_TYPE, contentType);
 headers.add(HttpHeaders.CONTENT_LENGTH, String.valueOf(fileLength));
 headers.add(HttpHeaders.CACHE_CONTROL, "no-cache, no-store, must-revalidate");
 headers.add(HttpHeaders.PRAGMA, "no-cache");
 headers.add(HttpHeaders.EXPIRES, "0");
 System.out.println(resource.toString());
 return ResponseEntity.ok()
 .headers(headers)
 .body(resource);
 }

 } catch (IOException e) {
 // Handle IOException
 e.printStackTrace();
 return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
 } catch (Exception e) {
 // Handle other exceptions
 e.printStackTrace();
 return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
 }
}
</resource>


I am attaching the error image : IMAGE


In the front end i am using the angular application :


This is the
app.jsx
file

import "./App.css";
import VideoPlayer from "./VideoPlayer";
import { useRef } from "react";

function App() {
 const playerRef = useRef(null);
 const videoLink =
 "http://localhost:8080/api/v1/video/stream/66b9e7853c9b530810bdf4f4";
 const videoPlayerOptions = {
 controls: true,
 responsive: true,
 fluid: true,
 sources: [
 {
 src: videoLink,
 type: "application/x-mpegURL",
 },
 ],
 };
 const handlePlayerReady = (player) => {
 playerRef.current = player;

 // You can handle player events here, for example:
 player.on("waiting", () => {
 videojs.log("player is waiting");
 });

 player.on("dispose", () => {
 videojs.log("player will dispose");
 });
 };
 return (
 <>
 <div>
 <h1>Video player</h1>
 </div>

 
 >
 );
}

export default App;



This is the
VideoPlayer.jsx
file :

import React, { useRef, useEffect } from "react";
import videojs from "video.js";
import "video.js/dist/video-js.css";

export const VideoPlayer = (props) => {
 const videoRef = useRef(null);
 const playerRef = useRef(null);
 const { options, onReady } = props;

 useEffect(() => {
 // Make sure Video.js player is only initialized once
 if (!playerRef.current) {
 // The Video.js player needs to be _inside_ the component el for React 18 Strict Mode.
 const videoElement = document.createElement("video-js");

 videoElement.classList.add("vjs-big-play-centered");
 videoRef.current.appendChild(videoElement);

 const player = (playerRef.current = videojs(videoElement, options, () => {
 videojs.log("player is ready");
 onReady && onReady(player);
 }));

 // You could update an existing player in the `else` block here
 // on prop change, for example:
 } else {
 const player = playerRef.current;

 player.autoplay(options.autoplay);
 player.src(options.sources);
 }
 }, [options, videoRef]);

 // Dispose the Video.js player when the functional component unmounts
 useEffect(() => {
 const player = playerRef.current;

 return () => {
 if (player && !player.isDisposed()) {
 player.dispose();
 playerRef.current = null;
 }
 };
 }, [playerRef]);

 return (
 
 <div ref="{videoRef}"></div>
 
 );
};

export default VideoPlayer;



I am trying to play the video in the player. But the video is not playing in the browser. and when I hit the endpoint with Postman, it gives me the content of the index.m3u8 file. In the player, the video length is coming, but the video is not playing. Please help me to play the video.


*


Github Project Link :
GITHUB
*

-
openCV VideoCapture doesn't work with gstreamer x264
18 juin 2014, par nschoeI’d like to display a rtp / vp8 video stream that comes from gstreamer, in openCV.
I have already a working solution which is implemented like this :
gst-launch-0.10 udpsrc port=6666 ! "application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)VP8-DRAFT-IETF-01,payload=(int)120" ! rtpvp8depay ! vp8dec ! ffmpegcolorspace ! ffenc_mpeg4 ! filesink location=videoStream
Basically it grabs incoming data from a UDP socket, depacketize rtp, decode vp8, pass to ffmpegcolorspace (I still don’t understand what this is for, I see it everywhere in gstreamer).
The
videoStream
is a pipe I created withmkfifo
. On the side, I have my openCV code that does :VideoCapture cap("videoStream");
and uses
cap.read()
to push into aMat
.My main concern is that I use
ffenc_mpeg4
here and I believe this alters my video quality. I tried usingx264enc
in place offfenc_mpeg4
but I have no output : openCV doesn’t react, neither does gstreamer, and after a couple of seconds, gst-launch just stops.Any idea what I could use instead of
ffenc_mpeg4
? I looked for "lossless codec" on the net, but it seems I am confusing things such as codec, contains, format, compression and encoding ; so any help would be (greatly) appreciated !Thanks in advance !