
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (32)
-
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 -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (6451)
-
FFmpeg get frame rate
22 septembre 2021, par zhin dinsI have several images and I am reproducing them in 78.7ms, I am creating like the 80s video effect. But, I am unable to find the correct ms, and this images with the original videos are unsync.


I dumped the video to images using this command => ffmpeg -i *.mp4 the80effect/img-%d.jpg And now, I have 48622 frames. The video FPS is 24


So, 48622/24 = 2025 +- I cannot use 2025ms since those images will load very slow. And the and the approximate value is 78.7ms per frame/image


How can I find the correct value ? The video duration in seconds is 2026. I have tried all math to find this but I'm failing. How many images (one frame) per msCould you help me ? Thank you.


-
Can I use the file buffer or stream as input for fluent-ffmpeg ? I am trying to avoid saving the video locally to get its path before removing
22 avril 2023, par Moath ThawahrehI am receiving the file via an api, I was trying to process the file.buffer as input for FFmpeg but it did not work, I had to save the video locally first and then process the path and remove the saved video later on.
I don't want to believe that there is no other way to solve this and I have been looking for solutions and workarounds but it was all about ffmpeg input as a path.


I would love to find a solution using fluent-ffmpeg because it has some other great features, but I won't mind any suggestions for compressing the video using any different approaches if it's more efficient


Again my code below works fine but I have to save the video and then remove it I am hoping for a more efficient solution :


fs.writeFileSync('temp.mp4', file.buffer);

 // Resize the temporary file using ffmpeg
 ffmpeg('temp.mp4') // here I tried pass file.buffer as readable stream,it receives paths only 
 .format('mp4')
 .size('50%')
 .save('resized.mp4')
 .on('end', async () => {
 // Upload the resized file to Firebase
 const resizedFileStream = bucket.file(`video/${uniqueId}`).createWriteStream();
 fs.createReadStream('resized.mp4').pipe(resizedFileStream);

 await new Promise<void>((resolve, reject) => {
 resizedFileStream
 .on('finish', () => {
 // Remove the local files after they have been uploaded
 fs.unlinkSync('temp.mp4');
 fs.unlinkSync('resized.mp4');
 resolve();
 })
 .on('error', reject);
 });

 // Get the URL of the uploaded resized version
 const resizedFile = bucket.file(`video/${uniqueId}`);
 const url = await resizedFile.getSignedUrl({
 action: 'read',
 expires: '03-17-2025', // Change this to a reasonable expiration date
 });

 console.log('Resized file uploaded successfully.');
 })
 .on('error', (err) => {
 console.log('An error occurred: ' + err.message);
 });
</void>


-
Stream H264 raw data on RTSP server
1er janvier, par AitazazI have H264 hex string data saved in a list.
The data is in correct format as it is being received, I am trying to stream it to RTSP server.


I have stream the data in realtime as it is from a dashcam.


The RTSP server is deployed but when I stream frames to it, the connection is created and then ends in an instant (does not last for a second)


The code is mentioned below which performs this streaming task.


def h264_stream_to_rtsp(data_list, rtsp_url):
 try:
 ffmpeg_command = [
 "ffmpeg", 
 "-f", "h264",
 "-i", "-",
 "-vcodec", "libx264",
 "-preset", "fast",
 "-f", "rtsp",
 "-analyzeduration", "5000000",
 "-probesize", "5000000", 
 rtsp_url # The RTSP URL to stream to
 ]
 
 ffmpeg_process = subprocess.Popen(ffmpeg_command, stdin=subprocess.PIPE)

 for index, hex_data in enumerate(data_list):
 # print(f"Processing hex data {index + 1}/{len(data_list)}...")

 if len(hex_data) % 2 != 0:
 hex_data = '0' + hex_data # Append a leading zero if length is odd

 binary_data = binascii.unhexlify(hex_data)

 ffmpeg_process.stdin.write(binary_data)

 ffmpeg_process.stdin.close()

 ffmpeg_process.wait()
 print("Stream completed.")

 except KeyboardInterrupt:
 print("Stopping live stream.")
 except Exception as e:
 print(f"Error: {e}")



Logs from the RTSP server are mentioned below :


2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] opened
2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] created by 20.174.9.78:35474
2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] is publishing to path 'live', 1 track (H264)
2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] destroyed: torn down by 20.174.9.78:35474
2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] closed: EOF
2025/01/01 10:56:48 INF [RTSP] [conn 20.174.9.78:54448] opened
2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] created by 20.174.9.78:54448
2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] is publishing to path 'live', 1 track (H264)
2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] destroyed: torn down by 20.174.9.78:54448



How can I stream continuously ?