
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (68)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (5668)
-
Erros in compiling and running FFmpeg C example code
11 juillet 2019, par Tina JI’ve been trying to change an FFmpeg’s example code HERE to call other filters using its C APIs. Say the filter be
freezedetect=n=-60dB:d=8
which normally runs like this :ffmpeg -i small.mp4 -vf "freezedetect=n=-60dB:d=8" -map 0:v:0 -f null -
And prints outputs like this :
[freezedetect @ 0x25b91c0] lavfi.freezedetect.freeze_start: 5.005
[freezedetect @ 0x25b91c0] lavfi.freezedetect.freeze_duration: 2.03537
[freezedetect @ 0x25b91c0] lavfi.freezedetect.freeze_end: 7.04037However, the original example displays frames, not these metadata information. How can I change the code to print this metadata information (and not the frames) ?
I’ve been trying to change the
display_frame
function below into adisplay_metadata
function. Looks like theframe
variable has ametadata
dictionary which looks promising, but my attempts failed to use it. I’m also new to C language.Original
display_frame
function :static void display_frame(const AVFrame *frame, AVRational time_base)
{
int x, y;
uint8_t *p0, *p;
int64_t delay;
if (frame->pts != AV_NOPTS_VALUE) {
if (last_pts != AV_NOPTS_VALUE) {
/* sleep roughly the right amount of time;
* usleep is in microseconds, just like AV_TIME_BASE. */
delay = av_rescale_q(frame->pts - last_pts,
time_base, AV_TIME_BASE_Q);
if (delay > 0 && delay < 1000000)
usleep(delay);
}
last_pts = frame->pts;
}
/* Trivial ASCII grayscale display. */
p0 = frame->data[0];
puts("\033c");
for (y = 0; y < frame->height; y++) {
p = p0;
for (x = 0; x < frame->width; x++)
putchar(" .-+#"[*(p++) / 52]);
putchar('\n');
p0 += frame->linesize[0];
}
fflush(stdout);
}My new
display_metadata
function that needs to be completed :static void display_metadata(const AVFrame *frame)
{
// printf("%d\n",frame->height);
AVDictionary* dic = frame->metadata;
printf("%d\n",*(dic->count));
// fflush(stdout);
} -
KeyError : 1 on Python when the code points to a value that exists [closed]
10 décembre 2020, par oo92I am using the following code to traverse a list JSON output. There are about 100 streamers I want to take screens from but the code fails after the first one where I call the ffmpeg. I put a code after the ffmpeg to see if Python is running it at all and it does :


Traceback (most recent call last):
 File "/home/onur/Desktop/pythonProject/main.py", line 12, in <module>
 username = streams_now[i]['channel']['display_name']
KeyError: 1
auronplay it is 
</module>


This is my code :


import streamlink, os
from twitch import TwitchClient

client = TwitchClient(client_id='frl3dqgn21bbpp6tajjvg5pdevczac')

streams_now = client.streams.get_live_streams(limit=100)

print(streams_now[2]['channel']['display_name'])

for i in range(0, 99):
 username = streams_now[i]['channel']['display_name']
 streams_now = streamlink.streams('http://twitch.tv/' + username)
 stream = streams_now["best"].url
 dir_path = os.getcwd() + '/' + username
 os.mkdir(dir_path)
 os.system('ffmpeg -i ' + stream + f' -ss 20 -vframes 10 -r 0.2 -f image2 {dir_path}/' + username + '_output_%09d.jpg')
 print(username + ' it is ')



The line that throws the error is
username = streams_now[i]['channel']['display_name']
. However, this line cannot throw an error because I am testing it before the for loop :

print(streams_now[2]['channel']['display_name'])


and I get this :
shroud


-
how to explain this C language code from ffmpeg remuxing
20 avril 2017, par Fidonacan someone help me what the meaning of this code ? this is a code from ffmpeg remuxing code.
static void log_packet(const AVFormatContext *fmt_ctx, const AVPacket *pkt, const char *tag, int hours, int mins, int secs, int us, int *time )
{
AVRational *time_base = &fmt_ctx->streams[pkt->stream_index]->time_base;
total = total + pkt->duration;
// printf( "%d:%d:%d.%d \n", hours, mins, secs, us );
*time = av_q2d(*time_base) * pkt->pts ;
}I’m kind of new to C language. thank you !