
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (86)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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 -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (11652)
-
ffmpeg get RGB values ?
13 novembre 2012, par NavI've seen this, this and this but I still can't figure out how to get the RGB values from the tutorial code.
if(avcodec_open(pCodecCtx, pCodec)<0) {_getch();return -1;}
pFrame = avcodec_alloc_frame();
pFrameRGB=avcodec_alloc_frame();
if(pFrameRGB==NULL) {_getch();return -1;}
numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
// Assign appropriate parts of buffer to image planes in pFrameRGB
avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
i=0;
int framecounter=0;
while(av_read_frame(pFormatCtx, &packet)>=0)
{
if(packet.stream_index==videoStream)
{
// Decode video frame
//int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const AVPacket *avpkt);
avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
if(frameFinished)
{
// Convert the image from its native format to RGB
//img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24, (AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);
if(++i<=5) {SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height, i);}
}
}
av_free_packet(&packet);
}Since
img_convert
wasn't available, I took it from here but it threw an unhandled exception error. Why is the RGB format so tough to understand ? Why assign zero to G and B of RGB, as shown here ?How can I get my RGB values as a simple R, G and B which spans between 0 and 255 ? Also, I don't understand the use of
x
andy
, when video width and height are already given.y
is an increment of height, but what aboutx
?Can anyone please show me a complete working code of obtaining rgb values from a video or at least explain how
data
andlinesize
help in storing RGB info ? The lack of tutorials is appalling and the complexity of the API is surprising, after having worked on Processing videos. -
libavcodec decode AVFrames to FIFO buffer
6 novembre 2012, par user1175197My aim is to decode multiple frames of a video file, accumulate the decoded frames into a FIFO buffer and read them later on. I decode the packet to my AVFRame mFrame :
avcodec_decode_video2(mCodecContext,mFrame,&frameFinished,&mPacket) ;
Normally I can just copy the YUV frames from the mFrame->data[n][0] to my FIFO buffer but I am just trying to reduce the memcpy 's as much as possible. So instead of copying mFrame->data[n][0] I just want to store the mFrame (which is much smaller than the frames it points to) in the buffer and when it comes to reading I can just fetch it and reach the data.
I tried to do this but it did not work. The AVFrames are fetched from the buffer but when you show them on the screen the video is like frozen. You may think that I am using the same mFrame and overwriting it each time I decode a packet but I am not. I am creating a new AVFrame* each time in the decode loop.
Is this problem related to how avcodec works ? Any ideas ?
Thanks
mike -
How do I correctly convert .avi to .flv with ffmpeg ? [closed]
25 septembre 2012, par terbooterUPDATE
Shame on me )
I chacked red5 logs again and found that I placed converted files to wrong place.
Now all works fineI have two red5 apps.
-
Recorder. It can record live stream and save it to flv file to disk
private void startRecord(String uid, String name, IConnection connection) {
// Get a reference to the current broadcast stream.
ClientBroadcastStream stream = (ClientBroadcastStream) this.getBroadcastStream(
connection.getScope(), name);
try {
// Save the stream to disk.
String path = uid + "/" + name;
stream.saveAs(path, true);
System.out.println("file..:" + stream.getSaveFilename());
} catch (Exception e) {
System.out.println("Error while saving stream: " + name + e);
}
}
private void stopRecord(String name) {
IConnection conn = Red5.getConnectionLocal();
System.out.println("Stop recording show for: {}" + conn.getScope().getContextPath());
ClientBroadcastStream stream = (ClientBroadcastStream) this.getBroadcastStream(conn.getScope(), name);
// Stop recording.
if (stream != null) {
stream.stopRecording();
}
} -
Second red5 app (Chat) streams recorded flv file to flash client
public static String serverStreamCreate(String path, String streamName) {
IServerStream serverStream = StreamUtils.createServerStream(Red5.getConnectionLocal().getScope(), streamName);
SimplePlayItem item = SimplePlayItem.build(path);
IPlaylistController controller = new MyPlayListController();
serverStream.setPlaylistController(controller);
serverStream.setRepeat(false);
serverStream.addItem(item);
serverStream.addItem(item);
serverStream.start();
return streamName;
}
If I record stream from flash client to flv file with Recorder and after that stream this flv file back to client with Chat, all works fine.
Now I want to convert avi file to flv and stream it from red5 app to flash client.
I used ffmpegffmpeg -i 24.avi -ar 22050 -an -f flv -b 500k -s 320x240 -y 24_c.flv
But if I stream 24_c.flv from Chat app flash client have no video.
24_c.flv cant be playd by VLC player and have same code information as flv file created by Recorder red5 app.I really dont know where to dig.
-