
Recherche avancée
Médias (1)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (60)
-
Activation de l’inscription des visiteurs
12 avril 2011, parIl est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...) -
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 (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (12241)
-
Revision 6498516bb6 : Change eob[] array type in splitmv RD loop to a regular integer. Change-Id : I24
23 octobre 2012, par Ronald S. BultjeChanged Paths : Modify /vp8/encoder/rdopt.c Change eob[] array type in splitmv RD loop to a regular integer. Change-Id : I240d6b50069fd3f35cc4fed2f4507796f0ef25e9
-
Python : Strange hanging behavior when piping large stdout of a subprocess
7 septembre 2017, par Victor OdouardI am currently calling
ffmpeg
to extract a binary data stream from a video file, and then putting that binary data into a list. There is a lot of data in this data stream, about 4,000 kb. Here is the code# write and call ffmpeg command, piping stdout
cmd = "ffmpeg -i video.mpg -map 0:1 -c copy -f data -"
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
# read from stdout, byte by byte
li = []
for char in iter(lambda: proc.stdout.read(1), ""):
li.append(char)This works fine. However, if I take out the part where I am reading from
stdout
, it starts working but then hangs :cmd = "ffmpeg -i video.mpg -map 0:1 -c copy -f data -"
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
time.sleep(10)I had to add
time.sleep(10)
at the end or else the process would end before thesubprocess
, causing this error :av_interleaved_write_frame(): Invalid argument
Error writing trailer of pipe:: Invalid argument
size= 0kB time=00:00:00.00 bitrate=N/A speed=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing ove
rhead: 0.000000%
Conversion failed!Calling either
subprocess.call(cmd, stdout=subprocess.PIPE)
orsubprocess.call(cmd)
also cause hanging (the latter just displays thestdout
in the console while the former doesn’t).Is there something about reading from
stdout
that prevents this hanging (like perhaps the buffer getting cleared), or am I unknowingly introducing a bug elsewhere ? I’m worried that such a small change causes the program to break ; it doesn’t inspire very much confidence.The other issue with this code is that I need to read from the list from another thread. This might mean I need to use a
Queue
. But when I execute the below code, it takes 11 seconds as opposed to 3 seconds with the list equivalent :cmd = "ffmpeg -i video.mpg -loglevel panic -hide_banner -map 0:1 -c copy -f data -"
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
q = Queue()
for char in iter(lambda: proc.stdout.read(1), ""):
q.put(char)Should I be using another data structure ?
-
avcodec_encode_video returns 0 as output size
11 juin 2014, par vacetahannaHello what I am doing wrong ? When I try to encode a Frame, the out_size is 0. and if I use the avcodec_encode_video2 the return value is 0, which indicates, that everything went good, but the avpkt.size is 0 after that. What am I missing or doing wrong ? thank you so much here is my code
int EncodeVideoFFMPEG::enc_main( void *istream, void *outstream, int width, int height )
{
avcodec_register_all();
//choose codec
AVCodec *codec = avcodec_find_encoder(CODEC_ID_H264);
//set parameters
AVCodecContext *c = avcodec_alloc_context3(codec);
c->codec_type = AVMEDIA_TYPE_VIDEO;
c->bit_rate = 50000;
c->pix_fmt = PIX_FMT_YUV420P;
c->width = width;
c->height = height;
c->time_base.num = 1;
c->time_base.den = 25;
c->gop_size = 20;
c->max_b_frames = 0;
//open
avcodec_open2(c, codec, NULL);
int got_packet;
int BYTEPIC = width * height * 3;
//prepare for changing color space
struct SwsContext *img_convert_ctx1 =
sws_getContext(width, height, PIX_FMT_BGR24,
width, height, PIX_FMT_YUV420P,
SWS_BICUBIC, NULL, NULL, NULL);
//allocateframesforcolorspacechange
AVFrame *pictureBGR = alloc_pictureBGR24(width, height);
AVFrame *picture = alloc_picture420P(width, height);
//get frame from OGRE and let pictureBGR point to it
unsigned char *image = new unsigned char[BYTEPIC];
memcpy(image, istream, BYTEPIC);
//change from BGR to 420P
sws_scale(img_convert_ctx1, &image, pictureBGR->linesize, 0, height, picture->data, picture->linesize);
delete image;
AVPacket avpkt;
av_new_packet( &avpkt, BYTEPIC );
//encode withthe codec
int out_size = avcodec_encode_video(c, avpkt.data, avpkt.size, picture);
//int success = avcodec_encode_video2(c, &avpkt, picture, &got_packet);
outstream = avpkt.data;
return out_size;
}