
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (87)
-
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 (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
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 (11042)
-
Piping PCM data from FFMPEG to another process with Python subprocess
13 février 2017, par Pete BleackleyI am trying to transcribe a podcast. To do so, I am decoding the mp3 stream with FFMPEG, and piping the resulting PCM output to the speech recognition component. My code looks like this.
mp3=subprocess.Popen(['ffmpeg','-i',audio_url,
'-f','s16le','-ac','1','-ar','16000','pipe:0'],
stdout=subprocess.PIPE)
sphinx=subprocess.Popen(['java','-jar','transcriber.jar'],
stdin=mp3.stdout,
stdout=subprocess.PIPE)Where
audio_url
is the url of the mp3 file.When I try to run this, it hangs. It appears that feeding the decoded PCM data through the pipe has deadlocked. What can I do to fix this ? The size of the output data is likely to be too big for
subprocess.Popen.communicate
to be an option, and explicitly callingmp3.stdout.close()
has had no effect. -
Display video data to screen
23 septembre 2014, par user3215358I’m trying to decode
h264
video usingHW
withStagefright
library andrender
it.I want to display data to screen with
SDL
.I’m getting video data to
MediaBuffer
. For non H/W decoding video displays well by usingFFMpeg
library. Here is piece of rendering code.while (av_read_frame(pFormatCtx, &packet) >= 0)
{
// Is this a packet from the video stream?
if (packet.stream_index == videoStream)
{
avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
if (frameFinished)
{
SDL_UpdateYUVTexture(bmp, NULL, pFrame->data[0],
pFrame->linesize[0],
pFrame->data[1],
pFrame->linesize[1],
pFrame->data[2],
pFrame->linesize[2]);
rect.x = 0;
rect.y = 0;
rect.w = pCodecCtx->width;
rect.h = pCodecCtx->height;
SDL_SetRenderDrawColor(renderer, 0, 80, 0, 255);
SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, bmp, NULL, &rect);
SDL_RenderPresent(renderer);
}
}But when i’m using H/W accelerated decoding, what I should use in
SDL_UpdateYUVTexture(bmp, NULL,....)
function.And Here is piece of H/W accelerated decoding.
while (err != ERROR_END_OF_STREAM )
{
MediaBuffer *mVideoBuffer;
MediaSource::ReadOptions options;
err = mVideoDecoder->read(&mVideoBuffer, &options);
if (err == OK) {
if (mVideoBuffer->range_length() > 0)
{
//SDL_UpdateYUVTexture(bmp, NULL,...);
rect.x = 0;
rect.y = 0;
rect.w = 640;
rect.h = 480;
SDL_SetRenderDrawColor(renderer, 0, 80, 0, 255);
SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, bmp, NULL, &rect);
SDL_RenderPresent(renderer);
}
mVideoBuffer->release();
}
}How i should use SDL_UpdateYUVTexture(bmp, NULL,...) function ?
-
How to fill AVFrame with audio data
12 décembre 2014, par AndyI use Win32 API to implement a desktop recording program.
The video capture feature works, but I have no idea to put the audio in the FFmpeg encoder’s data structure.The below code will get the data of the default output audio.
// Set wave format when sampling the audio
WAVEFORMATEX wf;
wf->wFormatTag = WAVE_FORMAT_PCM;
wf->nChannels = 1;
wf->nSamplesPerSec = 12000;
wf->nBlockAlign = 1;
wf->wBitsPerSample = 8;
wf->cbSize = 0;
wf->nAvgBytesPerSec = nChannels * nSamplesPerSec * wBitsPerSample / 8;
// Open wave input channel
HWAVEIN hWaveIn;
OpenWaveIn(&hWaveIn,&wf);
// Prepare Wave In Header and allocate memory
WAVEHDR waveHdr;
DWORD dataSize = 240000L;
PrepareWaveIn(&hWaveIn, &waveHdr, dataSize);
// Start recording
StartRecord(&hWaveIn);
// Stop recording
MMTIME mmt;
StopRecord(&hWaveIn, &mmt);waveHdr->lpData
is a pointer to locked data buffer.The question is how can I implement the below function let the
waveHdr->->lpData
can be saved toAVFrame
?static AVFrame *get_audio_frame(OutputStream *ost)
{
AVFrame *frame = ost->tmp_frame;
int j, i, v;
int16_t *q = (int16_t*)frame->data[0];
AVRational arg;
arg.num = 1;
arg.den = 1;
//the transform code should be put here
frame->pts = ost->next_pts;
ost->next_pts += frame->nb_samples;
return frame;
}Does someone know how can implement this ?