
Recherche avancée
Autres articles (112)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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 (...)
Sur d’autres sites (11450)
-
avformat/aaxdec : Check string before strcmp()
23 octobre 2020, par Michael Niedermayeravformat/aaxdec : Check string before strcmp()
Fixes : NULL ptr dereference
Fixes : 26508/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5694725249826816Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
Revert "avutil/timecode : fix sscanf format string with garbage at the end"
16 janvier 2021, par Marton BalintRevert "avutil/timecode : fix sscanf format string with garbage at the end"
This reverts commit 6696a07ac62bfec49dd488510a719367918b9f7a.
It is wrong to restrict timecodes to always contain leading zeros or for hours
or frames to be 2 chars only.Signed-off-by : Marton Balint <cus@passwd.hu>
-
Filtering string for hidden character when read from file in bash [duplicate]
19 mai 2021, par BharathYesI am writing a bash script to trim video file into small pieces and finally merge them into a single video file using ffmpeg based on specified time.


#!/bin/bash

filename="$1"
linecount=`wc -l "${filename}.txt"`
echo -n "" > to-merge.list

# file split by time
count=0
IFS=''
while read -r fromTime ; read -r toTime; do
 echo "$fromTime and $toTime done"
 ffmpeg -i "${filename}.mp4" -ss $fromTime -to $toTime -c copy "${filename}_pt_${count}.mp4"
 echo "file '${filename}_pt_${count}.mp4'" >> to-merge.list
 count=$((count+1))
done < "${filename}.txt"

# file merge
`ffmpeg -f concat -safe 0 -i to-merge.list -c copy "${filename}-trimmed.mp4"`



The input file contains time (odd lines are taken as start time and even as the end time). A file I use is :


00:00:00
00:39:34
00:39:38
01:23:14
01:23:16
02:03:45
02:03:48
02:43:43




problem faced


The echo in while loop prints this :
done02:03:45


The overwriting makes me think the time stored in the variables must contain a special character at the end that makes it invalid in ffmpeg.
ffmpeg throws this error :
Invalid duration specification for ss: 01:23:16


Is there a way to cleanup the time variable ?


I have tried to find what is causing this issue or how to get rid of it but drawing a blank.



what I have tried so far


use
grep -Eo '[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}'
to find time. While this works on the shell I am unable to use it in the script.

Tried splitting time by : into hour, min and sec and saving them into an array to then merge them back but this makes it unnecessarily complicated and error prone.


PS :
Is
while read
to be preferred for reading multiple lines like here or should tools like sed be used for best practice ? Such assed '2,4 !d' /tmp/test.txt
?