
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
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 (57)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)
Sur d’autres sites (10027)
-
x86 : XOP pixel_sad_{x3, x4} high bit-depth
9 avril 2014, par James Almer -
High latency when reading latest frame from H264 stream with FFmpeg
22 juin 2022, par massivemoistureI have an app in c# that receives a H264 video stream of Android device's screen from scrcpy-server (https://github.com/Genymobile/scrcpy).


I want to continously get the latest image from the stream and send it to a web app for streaming.


I created a Process for ffmpeg and gave it these arguments :


-fflags -nobuffer -flags low_delay -probesize 32 -re -i pipe: -g 1 -f rawvideo -pix_fmt bgr24 -an -sn pipe:


I have two threads. One thread to write to stdin of the FFmpeg process the bytes that I get from scrcpy-server. The other thread to read the stdout.


But the image stream that I get has very high latency, especially if there is not much movement on the device's screen. And the latency just keeps mounting up, from a few seconds behind to a minute and more.


How can I fix this issue ?


-
Playing sound from a video using FFmpeg and SDL_QueueAudio results in high pitched audio
26 septembre 2021, par plieblangI'm trying to play audio from an mp4 file using SDL2 and FFmpeg, and using
SDL_QueueAudio
seems much easier than setting up a callback.


All solutions I've found, whether here or in the dranger tutorials, are deprecated or use callbacks. I tried browsing all questions with both the ffmpeg and sdl tags (there aren't many), to no avail. I tried converting the dranger tutorial to use non-deprecated calls but ran into the same problem. I'm using C, FFmpeg 4.1 and SDL 2.0.9.



This is the setup for AVCodecContext and AVCodec :



int audioStream = -1;
 for (i = 0; i < formatContext->nb_streams; i++) {
 if (audioStream < 0 && formatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
 audioStream = i;
 }
 }

 AVCodecParameters *audioParams = formatContext->streams[audioStream]->codecpar;

 AVCodec *audioCodec = avcodec_find_decoder(audioParams->codec_id);

 AVCodecContext *audioCodecCtx = avcodec_alloc_context3(NULL);
 avcodec_open2(audioCodecCtx, audioCodec, NULL);

 SDL_Init(SDL_INIT_AUDIO)

 SDL_AudioSpec desired, obtained;
 SDL_zero(desired);
 SDL_zero(obtained);
 desired.freq = audioCodecCtx->sample_rate;
 desired.format = AUDIO_F32SYS;
 desired.channels = audioCodecCtx->channels;
 desired.silence = 0;
 desired.samples = AUDIO_BUFFER_SIZE;

 SDL_AudioDeviceID audioDevice = SDL_OpenAudioDevice(NULL, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);




This is the main packet decoding loop :



while (av_read_frame(formatContext, &packet) >= 0) {
 if (packet.stream_index == audioStream) {
 if (!avcodec_send_packet(audioCodecCtx, &packet)) {
 avcodec_receive_frame(audioCodecCtx, audioFrame);
 SDL_QueueAudio(audioDevice, audioFrame->data[0], audioFrame->linesize[0]);
 }
 }
 }




The audio plays at the correct speed but at a much higher pitch than what it actually is. I would like it to sound the same as in any media player.

Edit : I just realized the test video has stereo audio but I'm only queueingaudioFrame.data[0]
, which I assume means I'm only playing one channel. I tried queueingaudioFrame.data[1]
which has data as well but it did not solve the problem. Am I correct and if so, how do I play both channels ?