
Advanced search
Other articles (90)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 February 2011, byMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 March 2010, byLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3); le plugin champs extras v2 nécessité par (...)
-
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 February 2011, byLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...)
On other websites (6348)
-
Accessibility Testing: Why It Matters and How to Get Started
7 May 2024, by Erin -
FFMPEG hangs (sometimes) when trying to take a photo from USB camera?
13 May 2022, by dezmanI am attempting to write a script that takes a photo every 3 seconds from camera source "1", the -pix_fmt I think is unique to my USB camera.


Here is the script:


#!/bin/bash

set -e

while :
do
 nice_num=$(date +%s)
 
 ffmpeg -ss 00:00:00 -f avfoundation -pix_fmt yuyv422 -r 30.000030 -i "1" -t 1 -frames:v 1 -q:v 2 "image_$nice_num_%03d.jpg"
 
 wait

 sleep 3
done



The issue is half the time it successfully takes the photo, and half the time it just hangs forever echoing this (not useful):


ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with Apple clang version 13.1.6 (clang-1316.0.21.2)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
 libavutil 57. 17.100 / 57. 17.100
 libavcodec 59. 18.100 / 59. 18.100
 libavformat 59. 16.100 / 59. 16.100
 libavdevice 59. 4.100 / 59. 4.100
 libavfilter 8. 24.100 / 8. 24.100
 libswscale 6. 4.100 / 6. 4.100
 libswresample 4. 3.100 / 4. 3.100
 libpostproc 56. 3.100 / 56. 3.100



Then I CTRL-C 3 times and get:


^C^C^CReceived > 3 system signals, hard exiting



Other methods of "taking a photo every n seconds from bash" are also appreciated.


-
Should I use aevalsrc or anullsrc? I got flooded with "cur_dts is invalid st:0" or "Delay between the first packet", encoding stalls at frame 127
28 April 2022, by jokoonContext: this command is generated with a python script, it aims at concatenating different small videos of different format, with a 0.5s pause, considering some video don't have an audio track.


ffmpeg.exe
-report
-i
input0.mp4
-i
input1.mp4
-i
input2.mp4
-i
input3.mp4
-i
input4.mp4
-i
input5.mp4
-i
input6.mp4
-i
input7.mp4
-i
input8.mp4
-f
lavfi
-i
color=c=black:s=480x270:d=0.5:r=24,format=yuv420p
-f
lavfi
-i
anullsrc
-filter_complex_script
filter_complex_script.txt
-map
[final_video]
-map
[final_audio]
-c:a
aac
concatenated-2022-04-27--23-53.mp4



—


[0]fps=24[fps0];
[fps0]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled0];
[1]fps=24[fps1];
[fps1]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled1];
[2]fps=24[fps2];
[fps2]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled2];
[3]fps=24[fps3];
[fps3]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled3];
[4]fps=24[fps4];
[fps4]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled4];
[5]fps=24[fps5];
[fps5]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled5];
[6]fps=24[fps6];
[fps6]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled6];
[7]fps=24[fps7];
[fps7]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled7];
[8]fps=24[fps8];
[fps8]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:-1:-1,setsar=1[rescaled8];
[rescaled0][10:a][9:v][10:a][rescaled1][10:a][9:v][10:a][rescaled2][10:a][9:v][10:a][rescaled3][10:a][9:v][10:a][rescaled4][10:a][9:v][10:a][rescaled5][5:a][9:v][10:a][rescaled6][6:a][9:v][10:a][rescaled7][7:a][9:v][10:a][rescaled8][8:a]concat=n=17:v=1:a=1[final_video][final_audio]



I either have thousands of

[mp4 @ 000002132cefe100] Delay between the first packet and last packet in the muxing queue is 10007800 > 10000000: forcing output


when I use


-f lavfi -i anullsrc

so I tried using-f lavfi -i aevalsrc=0:n=1


instead, I have have thousands of


cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)


The encoding "stalls" at frame 127, it keeps doing things, but the frame counter doesn't increment.


Here are the inputs:


I skipped the yuvj420p input as it generated warnings (looks like it's not a big problem)




Here is a log (I trimmed it a bit): (I think it's a bit large for stackoverflow)