
Recherche avancée
Autres articles (47)
-
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
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 ;
-
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (7766)
-
rv34 : use ff_mpeg_update_thread_context only when decoder is fully initialized
21 août 2014, par Janne Grunaurv34 : use ff_mpeg_update_thread_context only when decoder is fully initialized
MpegEncContext based decoders are only fully initialized after the first
ff_thread_get_buffer() call. The RV30/40 decoders may fail before a frame
buffer was requested. ff_mpeg_update_thread_context() fails on half
initialized MpegEncContexts. Since this can only happen before a the
first frame was decoded there is no need to call
ff_mpeg_update_thread_context().Based on patches by John Stebbins and tested by John Stebbins.
CC : libav-stable@libav.org
-
How exactly does this Jaccard distance logic (get_jaccarddist) in FFmpeg work ?
23 mars 2024, par stillooI see this C code in FFmpeg source
signature_lookup
file for Jaccard distance in methodget_jaccarddist
.

If you see in the code below that is calculating for 5 BagOfWords.


Now for two BagOfWords with say nothing in common intersection would be 0, that means
jaccarddist
would be 0, so ideally its a bad pair but this if conditionjaccarddist >= sc->thworddist
, would be false isn't it but we want it to be true as its bad pair ?

What are the default values of
sc->thworddist
?

Also surprised why
jaccarddist
is int and not float/double ?

/**
 * calculates the jaccard distance and evaluates a pair of coarse signatures as good
 * @return 0 if pair is bad, 1 otherwise
 */
static int get_jaccarddist(SignatureContext *sc, CoarseSignature *first, CoarseSignature *second)
{
 int jaccarddist, i, composdist = 0, cwthcount = 0;
 for (i = 0; i < 5; i++) {
 if ((jaccarddist = intersection_word(first->data[i], second->data[i])) > 0) {
 jaccarddist /= union_word(first->data[i], second->data[i]);
 }
 if (jaccarddist >= sc->thworddist) {
 if (++cwthcount > 2) {
 /* more than half (5/2) of distances are too wide */
 return 0;
 }
 }
 composdist += jaccarddist;
 if (composdist > sc->thcomposdist) {
 return 0;
 }
 }
 return 1;
}



-
Systemd service (python loop -> ffmpeg stream)
7 janvier 2019, par KevittoI am currently running a stream with ffmpeg, through icecast2 through a python snippet (Fig1). I have created a systemd service to run said python script on boot (Fig2) and use a custom target (Fig3) to make sure it loads once every other service is loaded, mostly for icecast2.
I’ve conducted multiple tests, and the stream works fine if launched either from the python code or if I restart the service attached to it.
My problem is, on a (re)boot of the system, the service runs for approximately 15 seconds, then the stream dies. I’ve read so much on python and systemd, but I can’t for the life of me figure out where the problem lies. I’ve tried changing my python code, the unit load order and anything else I found online that could help, but found nothing.
Fig1 (dxstream.py)
import sys
import time
import subprocess
def start():
return subprocess.Popen(r’ffpmeg -re -f alsa -ac2 -i hw:1,0 -acodec mp3 -ab 320k -f mp3 icecast://sourcehackme@localhost:8000/stream', shell=True)
testProcess = start()
while True:
res = testProcess.poll()
if res is not None:
testProcess = start()
time.sleep(1)Fig2 (dxstream.service)
[Unit]
Description=ffmpeg stream starter
After=multi-user.target
[Service]
Type=idle
Execstart=/usr/bin/python /usr/local/bin/dxstream.py
Restart=on-failure
[Install]
WantedBy=custom.targetFig3 (custom.target)
[Unit]
Description=Custom Target
Requires=multi-user.target
After=multi-user.target
AllowIsolate=yes