
Recherche avancée
Autres articles (105)
-
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 (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
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
Sur d’autres sites (5184)
-
Capture FFMPEG output
6 janvier 2024, par Andrew EnsleyI need to read the output from ffmpeg in order to even try the solution to my question from yesterday. This is a separate issue from my problem there, so I made a new question.



How the heck do I get the output from an
ffmpeg -i
command in PHP ?


This is what I've been trying :



<?PHP
 error_reporting(E_ALL);
 $src = "/var/videos/video1.wmv";
 $command = "/usr/bin/ffmpeg -i " . $src;
 echo "<b>",$command,"</b><br />";
 $command = escapeshellcmd($command);

 echo "backtick:<br /><pre>";
 `$command`;

 echo "</pre><br />system:<br /><pre>";
 echo system($command);

 echo "</pre><br />shell_exec:<br /><pre>";
 echo shell_exec($command);

 echo "</pre><br />passthru:<br /><pre>";
 passthru($command);

 echo "</pre><br />exec:<br /><pre>";
 $output = array();
 exec($command,$output,$status);
 foreach($output AS $o)
 {
 echo $o , "<br />";
 }
 echo "</pre><br />popen:<br /><pre>";
 $handle = popen($command,'r');
 echo fread($handle,1048576);
 pclose($handle);
 echo "</pre><br />";
?>




This is my output :



<b>/usr/bin/ffmpeg -i /var/videos/video1.wmv</b><br />
backtick:<br />
 <pre></pre><br />
system:<br />
 <pre></pre><br />
shell_exec:<br />
 <pre></pre><br />
passthru:<br />
 <pre></pre><br />
exec:<br />
 <pre></pre><br />
popen:<br />
 <pre></pre><br />




I don't get it.
safe_mode
is off. There's nothing indisable_functions
. The directory is owned bywww-data
(the apache user on my Ubuntu system). I get a valid status back fromexec()
andsystem()
and running the same command from the command line give me tons of output. I feel like I must be missing something obvious but I have no idea what it is.

-
FFMPEG Encoding a video from a Readable stream
4 novembre 2022, par Michael AubryI'm facing an issue with the
seeked
event in Chrome. The issue seems to be due to how the video being seeked is encoded.

The problem seems to occur most frequently when using
ytdl-core
and piping a Readable stream into an FFMPEG child process.

let videoStream: Readable = ytdl.downloadFromInfo(info, {
 ...options,
 quality: "highestvideo"
});



With
ytdl-core
in order to get the highest quality you must combine the audio and video. So here is how I am doing it.

const ytmux = (link, options: any = {}) => {
 const result = new stream.PassThrough({
 highWaterMark: options.highWaterMark || 1024 * 512
 });

 ytdl.getInfo(link, options).then((info: videoInfo) => {
 let audioStream: Readable = ytdl.downloadFromInfo(info, {
 ...options,
 quality: "highestaudio"
 });
 let videoStream: Readable = ytdl.downloadFromInfo(info, {
 ...options,
 quality: "highestvideo"
 });
 // create the ffmpeg process for muxing
 let ffmpegProcess: any = cp.spawn(
 ffmpegPath.path,
 [
 // supress non-crucial messages
 "-loglevel",
 "8",
 "-hide_banner",
 // input audio and video by pipe
 "-i",
 "pipe:3",

 "-i",
 "pipe:4",
 // map audio and video correspondingly

 // no need to change the codec
 // output mp4 and pipe
 "-c:v",
 "libx264",
 "-x264opts",
 "fast_pskip=0:psy=0:deblock=-3,-3",
 "-preset",
 "veryslow",
 "-crf",
 "18",
 "-c",
 "copy",
 "-pix_fmt",
 "yuv420p",
 "-movflags",
 "frag_keyframe+empty_moov",
 "-g",
 "300",
 "-f",
 "mp4",

 "-map",
 "0:v",

 "-map",
 "1:a",

 "pipe:5"
 ],
 {
 // no popup window for Windows users
 windowsHide: true,
 stdio: [
 // silence stdin/out, forward stderr,
 "inherit",
 "inherit",
 "inherit",
 // and pipe audio, video, output
 "pipe",
 "pipe",
 "pipe"
 ]
 }
 );

 audioStream.pipe(ffmpegProcess.stdio[4]);
 videoStream.pipe(ffmpegProcess.stdio[3]);
 ffmpegProcess.stdio[5].pipe(result);
 });
 return result;
};



I am playing around with tons of different arguments. The result of this video gets uploaded to a Google Bucket. Then when seeking in Chrome I am getting some issues with certain frames, they are not being
seeked
.

When I pass it through FFMPEG locally and re-encode it, then upload it, I notice there are no issues.


Here is an image comparing the two results when running
ffmpeg -i FILE
(the one on the left works fine and the differences are minor)



I tried adjusting the arguments in the muxer code and am continuing to try and compare with the re-encoded video. I have no idea why this is happening, something to do with the frames.


-
How to avoid downloading the same video with different file extension (remux) in yt-dlp
23 décembre 2022, par DanielThis is the command I'm using to download my videos :
yt-dlp —remux "webm>avi" -o "%(upload_date)s %(title)s.%(ext)s" -f bv[format !*=248] -a List.txt


I have text files with tons of links
So, if the videos are already downloaded in avi format
yt-dlp doesn't detect it, instead it downloads the video again creating a webm.part file, then it remuxes the file and overwrites the old avi downloaded video


I know the cause of this is the ".%(ext)s" command but I cannot remove that part


So what I need is for yt-dlp to recognize the file name instead of the extension, because from time to time I will need to check those video lists again with yt-dlp, to check for missing videos, or if I add new link videos to those lists