
Recherche avancée
Autres articles (67)
-
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)
Sur d’autres sites (10368)
-
ffmpeg audio and video gradually go out of sync when recorded with shell script and make
6 août 2020, par cgmilI wrote the following shell script for making streamcasts for recording streams using ffmpeg :


[ -z $1 ] && { echo "No recording device selected!" 2>&1 && exit ; } || DEV=$1
VIDFILE=video/bvid.mkv
AUDFILE=audio/baud.wav
DIM=$(xdpyinfo | grep dimensions: | awk '{print $2;}')
(sleep 10 && echo "Streaming...") &
ffmpeg -nostdin -loglevel panic -f x11grab -s $DIM -i $DISPLAY.0 -c:v libx264 "$VIDFILE" &
ffmpeg -nostdin -loglevel panic -f alsa -i hw:$DEV -c:a libmp3lame "$AUDFILE" &
sleep 1
[ -f $VIDFILE ] && (echo "Created video" 1>&2) || (echo "No video!" 1>&2)
sleep 1
[ -f $AUDFILE ] && (echo "Created audio" 1>&2) || (echo "No audio!" 1>&2)

wait
trap "killall background -s 2" SIGINT



This produces a video and audio file that can then be used to make a stream via make using the command
make stream
. Here is theMakefile
(note that there is a 3-minute long audio file and a file with images that is used to make an opening splash screen) :

FULLAUDIO=audio/full.wav
AUDSTART=84
TITLE="Stats Aside:\\nInterpreting\\nProbability"
SIZEW=1920
SIZEH=1080

audio/clip.wav : $(FULLAUDIO)
 ffmpeg -ss $(AUDSTART) -i $< -t 6 -af "afade=t=in:st=0:d=3:curve=qsin,afade=t=out:st=3:d=3:curve=qsin" -c:a libmp3lame $@

img/thumb.png : img/bg.png img/ico.png
 convert -stroke white -fill white -background black -transparent "#000000" \
 -font "URWBookman-Light" -gravity Center -size 928x1080 \
 label:$(TITLE) png:- | composite -gravity west -geometry +64+0 - \
 img/bg.png $@
 convert img/ico.png -transparent "#ffffff" png:- | composite \
 -gravity southeast -geometry +32+32 - $@ $@
 convert $@ -resize $(SIZEW)x$(SIZEH) $@

video/intro.mp4 : img/thumb.png audio/clip.wav
 ffmpeg -i audio/clip.wav -loop 1 -t 6 -i img/thumb.png -vf "fade=t=in:st=0:d=1,fade=t=out:st=5:d=1:c=white,scale=$(SIZEW):$(SIZEH)" -c:v libx264 -c:a libmp3lame $@

ProbabilityInterpretation.mp4 : video/bvid.mkv video/intro.mp4 audio/baud.wav
 ffmpeg -i video/intro.mp4 -ss 11 -i video/bvid.mkv \
 -ss 10 -i audio/baud.wav \
 -filter_complex \
 "[1]fade=t=in:st=0:d=1:c=white,scale=$(SIZEW):$(SIZEH)[bvid];\
 [2]afftdn=nr=20[baud];\
 [0:v][0:a][bvid][baud]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" \
 -c:v libx264 -c:a libmp3lame $@

stream : ProbabilityInterpretation.mp4

clean:
 -rm ProbabilityInterpretation.mp4
 -rm video/intro.mp4
 -rm audio/clip.wav
 -rm img/thumb.png

veryclean:
 make clean
 -rm video/bvid.mkv
 -rm audio/baud.wav




Because of lag between my webcam and what appears on screen, I do intentionally start the video and audio at different times so that they can eventually become in sync. However, the end result is a video that starts with the video and audio synced together, but eventually become out of sync, with the video lagging well behind the audio. Here is a link to the video with the end result ; it's long, but notice that the video starts in sync and ends out-of-sync. I should probably also note that the operating system is living in a virtual machine (VirtualBox).


Why is this happening and what can I do to prevent or correct ?


-
How to convert the AVPacket of ffmpeg to the webm stream with c++ code ?
2 décembre 2020, par MichaelGDI am confused how to convert the ffmpeg AVPacket to a living stream in order to I can play it with HTML5.


I have already got the
AVPacket
of ffmpeg withavcodec_encode_video2


AVPacket pkt_; 
ret = avcodec_encode_video2(c_, &pkt_, picture_, &got_frame);



And I also know how to dump the packet to webM file.


file_.write(reinterpret_cast<char>(&(pkt_.size)), sizeof(int));
file_.write(reinterpret_cast<char>(&timestamp), sizeof(uint64_t));
file_.write(reinterpret_cast<char>(pkt_.data), pkt_.size);
</char></char></char>


But, How can I create a stream server with the packets for front-end playing ?


-
Pipe ffmpeg process with node js
20 juin 2022, par MaxWhen I make request to route, spawn process and pipe it directly to response, it works perfectly fine and creates livestream. However, it takes some time to start process and buffer some data to start playing video.


app.get("/stream", async (req, res) => {
 const url = "rtsp://213.3.38.11/axis-media/media.amp";

 const cmd = [
 "-re",
 "-loglevel",
 "debug",
 "-reorder_queue_size",
 "5",
 "-rtsp_transport",
 "tcp",
 "-i",
 `${url}`,
 "-c:v",
 "copy",
 "-c:a",
 "aac",
 "-f",
 "mp4",
 "-movflags",
 "+frag_keyframe+empty_moov+default_base_moof",
 "pipe:1",
 ];

 const child = spawn("ffmpeg", cmd, {
 stdio: ["ignore", "pipe", process.stderr],
 });

 child.stdio[1].pipe(res)l

 res.on("close", () => {
 child.stdio[1].unpipe(res);
 });
});




I would like to create process while starting server so I can pipe it whenever I make request to that route, but when I do so, process is living for a few seconds then stops using cpu. Sometimes it lives, but dies when I make request and try piping it.