
Recherche avancée
Médias (1)
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (51)
-
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (4768)
-
Revision 122868 : Toujours sur ces vues de saisies fieldset. Champ extra se base sur le ...
7 mars 2020, par Maïeul Rouquette — LogToujours sur ces vues de saisies fieldset.
Champ extra se base sur le classe vide pour ne pas afficher les saisies
sans réponse. Le masquage est en css, contrairement à ce que je pensais
(suis-je bête !)
On ajoute donc la classe vide à la vie d’une saisie si l’ensemble de ses
sous saisies sont vide.
Permet d’éviter avec champ extra d’avoir un titre de fieldset qui se
balade sans aucune réponse en dessous. -
mediastreamsegmenter stops sending id3 metadata using HLS
9 mai 2013, par alawson421I am using a combination of
ffmpeg
and Apple'smediastreamsegmenter
andid3taggenerator
to create a HLS stream with metadata (ID3) embedded in it. I have all of the applications running and am able to retrieve the metadata out of the stream on the client side, but the issue is that after what seems like a random amount of time, the client stops receiving metadata on the stream.Here is what I have working now :
This is the
ffmpeg
andmediastreamsegmenter
part :ffmpeg -i udp://@:5010 -c:v libx264 -crf:v 22 -b:v 500k -preset:v veryfast -c:a libfdk_aac -b:a 64k -f mpegts - | mediastreamsegmenter -b http://localhost/stream -f /usr/local/nginx/html/stream/ -t 10 -s 4 -S 1 -D -y id3 -m -M 4242 -l log.txt
This is taking a udp stream on the localhost on port 5010 and encoding the video and audio to H.264 and AAC, respectively. It is pipping the MPEG-2 transport stream segments to the
mediastreamsegmenter
, which in turn is generating the.M3U8
file and associated.ts
files and placing them on aNGINX
webserver. Themediastreamsegmenter
is also listening on port 4242 for tcp traffic from theid3taggenerator
which I will show how I am using it now :id3taggenerator -text '{"x":"12","y":"36"}' -a localhost:4242
As you can see, I am sending some simple x-y coordinates in JSON as text to the
mediastreamsegmenter
listening on port 4242. I am actually using a Python script to send some test data at the moment. Here is the script :#!/usr/local/bin/python3
from subprocess import call
from time import sleep
for i in range(0, 10):
for j in range(0, 10):
x = str(20 * i)
y = str(20 * j)
print("X: " + x + " - Y: " + y)
call(["id3taggenerator", "-text", "{\"x\":\"" + x + "\",\"y\":\"" + y + "\"}", "-a", "localhost:4242"])
sleep(1.0)This script is just sending a bunch of x-y coordinates using the
id3taggenerator
CLI. I have adjusted thesleep
amount from 0.1 to 15 and it doesn't seem to make any difference. The client application that is getting the metadata out of the stream only prints out anywhere from 4 to 35 points, but never has it ever received all of the x-y coordinates.I am wondering if there is a limit to the amount of metadata that can sent per frame, but I cannot seem to find anything that specifies a hard-limit value for any of these tools...
-
FFmpeg - add watermark, concat files and output mp4, optimize ?
17 août 2021, par user892134I use the following code, which works to :


- 

- add watermark
- convert (preroll,video,postroll) to .ts
- create concat txt file from new .ts files
- create mp4 ouput










variables


$filePath = '/home/mywebsite/public_html/assets/videos/';
$convertfile = $filePath.'convert-videos-2.txt';
$watermark = $filePath.'watermark.png';
$preroll = $filePath.'preroll.mp4';
$video = $filePath.'Video.mp4';
$video_watermark = str_replace(".mp4","-watermark.mp4",$video);
$newVideo = $filePath.'Video-New.mp4';
$postroll = $filePath.'postroll.mp4';
$input1 = $filePath.'input1.ts';
$input2 = $filePath.'input2.ts';
$input3 = $filePath.'input3.ts';



Add watermark to original mp4


$mark = "ffmpeg -y -i '".$video."' -i '".$watermark."' -filter_complex \"overlay=10:10\" '".$video_watermark."'";
exec($mark);



convert to ts (video transport stream)


exec("ffmpeg -i '".$preroll."' -c copy -bsf:v h264_mp4toannexb -f mpegts '".$input1."'");
exec("ffmpeg -i '".$video_watermark."' -c copy -bsf:v h264_mp4toannexb -f mpegts '".$input2."'");
exec("ffmpeg -i '".$postroll."' -c copy -bsf:v h264_mp4toannexb -f mpegts '".$input3."'");



create concatenate txt file, with new .ts files


$cmd = "echo \"file '".$input1."'\n";
$cmd.="file '".$input2."'\n";
$cmd.="file '".$input3."'\" > ".$convertfile;
exec($cmd);



create output mp4


exec("ffmpeg -f concat -safe 0 -y -i '".$convertfile."' -c copy -bsf:a aac_adtstoasc '".$newVideo."'");



This works but takes way to long. For an mp4 that is 1GB or more, can take upto 3 hours ? The watermark alone takes 1hour plus. How can i optimize this code ? combine commands ? How do i solve ?


I've tried adding the watermark when generate the second .ts file below, but not working, returns this error Streamcopy requested for output stream 0:0, which is fed from a complex filtergraph. Filtering and streamcopy cannot be used together. :


exec("ffmpeg -y -i '".$video."' -i '".$watermark."' -filter_complex \"overlay=10:10\" -c copy -bsf:v h264_mp4toannexb -f mpegts '".$input2."'");