
Recherche avancée
Autres articles (111)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (13887)
-
Parsing avconv/ffmpeg rawvideo output ?
23 avril 2013, par DigitalManI'm about to begin a project that will involve working with the output of avconv/ffmpeg, pixel-by-pixel, in rgb32 format. I intend to work with a raw byte stream, such as from the
pipe
protocol. Basic pointer arithmetic (C/C++) will be used to iterate over these pixels, and modify them in arbitrary manners in real-time.I've created a very small file using rawvideo format and codec, and opened it up in a hex editor. As expected, it's just a series of pixels, read right to left, top to bottom. No distinguishing between lines - no problem, if you know how wide the video is beforehand. No distinguishing between frames - no problem, if you also know how tall the video is. No file header for frame rate, or even what the encoding (rgb32, rgb24, yuv, etc.) is - again, as long as you already know, it can be worked with.
The problem occurs when - for one reason or another - some bytes are missing. Maybe the stream isn't being examined from the beginning, which is likely be the case in my project, or maybe something just got lost. All the pre-existing knowledge in the world (besides maybe a byte count of what's been missed, not gonna happen) won't prevent it from happily chugging along, with an incorrect offset of line and frame.
So, what I'm looking for is an option for rawvideo, or possibly some other format/codec, that will allow me to work with the resulting stream at the pixel level, in RGB, yet still have a clear definition of where a new frame begins, even if it happens to start "looking" in the middle of a frame. (Width, height, and framerate will indeed be known.)
-
ffmpeg watermark transparent background
6 mai 2013, par ionutvmiI'm trying to add a watermark to a video file but i'm having problems with the background of the watermark because i want it to be transparent.
My approach is like this : i make a png file the size of the video with transparent background like this
$im = imagecreatetruecolor($width, $height);
$almostblack = imagecolorallocate($im,254,254,254);
imagefill($im,0,0,$almostblack);
$black = imagecolorallocate($im,0,0,0);
imagecolortransparent($im,$almostblack);
$textcolor = imagecolorallocate($im, 255, 0, 0);
// Write the string at the top left
imagestring($im, 5, 0, 0, 'Hello world!', $textcolor);
imagepng($im, $img);
imagedestroy($im);and then i add it to the video like this
exec("/usr/bin/ffmpeg -y -i '$file->path' -sameq -vf 'movie=$img [logo]; [in][logo] overlay=main_w-overlay_w:main_h-overlay_h [out]' '$new_path'");
the watermark is added but it's background is not transparent.
Any idea what i'm doing wrong ?
UPDATE : it turns out it works just fine for other png images so the problem must be in the way i build the png file any ideas why it doesn't work that way ?
-
av_free crashes application randomly - FFMPEG C++
12 mai 2013, par SpamdarkI am trying to create a simple media-player for an introduction to the world of ffmpeg, the problem is that every time that I call
av_freep(void*ptr)
the application crashes.If I don't call
av_freep
I get a memory leak and the memory used by the program increases up to 1000MB (Already measured), here is the code :int16_t* audioBuffer=(int16_t*)av_malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE+FF_INPUT_BUFFER_PADDING_SIZE);
if(!audioBuffer){
MessageBox(0,"Error allocating in audioBuffer","Error: Mem",MB_ICONWARNING | MB_OK);
return -1;
}
int sz = MEDIA->DecodeAudioFrame((void*)audioBuffer,0);
Pa_WriteStream(MEDIA->output_stream,(int16_t*)audioBuffer,MEDIA->_audio_ccontext->frame_size);
av_freep(audioBuffer);Here is my 'DecodeAudioFrame' function code :
int WbMedia::DecodeAudioFrame(void *audio_buf, int buf_size){
static AVFrame frame;
static AVPacket pkt;
static uint8_t *audio_pkt_data = NULL;
static int audio_pkt_size = 0;
int len1=0;
for(;;){
bool do_rt = false;
while(audio_pkt_size > 0){
int obt_frame = 0;
len1 = avcodec_decode_audio4(_audio_ccontext,&frame,&obt_frame,&pkt);
if(len1 < 0){
audio_pkt_size = 0;
break;
}
audio_pkt_data+=len1;
audio_pkt_size-=len1;
if(obt_frame){
data_size = av_samples_get_buffer_size(frame.linesize,channel_count,sample_fr,_audio_ccontext->sample_fmt,1);
memcpy(audio_buf,frame.data[0],data_size);
}
if(data_size < 0){
continue;
}
if(pkt.data){
av_free_packet(&pkt);
}
return data_size;
}
if(pkt.data){
av_free_packet(&pkt);
}
if(do_rt){
return data_size;
}
// Try to get a new packet
if(!audio_packets.empty()){
WaitForSingleObject(Queue_Audio_Mutex,INFINITE);
pkt = audio_packets.front();
audio_packets.pop();
ReleaseMutex(Queue_Audio_Mutex);
audio_pkt_size = pkt.size;
audio_pkt_data = pkt.data;
}else{
return -1;
}
}
return 0;
}I need help with this issue, I don't know if it is a bug or what I need to do. What's happening there ? Why does it crashes on the
av_freep
call ? How can I fix it ?Thanks