
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 (93)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Les sons
15 mai 2013, par -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (6077)
-
WebM on the web
23 mai 2010, par Basil Gohar — Software, Updates, flumotion, gstreamer, mpeg-la, ogg, vp8, webm, xiphNews & developments about WebM are coming too fast to cover all of them, but it’s definitely encouraging to see that the free software world (as well as some other surprising, but welcome, players) has unequivocally embraced WebM as the … Read more (...)
-
How to use pathinfo in php ?
10 juin 2019, par flashI am working on a php code as shown below on which Line#A prints the following array (shown below php code). My code doesn’t seems to go inside switch statement. I am not sure why.
I added
print_r($parts)
at Line A in order to print the value of $parts.php code :
<?php
if (!empty($_POST['id']))
{
for($i=0; $i / Line A
switch ($parts['extension'])
{
echo "Hello World"; // Line B
case 'mp4' :
$filePath = $src_dir . DS . $f;
system('ffmpeg -i ' . $filePath . ' -map 0:2 -ac 1 ' . $destination_dir . DS . $parts['filename'] . '.mp3', $result);
}
}
}
}
?>Output (Line#A) :
Array
(
[dirname] => .
[basename] => hello.mp4
[extension] => mp4
[filename] => hello
)I have used
echo "Hello World"
at Line B but for some reasons, its not getting printed and throwing500 internal server error
on console.Problem Statement :
I am wondering what changes I should make in the php code so that it goes inside switch statement.
-
Cannot display a decoded video frame on Raylib
20 décembre 2024, par gabriel_tisoI'm trying to explore
libav
andraylib
just to understand how audio and video work, and also to learn how to build nice interfaces using theraylib
project. I've implemented a simple struct capable of decoding audio and video frames. When a video frame appears, I convert it to theRGBA
format, which packs the values into 32bpp. This is the setup :

if (av_image_alloc((uint8_t **)media->dst_frame->data,
 media->dst_frame->linesize, media->ctxs[0]->width,
 media->ctxs[0]->height, AV_PIX_FMT_RGBA, 1) < 0) {
 fprintf(stderr, "Failed to setup dest image\n");
 return -1;
 }

 media->sws_ctx = sws_getContext(
 media->ctxs[0]->width, media->ctxs[0]->height, media->ctxs[0]->pix_fmt,
 media->ctxs[0]->width, media->ctxs[0]->height, AV_PIX_FMT_RGBA,
 SWS_BILINEAR, NULL, NULL, 0);

 // Later on, in the decode function:
 int ret = sws_scale(media->sws_ctx, media->frame->data,
 media->frame->linesize, 0, media->frame->height,
 media->dst_frame->data, media->dst_frame->linesize);




In the main file, I init raylib, and setup the necessary steps to load the texture (here I'm trying to fetch the first video frame in order to show the user a preview of the video, later on I plan to reset the stream to allow a correct playback routine). I think the format of the image is right.


Image previewImage =
 GenImageColor(videoArea.width, videoArea.height, BLACK);
 // I assume this makes the formats compatible
 ImageFormat(&previewImage, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8);

 Texture2D videoTexture = LoadTextureFromImage(previewImage);
 UnloadImage(previewImage);




 if (!state->has_media) {
 DrawText("Drop a video file here!", videoArea.x + 10,
 videoArea.y + 10, 20, GRAY);
 } else {
 if (state->first_frame) {
 do {
 decode_packet(state->media);
 } while (!is_frame_video(state->media));

 UpdateTexture(videoTexture, state->media->dst_frame->data[0]);

 state->first_frame = 0;
 }
 }

 DrawTexture(videoTexture, videoArea.x, videoArea.y, WHITE);



Anyway, this is what I get when a mp4 file is dropped :



It seems like an alignment issue maybe ? Can someone point me in the right direction in order to correctly solve this problem ?