
Recherche avancée
Médias (29)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#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
Autres articles (30)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (3044)
-
FFmpeg : undefined references to av_frame_alloc()
6 août 2014, par dontrythisathomeI want to get into FFmpeg developing and i started following these samples tutorial here : here
I started with the first tutorial - tutorial01.c - but i run into this problem ’undefined references to av_frame_alloc()’.
I’m on Ubuntu 12.04 LTS.
This is my program :
/*
* File: main.c
* Author: dontrythisathome
*
* Created on 3 giugno 2014, 23.02
*/
#include
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>frame.h>
#include <libswscale></libswscale>swscale.h>
/*
*
*/
void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame)
{
FILE *pFile;
char szFilename[32];
int y;
//Apre il file
sprintf(szFilename, "frame%d.ppm", iFrame);
pFile=fopen(szFilename, "wb");
if(pFile==NULL)
{return; }
//Scrive l'intestazione del file ( Larghezza x Altezza su video)
fprintf(pFile, "P6\n%d %d\n255\n", width, height);
//Scrive i data pixel
for(y=0; ydata[0]+y*pFrame->linesize[0], 1, width*3, pFile);
}
//Chiude il file
fclose(pFile);
}
/*
*
*/
/*Main Function*/
int main(int argc, char *argv[])
{
AVFormatContext *pFormatCtx;
int i, videoStreamIdx;
AVCodecContext *pCodecCtx;
AVCodec *pCodec;
AVFrame *pFrame;
AVFrame *pFrameRGB;
AVPacket packet;
int frameFinished;
int numBytes;
uint8_t *buffer;
static struct SwsContext *img_convert_ctx;
if(argc < 2){
printf("Inserisci un file video\n");
return -1;
}
//Registra tutti i formati e i codec
av_register_all();
//Apre il file video
if(avformat_open_input(&pFormatCtx, argv[1], NULL, NULL) != 0)
{return -1;} //Impossibile aprire il file
//Recupera le informazioni dello stream
if(avformat_find_stream_info(pFormatCtx, NULL) < 0)
{return -1;} // Couldn't find stream information
//Versa le informazioni del file sullo standard error
av_dump_format(pFormatCtx, 0, argv[1], 0);
//Trova il primo stream video
videoStreamIdx=-1;
for(i=0; inb_streams; i++)
{
if(pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
{ videoStreamIdx=i;
break;}
}
if(videoStreamIdx==-1)
return -1; // Impossibile trovare lo stream video
// Punta al contenuto del codec per lo stream video
pCodecCtx = pFormatCtx->streams[videoStreamIdx]->codec;
// Trova il decoder per lo stream video
pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
if(pCodec==NULL)
{
fprintf(stderr, "Codec Non Supportato!\n");
return -1; //Impossibile trovare il codec
}
//Apre il codec
if(avcodec_open2(pCodecCtx, pCodec, NULL) < 0)
{return -1;} //Impossibile aprire il codec
//Alloca il frame video
pFrame = av_frame_alloc();
//Alloca una struct AVFrame
pFrameRGB = av_frame_alloc();
if(pFrameRGB==NULL)
{return -1;}
//Determina la grandezza necessaria per il buffer e lo alloca
numBytes = avpicture_get_size(PIX_FMT_RGB24,
pCodecCtx->width,
pCodecCtx->height);
buffer = (uint8_t *) av_malloc(numBytes*sizeof(uint8_t));
//Assegna le parti appropriate del buffer sulla superficie dell'immagine in pFrameRGB
//Tenere presente che pFrameRGB è un AVFrame, ma AVFrame è una superset di AVPicture
avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
int w = pCodecCtx->width;
int h = pCodecCtx->height;
img_convert_ctx = sws_getContext(w, h, pCodecCtx->pix_fmt,
w, h, PIX_FMT_RGB24,
SWS_LANCZOS, NULL, NULL, NULL);
//Legge i frame e salva i primi 5 frame su disco
i=0;
while((av_read_frame(pFormatCtx, &packet)>=0) && (i<5))
{
//Questo è il packet dello stream video?
if(packet.stream_index==videoStreamIdx)
{
//Decodifica il frame video
avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
//Si è riusiciti ad ottenere il frame video?
if(frameFinished)
{
i++;
sws_scale(img_convert_ctx, (const uint8_t * const *)pFrame->data,
pFrame->linesize, 0, pCodecCtx->height,
pFrameRGB->data, pFrameRGB->linesize);
SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height, i);
}
}
//Libera il pacchetto che era allocato da av_read_frame
av_free_packet(&packet);
}
//Libera l'immagine RGB
av_free(buffer);
av_free(pFrameRGB);
//Libera il frame YUV
av_free(pFrame);
//Chiude il codec
avcodec_close(pCodecCtx);
//Chiude il file video
avformat_close_input(&pFormatCtx);
/*FINE PROGRAMMA*/
return 0;
}This is the build output :
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: ingresso nella directory "/home/dontrythisathome/Programmazione/C-C++/SimpleMediaPlayerForAndroid"
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/simplemediaplayerforandroid
make[2]: ingresso nella directory "/home/dontrythisathome/Programmazione/C-C++/SimpleMediaPlayerForAndroid"
mkdir -p dist/Debug/GNU-Linux-x86
gcc -o dist/Debug/GNU-Linux-x86/simplemediaplayerforandroid build/Debug/GNU-Linux-x86/main.o -L/usr/lib/x86_64-linux-gnu -lavformat -lavcodec -lavutil -lswscale -lz -lbz2
build/Debug/GNU-Linux-x86/main.o: In function `main':
/home/dontrythisathome/Programmazione/C-C++/SimpleMediaPlayerForAndroid/main.c:105: undefined reference to `av_frame_alloc'
/home/dontrythisathome/Programmazione/C-C++/SimpleMediaPlayerForAndroid/main.c:108: undefined reference to `av_frame_alloc'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/simplemediaplayerforandroid] Errore 1
make[2]: uscita dalla directory "/home/dontrythisathome/Programmazione/C-C++/SimpleMediaPlayerForAndroid"
make[1]: *** [.build-conf] Errore 2
make[1]: uscita dalla directory "/home/dontrythisathome/Programmazione/C-C++/SimpleMediaPlayerForAndroid"
make: *** [.build-impl] Errore 2
BUILD FAILED (exit value 2, total time: 143ms)I also linked the correct library path and headers path because there is no error with that.
But when i try to build the program from the terminal with these commands :
gcc -o prog1 /home/dontrythisathome/Programmazione/C-C++/SimpleMediaPlayerForAndroid/main.c -lavformat -lavcodec -lavutil -lswscale -lz -lbz2
And the output is different :
/home/dontrythisathome/Programmazione/C-C++/SimpleMediaPlayerForAndroid/main.c:11:29: fatal error: libavutil/frame.h: File o directory non esistente
compilation terminated.The output says that there is no file or directory existing.
What is the problem ? -
huffyuvdec : implement trick for BGR
3 juin 2014, par Christophe Gisquet -
avconv stops streaming after some time
4 juin 2014, par Dhrumil DoshiI am using raspberry-pi board and a usb camera attached with it. i use avconv tool to capture live video from camera and streaming it on network using rtp protocol.
My command on server(raspberry-pi board) is as below :
avconv -f video4linux2 -s 160x120 -i /dev/video0 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp ://192.168.1.141:8554
streaming works successfully using this command. Here IP address 192.168.1.141 is the ip address of my client pc. i can play live streaming on client side using vlc successfully.
But Issue is after some time encoding and streaming on server stop automatically. And command hangs there.
Output on server is as below :
$ avconv -f video4linux2 -s 160x120 -v debug -i /dev/video0 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.1.141:8554
avconv version 0.8.10-6:0.8.10-1+rpi1, Copyright (c) 2000-2013 the Libav developers
built on Mar 22 2014 02:13:15 with gcc 4.6.3
configuration: --arch=arm --enable-pthreads --enable-runtime-cpudetect --extra-version='6:0.8.10-1+rpi1' --libdir=/usr/lib/arm-linux-gnueabihf --prefix=/usr --disable-yasm --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-swscale --enable-libcdio --enable-x11grab --enable-libx264 --enable-libxvid --shlibdir=/usr/lib/arm-linux-gnueabihf --enable-shared --disable-static
libavutil 51. 22. 2 / 51. 22. 2
libavcodec 53. 35. 0 / 53. 35. 0
libavformat 53. 21. 1 / 53. 21. 1
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 52. 0. 0 / 52. 0. 0
[video4linux2 @ 0x54d7a0] [4]Capabilities: 84000001
[video4linux2 @ 0x54d7a0] The V4L2 driver changed the pixel format from 0x32315559 to 0x56595559
Last message repeated 1 times
[video4linux2 @ 0x54d7a0] The V4L2 driver changed the pixel format from 0x50323234 to 0x56595559
[video4linux2 @ 0x54d7a0] The V4L2 driver set input_id: 0, input: Camera 1
[rawvideo @ 0x54f860] err{or,}_recognition separate: 1; 1
[rawvideo @ 0x54f860] err{or,}_recognition combined: 1; 1
[video4linux2 @ 0x54d7a0] All info found
[video4linux2 @ 0x54d7a0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2, from '/dev/video0':
Duration: N/A, start: 21891.364784, bitrate: 9216 kb/s
Stream #0.0, 1, 1/1000000: Video: rawvideo, yuyv422, 160x120, 1/30, 9216 kb/s, 30 tbr, 1000k tbn, 30 tbc
[buffer @ 0x54f220] w:160 h:120 pixfmt:yuyv422
[avsink @ 0x54d740] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x54f7e0] w:160 h:120 fmt:yuyv422 -> w:160 h:120 fmt:yuv420p flags:0x4
[mpeg2video @ 0x54ea60] err{or,}_recognition separate: 1; 1
[mpeg2video @ 0x54ea60] err{or,}_recognition combined: 1; 1
[mpeg2video @ 0x54ea60] detected 1 logical cores
[mpeg2video @ 0x54ea60] Unsupported bit depth: 0
[rawvideo @ 0x54f860] err{or,}_recognition separate: 1; 1
[rawvideo @ 0x54f860] err{or,}_recognition combined: 1; 1
Output #0, rtp, to 'rtp://192.168.1.141:8554':
Metadata:
encoder : Lavf53.21.1
Stream #0.0, 0, 1/90000: Video: mpeg2video, yuv420p, 160x120, 1/25, q=2-31, 2600 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.1.141
t=0 0
a=tool:libavformat 53.21.1
m=video 8554 RTP/AVP 32
b=AS:2600
Press ctrl-c to stop encoding
*** drop!
Last message repeated 1 times
*** 1 dup!
*** 16 dup! fps= 25 q=2.0 size= 1027kB time=5.24 bitrate=1605.2kbits/s dup=1 drop=2
*** drop!
Last message repeated 11 times
*** drop!49 fps= 26 q=2.0 size= 1059kB time=5.92 bitrate=1464.9kbits/s dup=17 drop=14
Last message repeated 2 times
*** drop!76 fps= 25 q=2.0 size= 2022kB time=11.00 bitrate=1505.7kbits/s dup=17 drop=17
*** drop!48 fps= 25 q=2.0 size= 4086kB time=21.88 bitrate=1529.8kbits/s dup=17 drop=18
*** 1 dup!
*** 1 dup!0 fps= 25 q=2.0 size= 4171kB time=22.36 bitrate=1528.2kbits/s dup=18 drop=19
*** 1 dup!1 fps= 25 q=2.0 size= 4859kB time=26.00 bitrate=1530.8kbits/s dup=19 drop=19
*** 1 dup!0 fps= 25 q=2.0 size= 5152kB time=27.56 bitrate=1531.5kbits/s dup=20 drop=19
*** 1 dup!3 fps= 25 q=2.0 size= 5250kB time=28.08 bitrate=1531.7kbits/s dup=21 drop=19
*** drop!64 fps= 25 q=2.0 size= 7215kB time=38.52 bitrate=1534.5kbits/s dup=22 drop=19
*** 1 dup!6 fps= 25 q=2.0 size= 7306kB time=39.00 bitrate=1534.6kbits/s dup=22 drop=20
*** drop!07 fps= 25 q=2.0 size= 8288kB time=44.24 bitrate=1534.7kbits/s dup=23 drop=20
*** 1 dup!0 fps= 25 q=2.0 size= 10054kB time=53.56 bitrate=1537.8kbits/s dup=23 drop=21
*** 1 dup!9 fps= 25 q=2.0 size= 10342kB time=55.12 bitrate=1537.1kbits/s dup=24 drop=21
Last message repeated 1 times
*** drop!93 fps= 25 q=1.6 size= 10445kB time=55.68 bitrate=1536.7kbits/s dup=26 drop=21
*** 1 dup!
*** 7036829 dup! 25 q=2.0 size= 10630kB time=56.68 bitrate=1536.4kbits/s dup=27 drop=22Any ideas ?
Thanks in advance.