
Recherche avancée
Autres articles (63)
-
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 (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)
Sur d’autres sites (8925)
-
FFprobe path video filter [closed]
4 avril 2021, par Com MediaIm trying this


ffprobe -f lavfi -i "movie=E:\video.mp4,blackframe=1" -show_entries frame=pkt_pts_time:frame_tags -print_format json



But always fail with every path... What is wrong ?


[Parsed_movie_0 @ 0000026a24f6e780] Failed to avformat_open_input 'E'
[lavfi @ 0000026a24f6ce00] Error initializing filter 'movie' with args 'E :\video.mp4'
movie=E :\video.mp4,blackframe=1 : No such file or directory


-
.NET Wrapper ffmpeg convert to mp4 set size to 1920 x 1080
1er août 2020, par RobertI in my application written in .NET Core I use ffmpeg to convert movie from 3gp to mp4.


var conversionOptions = new ConversionOptions
{
 MaxVideoDuration = TimeSpan.FromSeconds(60),
 VideoAspectRatio = VideoAspectRatio.R16_9,
 VideoSize = VideoSize.Hd1080,
 AudioSampleRate = AudioSampleRate.Hz44100,
 // CustomWidth = 200
};
 
await ffmpeg.ConvertAsync(inputFile, outputFileMp4, conversionOptions);



Convertion works fine, but my source movie is from mobile phone. Its frame size is 1920 x 1080 but the movie is higher than wider.
After conversion with above code the frame is the same but the movie is cuted and it is wider than taller.
I wanted to have original size


-
FFmpeg error with ffmpeg.FS("readfile", "output.mp4"). trying to get ffmpeg to work in the react app
21 juin 2024, par Paul Thamconst stackVideos = useCallback(
 async (video1) => {
 try {
 console.log("Fetching video2 from storage...");
 const video2Ref = ref(storage, "video2.mp4");
 const video2Url = await getDownloadURL(video2Ref);
 const video2Blob = await (await fetch(video2Url)).blob();

 console.log("Writing video1 to FFmpeg FS...");
 await ffmpeg.FS("writeFile", "video1.mp4", await fetchFile(video1));

 console.log("Writing video2 to FFmpeg FS...");
 await ffmpeg.FS("writeFile", "video2.mp4", await fetchFile(video2Blob));

 console.log("Files in FFmpeg FS after write:");
 const files = await ffmpeg.FS("readdir", "/");
 console.log(files);

 const { start, end } = inputs[0];
 const startSeconds = new Date(`1970-01-01T${start}Z`).getTime() / 1000;
 const endSeconds = new Date(`1970-01-01T${end}Z`).getTime() / 1000;
 const duration = endSeconds - startSeconds;

 console.log("Running FFmpeg command...");
 await ffmpeg.run(
 "-i",
 "video1.mp4",
 "-ss",
 startSeconds.toString(),
 "-t",
 duration.toString(),
 "-i",
 "video2.mp4",
 "-filter_complex",
 "[0:v]scale=1080:-1[v1];[1:v]scale=-1:1920/2[v2scaled];[v2scaled]crop=1080:1920/2[v2cropped];[v1][v2cropped]vstack=inputs=2,scale=1080:1920[vid]",
 "-map",
 "[vid]",
 "-map",
 "0:a",
 "-c:v",
 "libx264",
 "-crf",
 "23",
 "-preset",
 "veryfast",
 "-shortest",
 "output1.mp4"
 );

 console.log("Files in FFmpeg FS after run:");
 const filesAfterRun = await ffmpeg.FS("readdir", "/");
 console.log(filesAfterRun);

 console.log("Reading output1.mp4 from FFmpeg FS...");
 const data = await ffmpeg.FS("readfile", "output1.mp4");
 console.log("after the FS readfile");
 const url = URL.createObjectURL(
 new Blob([data.buffer], { type: "video/mp4" })
 );
 setStackedVideo(url);
 setOutputFileReady(true); // Mark output file as ready
 } catch (err) {
 console.error("FFmpeg error output:", err);
 setError(`FFmpeg run error: ${err.message}`);
 setIsProcessing(false);
 }
 },
 [inputs]
 );



My error seems to be stemming from this line :


const data = await ffmpeg.FS("readfile", "output1.mp4");



Seeing the ffmpeg.wasm documentation i thought the functions for some of the functions had changed, but when I changed it, it seemed like they did not recognise the new functions. Sometimes this will also give me some other errors like worker.js which I dont understand enough to debug this myself.


words word words words words words word words words wordswords word words words wordswords word words words wordswords word words words wordswords word words words wordswords word words words words