
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (97)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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" (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (5336)
-
Firebase function to convert YouTube to mp3
9 octobre 2023, par satchelI want to deploy to Firebase cloud functions.


However, I get a vague error : “Cannot analyze code” after it goes through the initial pre deploy checks successfully.


But I cannot figure out the problem given the vagueness of the error.


It looks right with these requirements :


- 

- receive a POST with JSON body of YouTube videoID as a string
- Download locally using the YouTube download package
- Pipe to the ffmpeg package and save mp3 to the local temp
- Store in default bucket on firestore storage
- Apply make public method to make public












const functions = require('firebase-functions');
const admin = require('firebase-admin');
const ytdl = require('ytdl-core');
const ffmpeg = require('fluent-ffmpeg');
const fs = require('fs');
const path = require('path');
const os = require('os');

admin.initializeApp();

// Set the path to the FFmpeg binary
const ffmpegPath = path.join(__dirname, 'bin', 'ffmpeg');
ffmpeg.setFfmpegPath(ffmpegPath);

exports.audioUrl = functions.https.onRequest(async (req, res) => {
 if (req.method !== 'POST') {
 res.status(405).send('Method Not Allowed');
 return;
 }

 const videoId = req.body.videoID;
 const videoUrl = `https://www.youtube.com/watch?v=${videoId}`;
 const audioPath = path.join(os.tmpdir(), `${videoId}.mp3`);

 try {
 await new Promise((resolve, reject) => {
 ytdl(videoUrl, { filter: format => format.container === 'mp4' })
 .pipe(ffmpeg())
 .audioCodec('libmp3lame')
 .save(audioPath)
 .on('end', resolve)
 .on('error', reject);
 });

 const bucket = admin.storage().bucket();
 const file = bucket.file(`${videoId}.mp3`);
 await bucket.upload(audioPath, {
 destination: file.name,
 metadata: {
 contentType: 'audio/mp3',
 },
 });

 // Make the file publicly accessible
 await file.makePublic();

 const publicUrl = file.publicUrl();
 res.status(200).send({ url: publicUrl });
 } catch (error) {
 console.error('Error processing video:', error);
 res.status(500).send('Internal Server Error');
 }
});



The following is the
package.json
file which is used to reference the dependencies for the function, as well as the entry point, which I believe just needs to be the name of the filename with the code :

{
 "name": "firebase-functions",
 "description": "Firebase Cloud Functions",
 "main": "audioUrl.js", 
 "dependencies": {
 "firebase-admin": "^10.0.0",
 "firebase-functions": "^4.0.0",
 "ytdl-core": "^4.9.1",
 "fluent-ffmpeg": "^2.1.2"
 },
 "engines": {
 "node": "18"
 },
 "private": true
}



(Edit) Here is the error :


deploying functions
✔ functions: Finished running predeploy script.
i functions: preparing codebase default for deployment
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
i artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ artifactregistry: required API artifactregistry.googleapis.com is enabled
✔ functions: required API cloudfunctions.googleapis.com is enabled
i functions: Loading and analyzing source code for codebase default to determine what to deploy
Serving at port 8171

shutdown requested via /__/quitquitquit


Error: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error



Failed to load function definition from source: FirebaseError: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error



I get the same error when running the following :


firebase deploy --only functions:audioUrl



And I thought I might get more detailed errors using the emulator :


firebase emulators:start



Under the emulator I had this additional error initially :


Your requested "node" version "18" doesn't match your global version "16". Using node@16 from host.



-
Issue transcoding H.265 to H.264 stream with FFMPEG
5 octobre 2023, par Diego SatizabalI'm having an issue trying to do some tests restreaming an H.265 stream to H.264 as follows :


- 

- I use a MP4 file as video source, then I use VLC to stream it with H.265 codec as follows :




- 

- I go to media -> stream menu, then select a file and stream :






- 

- The second step allows me to add a destination for the stream, I chose HTTP :






- 

- The next step allows me to select a profile, I select Video - H.265 + MP3 (MP4) profile leaving the Activate Transcoding option :






- 

-
Previous steps allow me to stream the video file, I can open another instance of VLC and open the URL of the created stream (http://localhost:8080/test) and it is able to playback the stream. Moreover, if I go to Tools -> Codec Info menu I see that the playback indeed uses H.265 codec.


-
Then I try to use FFMPEG library to take that input stream and transcode to two separate stream, one H.264 for a copy of the video and another an opus audio output with the following command :








ffmpeg -i http://localhost:8080/test -c:v libx264 -bsf:v h264_mp4toannexb -b:v 2M -profile:v baseline -pix_fmt yuv420p -x264-params keyint=120 -max_delay 0 -bf 0 -listen 1 -f h264 unix:/tmp/myvideo.sock -c:a libopus -page_duration 20000 -vn -listen 1 -f opus unix:/tmp/myaudio.sock



But I get the following error :




If I try RTSP instead of HTTP it works but the stream is awful, I can barely see some frames on the receiver and the video usually freezes or just shows black.


I'm using Ubuntu with VLC 3.0.18 and FFMPEG 4.4.2.


I have specific requirements to handle the live streams, I cannot just convert and save to a new container (MP4 file) the transcoded video, I require a source streaming H.265 and transcode the stream to be injected into a WebRTC server (requiring H.264 as input).


Any help/suggestion is much appreciated in advance !


-
Seeking CLI Tool for Creating Text Animations with Easing Curves [closed]
15 novembre 2023, par anonymous-devI'm working on a video project where I need to animate text using various easing curves for smooth and dynamic transitions with the terminal. Specifically, I'm looking to apply the following easing curves to text animations :


bounceIn
bounceInOut
bounceOut
decelerate
ease
easeIn
easeInBack
easeInCirc
easeInCubic
easeInExpo
easeInOut
easeInOutBack
easeInOutCirc
easeInOutCubic
easeInOutCubicEmphasized
easeInOutExpo
easeInOutQuad
easeInOutQuart
easeInOutQuint
easeInOutSine
easeInQuad
easeInQuart
easeInQuint
easeInSine
easeInToLinear
easeOut
easeOutBack
easeOutCirc
easeOutCubic
easeOutExpo
easeOutQuad
easeOutQuart
easeOutQuint
easeOutSine
elasticIn
elasticInOut
elasticOut
fastEaseInToSlowEaseOut
fastLinearToSlowEaseIn
fastOutSlowIn
linearToEaseOut
slowMiddle



My initial thought was to use ffmpeg for this task, however, it appears that ffmpeg may not support these advanced easing curves for text animation.


I am seeking recommendations for a command-line interface (CLI) tool that can handle these types of animations.


Key requirements include :


- 

- Easing Curve Support : The tool should support a wide range of easing curves as listed above.
- Efficiency : Ability to render animations quickly, preferably with performance close to what I can achieve with ffmpeg filters.
- Direct Rendering : Ideally, the tool should render animations in one go, without the need to write each individual frame to disk.
- Should work with transformations such as translate, scale and rotate. For example a text translates from a to b with a basing curve applied to the transition.










I looked into ImageMagick, but it seems more suited for frame-by-frame image processing, which is not efficient for my needs.


Could anyone suggest a CLI tool that fits these criteria ? Or is there a way to extend ffmpeg's capabilities to achieve these animations ?