
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (56)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 ;
-
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
Sur d’autres sites (8375)
-
FFmpeg : negative video duration
19 octobre 2020, par quentoFFmpeg is used to combine images into video and then duration is taken out of this video.


Surprisingly I found out that FFmpeg could return negative duration.


Command to get duration. This command is the most reliable according to this spec




You can also use ffmpeg to get the duration by fully decoding the file. The null muxer is used so no output file is created. Refer to time= in the next-to-last line of the console output. In this example the input has a duration of 00:57:28.87.




ffmpeg -i input.webm -f null - 



Output ex :


frame=206723 fps=1390 q=-0.0 Lsize=N/A time=00:57:28.87 bitrate=N/A speed=23.2x



Actual example


Generation of mp4 of screenshots :


`/usr/bin/ffmpeg' -framerate 30 -pattern_type glob -i '/app/tmp/ecc0fe7b5ca4d7b20ea54d3ba757cfbf_b4581272-c485-4be2-a210-cbc99d71bd14_0/*.jpeg' -c:v libx264 -vf 'scale=trunc(iw/2)*2:trunc(ih/2)*2' -pix_fmt yuv420p -filter:v 'setpts=1.11*PTS' '/app/tmp/ecc0fe7b5ca4d7b20ea54d3ba757cfbf_b4581272-c485-4be2-a210-cbc99d71bd14_0/ecc0fe7b5ca4d7b20ea54d3ba757cfbf.mp4`



Next, extracting duration :


/usr/bin/ffmpeg' -i '/app/tmp/ecc0fe7b5ca4d7b20ea54d3ba757cfbf_b4581272-c485-4be2-a210-cbc99d71bd14_0/ecc0fe7b5ca4d7b20ea54d3ba757cfbf.mp4 -f null



Output :


time=-577014:32:22.77



Unfortunately I can't reproduce this issue on local machine so far, so there are not many details to share. However, such cases appear on other machines quite frequently. Different videos get exactly the same broken time. There are also enough other inconsistent cases.


One of the suggestions is to parse extraction out of first command, which generates video. I'm not sure that I won't also face negative numbers there, though.


Most probably I miss much more easier solution. The only requirement is that is must be 100% precise.


Thanks in advance !


-
avcodec/qtrleenc : Fix negative linesizes, don't use NULL + offset
26 mars 2021, par Andreas Rheinhardtavcodec/qtrleenc : Fix negative linesizes, don't use NULL + offset
Before commit f1e17eb446577180ee9976730aacb46563766518, the qtrle
encoder had undefined pointer arithmetic : Outside of a loop, two
pointers were set to point to the ith element (with index i-1) of
a line of a frame. At the end of each loop iteration, these pointers
were decremented, so that they pointed to the -1th element of the line
after the loop. Furthermore, one of these pointers can be NULL (in which
case all pointer arithmetic is automatically undefined behaviour).Commit f1e17eb44 added a check in order to ensure that the elements
never point to the -1th element of the array : The pointers are only
decremented if they are bigger than the frame's base pointer
(i.e. AVFrame.data[0]). Yet this check does not work at all in case of
negative linesizes ; furthermore in case the pointer that can be NULL is
NULL initializing it still involves undefined pointer arithmetic.This commit fixes both of these issues : First, non-NULL pointers are
initialized to point to the element after the ith element and
decrementing is moved to the beginning of the loop. Second, if a pointer
is NULL, it is just made to point to the other pointer, as this allows
to avoid checks before decrementing it.Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
avcodec/pgxdec : Fix issue with negative linesizes
15 avril 2022, par Andreas Rheinhardtavcodec/pgxdec : Fix issue with negative linesizes
The PGX decoder accesses the lines via code like
(PIXEL*)frame->data[0] + i*frame->linesize[0]/sizeof(PIXEL)
where PIXEL is a macro parameter. This code has issues with negative
linesizes, because the type of sizeof(PIXEL) is size_t, so
that on common systems i*linesize/sizeof(PIXEL) will
always be an unsigned type that is very large in case linesize is
negative. This happens to work*, but it is undefined behaviour
and e.g. leads to "src/libavcodec/pgxdec.c:114:1 : runtime error :
addition of unsigned offset to 0x7efe9c2b7040 overflowed to 0x7efe9c2b6040"
errors from UBSAN.
Fix this by using (PIXEL*)(frame->data[0] + i*frame->linesize[0]).
This is allowed because linesize has to be suitably aligned.* : Converting a negative int to size_t works by adding SIZE_MAX + 1
to the number, so that the result is off by (SIZE_MAX + 1) /
sizeof(PIXEL). Converting the pointer arithmetic (performed on PIXELs)
back to ordinary pointers is tantamount to multiplying by sizeof(PIXEL),
so that the result is off by SIZE_MAX + 1 ; but SIZE_MAX + 1 == 0
for the underlying pointers.Reviewed-by : Paul B Mahol <onemda@gmail.com>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>