
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (61)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (5460)
-
.NET Process - Redirect stdin and stdout without causing deadlock
21 juillet 2017, par user1150856I’m trying to encode a video file with FFmpeg from frames generated by my program and then redirect the output of FFmpeg back to my program to avoid having an intermediate video file.
However, I’ve run into what seems to be a rather common problem when redirecting outputs in System.Diagnostic.Process, mentioned in the remarks of the documentation here, which is that it causes a deadlock if run synchronously.
After tearing my hair out over this for a day, and trying several proposed solutions found online, I still cannot find a way to make it work. I get some data out, but the process always freezes before it finishes.
Here is a code snippet that produces said problem :
static void Main(string[] args)
{
Process proc = new Process();
proc.StartInfo.FileName = @"ffmpeg.exe";
proc.StartInfo.Arguments = String.Format("-f rawvideo -vcodec rawvideo -s {0}x{1} -pix_fmt rgb24 -r {2} -i - -an -codec:v libx264 -preset veryfast -f mp4 -movflags frag_keyframe+empty_moov -",
16, 9, 30);
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
FileStream fs = new FileStream(@"out.mp4", FileMode.Create, FileAccess.Write);
//read output asynchronously
using (AutoResetEvent outputWaitHandle = new AutoResetEvent(false))
{
proc.OutputDataReceived += (sender, e) =>
{
if (e.Data == null)
{
outputWaitHandle.Set();
}
else
{
string str = e.Data;
byte[] bytes = new byte[str.Length * sizeof(char)];
System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length);
fs.Write(bytes, 0, bytes.Length);
}
};
}
proc.Start();
proc.BeginOutputReadLine();
//Generate frames and write to stdin
for (int i = 0; i < 30*60*60; i++)
{
byte[] myArray = Enumerable.Repeat((byte)Math.Min(i,255), 9*16*3).ToArray();
proc.StandardInput.BaseStream.Write(myArray, 0, myArray.Length);
}
proc.WaitForExit();
fs.Close();
Console.WriteLine("Done!");
Console.ReadKey();
}Currently i’m trying to write the output to a file anyway for debugging purposes, but this is not how the data will eventually be used.
If anyone knows a solution it would be very much appreciated.
-
Interesting behavior in Media Source Extensions
28 mai 2020, par newtonian_figI'm trying to build a fairly standard video player using Media Source Extensions ; however, I want the user to be able to control when the player moves on to a new video segment. For example, we might see the following behavior :



- 

- Video player plays 1st segment
- Source Buffer runs out of data causing the video to appear paused
- When the user is ready, they click a button that adds the 2nd segment to the Source Buffer
- The video continues by playing the 2nd segment











This works well, except that when the video appears paused during step 2 it doesn't stop at the last frame of the 1st segment. Instead, it stops two frames before the end of the 1st segment. Those last two frames aren't being dropped, they just get played after the user clicks the button to advance the video. This is an issue for my application, and I'm trying to figure out a way to make sure all of the frames from the 1st segment get played before the end of step 2.



I suspect that these last two frames are getting held up in the video decoder buffer. Especially since calling endOfStream() on my Media Source after adding the 1st segment to the Source Buffer causes the 1st segment to play all the way through with no frames left behind.



Additional Info



- 

- I created each video segment file from a series of PNGs using the following ffmpeg command





ffmpeg -i %04d.png -movflags frag_keyframe+empty_moov+default_base_moof video_segment.mp4



- 

- Maybe this is a clue ? End of stream situations not handled correctly (last frames are dropped)
- Another interesting thing to note is that if the video only has 2 frames or less, MSE doesn't play it at all.
- The browser I'm using is Chrome. The code for my MSE player is just taken from the Google Developers example, but I'll post it here for completeness. This code only covers up to step 2 since that's where the issue is.









<code class="echappe-js"><script>&#xA;const mediaSource = new MediaSource();&#xA;video.src = URL.createObjectURL(mediaSource);&#xA;mediaSource.addEventListener(&#x27;sourceopen&#x27;, sourceOpen, { once: true });&#xA;&#xA;function sourceOpen() {&#xA; URL.revokeObjectURL(video.src);&#xA; const sourceBuffer = mediaSource.addSourceBuffer(&#x27;video/mp4; codecs="avc1.64001f"&#x27;);&#xA; sourceBuffer.mode = &#x27;sequence&#x27;;&#xA;&#xA; // Fetch the video and add it to the Source Buffer&#xA; fetch(&#x27;https://s3.amazonaws.com/bucket_name/video_file.mp4&#x27;)&#xA; .then(response => response.arrayBuffer())&#xA; .then(data => sourceBuffer.appendBuffer(data));&#xA;}&#xA;&#xA;</code></pre>&#xA;
-
Evolution #2633 : Pouvoir modifier _DIR_RESTREINT_ABS
10 juillet 2015, par jluc -Si on enlève les répertoires de tests, il ne reste plus grand chose :
// normal spip.php:14:if (!defined(’_DIR_RESTREINT_ABS’)) define(’_DIR_RESTREINT_ABS’, ’ecrire/’) ; ecrire/inc_version.php:38 : define(’_DIR_RESTREINT_ABS’, ’ecrire/’) ;
// pb ecrire
ecrire/public/debusquer.php:366 : if ($reg[1]==’ecrire/public’)// dist
plugins-dist/forum/prive/modeles/forum-actions-moderer.html:2 :[(#SETretour,[(#REM|test_espace_prive| ?[(#VALecrire/|concat#SELF|replace’./’,’’)],#SELF|ancre_urlforum#ID_FORUM)])]// installation ’normale’
config/ecran_securite.php:113 : OR @file_exists(’ecrire/inc_version.php’))
config/ecran_securite.php:259:if (strpos($_SERVER[’REQUEST_URI’],"ecrire/") !==false)spip_loader.php:44:define(’_SPIP_LOADER_PLUGIN_RETOUR’, "ecrire/ ?exec=admin_plugin&voir=tous") ;
spip_loader.php:923:if (@file_exists(’ecrire/inc_version.php’))
spip_loader.php:924 : define(’_SPIP_LOADER_URL_RETOUR’, "ecrire/ ?exec=accueil") ;
spip_loader.php:925 : include_once ’ecrire/inc_version.php’ ;
spip_loader.php:933 : else define(’_SPIP_LOADER_URL_RETOUR’, "ecrire/ ?exec=install") ;