
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (102)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)
Sur d’autres sites (8016)
-
FFMPEG HLS stream for Android and IOS
26 février 2015, par PodaI’m trying to stream to mobile devices with ffmpeg and apache2.2 but I haven’t been successful.
I used this command to create the segments and the playlist :
ffmpeg -i http://x.x.x.x:8080 -codec:v libx264 -r 25 -pix_fmt yuv420p -profile:v baseline -level 3 -b:v 500k -s 640x480 -codec:a aac -strict experimental -ac 2 -b:a 128k -movflags faststart -flags -global_header -map 0 -f hls -hls_time 10 -hls_list_size 5 -hls_allow_cache 0 -sc_threshold 0 -hls_flags delete_segments -hls_segment_filename out%05d.ts list.m3u8
The source is a http stream which is streamed by VLC media player.
Example content of the list.m3u8 file :
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:89
#EXTINF:10.000000,
out00089.ts
#EXTINF:10.000000,
out00090.ts
#EXTINF:10.000000,
out00091.ts
#EXTINF:10.000000,
out00092.ts
#EXTINF:9.000000,
out00093.ts
#EXT-X-ENDLISTI created another playlist file - playlist.m3u8 :
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=512000
http://x.x.x.x/list.m3u8If I open this (playlist.m3u8) file in VLC media player then it plays.
It also works in desktop chrome and desktop firefox browsers with Video-js plugin flash fallback.I set the correct MIME types to the .ts and .m3u8 files in .htaccess file :
AddType application/x-mpegURL .m3u8
AddType video/MP2T .tsFFprobe output for playlist.m3u8 :
Input #0, hls,applehttp, from 'playlist.m3u8':
Duration: N/A, start: 1.400000, bitrate: N/A
Program 0
Metadata: variant_bitrate : 512000
Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
Metadata: variant_bitrate : 512000
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 128 kb/s
Metadata: variant_bitrate : 512000What should I do to make it work ?
UPDATE
It works if I provide a link to list.m3u8 file (created by ffmpeg).
-
mp4 video file generated using ffmpeg, play on desktop but doesn't play on device
9 mai 2014, par NikeshI am generating a video that converts images into .mp4 video file. Every thing works fine. File is also generated as mp4 but the file doesn’t run on android device, says cannot play video.
Please find the attached sample code which convert single jpeg file into video (.mp4)
Please help me to resolve this issue. Thanks.
JNIEXPORT void JNICALL Java_roman10_ffmpegtst_VideoBrowser_videoExample(JNIEnv *pEnv, jobject pObj, char* imagefile,char* videoFile)
{
avcodec_init();
av_register_all();
avcodec_register_all();
AVCodecContext *pOCtx= NULL;
AVCodec *pOCodex = NULL;
LOGE(10,"Start videoExample");
pOCodex = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);
if (!pOCodex) {
LOGE(10,"Cannot find encoder %s", pOCodex);
exit(1);
}
pOCtx= avcodec_alloc_context3(pOCodex);
uint8_t *outbuf;
int i, out_size;
pOCtx->bit_rate = 400000;
pOCtx->width = 640;
pOCtx->height = 480;
AVRational rational = {1,25};
pOCtx->time_base= rational;
pOCtx->gop_size = 10; /* emit one intra frame every ten frames */
pOCtx->max_b_frames=1;
pOCtx->pix_fmt = AV_PIX_FMT_YUV420P;
LOGE(10,"Start avcodec_open2");
int ret = avcodec_open2(pOCtx,pOCodex,NULL);
if(ret < 0)
{
return;
}
LOGE(10,"End avcodec_open2");
AVFormatContext *pIFormatCtx = NULL;
ret = avformat_open_input(&pIFormatCtx, imagefile, NULL, NULL);
if(ret < 0)
{
//Cant't open jpg file
return;
}
av_dump_format(pIFormatCtx, 0, imagefile, 0);
AVCodecContext *pICodecCtx; //output codec context
pICodecCtx = pIFormatCtx->streams[0]->codec;
/*pICodecCtx->width = 640;
pICodecCtx->height = 480;
pICodecCtx->pix_fmt = PIX_FMT_YUV420P;*/
AVCodec *pICodec = avcodec_find_decoder(pICodecCtx->codec_id); //output codec
// Open codec
ret = avcodec_open2(pICodecCtx, pICodec,NULL);
if(ret < 0)
{
//Can't find the decoder
return;
}
AVFrame *pIFrame = avcodec_alloc_frame();
if (!pIFrame)
{
//Can't alloc the input frame
return ;
}
int bufSize = avpicture_get_size(AV_PIX_FMT_YUVJ420P, pICodecCtx->width, pICodecCtx->height);
uint8_t *buffer = (uint8_t *) av_malloc(bufSize * sizeof(uint8_t));
avpicture_fill((AVPicture *) pIFrame, buffer, AV_PIX_FMT_YUVJ420P, pICodecCtx->width, pICodecCtx->height);
FILE *outputFile;
outputFile = fopen(videoFile, "w+");
if (!outputFile) {
LOGE(10,"could not open ");
exit(1);
}
int outbuf_size = 100000;
outbuf = (uint8_t*)malloc(outbuf_size);
AVPacket packet;
int frameFinished;
int framesNumber = 0;
while (av_read_frame(pIFormatCtx, &packet) >= 0)
{
if(packet.stream_index != 0)
continue;
ret = avcodec_decode_video2(pICodecCtx, pIFrame, &frameFinished, &packet);
if (ret > 0)
{
pIFrame->quality = 4;
for(i=0;i<25;i++) {
fflush(stdout);
/* encode the image */
out_size = avcodec_encode_video(pOCtx, outbuf, outbuf_size, pIFrame);
fwrite(outbuf, 1, out_size, outputFile);
}
}
}
/* get the delayed frames */
for(; out_size; i++) {
fflush(stdout);
out_size = avcodec_encode_video(pOCtx, outbuf, outbuf_size, NULL);
fwrite(outbuf, 1, out_size, outputFile);
}
/* add sequence end code to have a real mpeg file */
outbuf[0] = 0x00;
outbuf[1] = 0x00;
outbuf[2] = 0x01;
outbuf[3] = 0xb7;
fwrite(outbuf, 1, 4, outputFile);
fclose(outputFile);
free(outbuf);
avcodec_close(pOCtx);
av_free(pOCtx);
av_free(pIFrame);
} -
Android HLS plays first segment then only audio
1er décembre 2014, par Chris RecalisI’m having difficulty playing HLS on Android where only the audio is playing. The stream will play for the first video segment and then turn into an audio only stream. Here is a sample link https://clipter.com/c/aymels8/hls.m3u8
hls.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:9
#EXT-X-ALLOW-CACHE:YES
#EXTINF:8.5,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/2103cb31c3078eb5edd5c325108f6d6f.ts?1416176849
#EXTINF:7.33,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/1214ef63a031e3d3229893fdb60eea86.ts?1416176848
#EXTINF:8.5,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/99c47c49548521b0fff05119a5c63908.ts?1416176889
#EXTINF:8.43,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/143acefc2149f2572ddcc08abb705736.ts?1416176988
#EXTINF:4.43,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/11c92b5084971e0cf4768f958e97f936.ts?1416177431
#EXTINF:6.9,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/10ab810169fb684469f736a53f2cba3a.ts?1416177545
#EXTINF:8.57,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/88b037af27757e4805d7f1ed0496cbb8.ts?1416178434
#EXTINF:2.1,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/4a8cda13ea40228de4638dee9985b8b0.ts?1416178513
#EXTINF:8.47,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/e6fa0135987c86d323f1e994bcd2b429.ts?1416179772
#EXTINF:8.38,
https://d3ilpkc014v0xn.cloudfront.net/f5305de24/9a08aba19b45601c83854216bb07a6b6.ts?1416604373
#EXT-X-ENDLISToutput from ffprobe
ffprobe version 2.3.3 Copyright (c) 2007-2014 the FFmpeg developers
built on Aug 25 2014 19:47:15 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.100 / 55. 48.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.100 / 4. 11.100
libavresample 1. 3. 0 / 1. 3. 0
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mpegts, from '2103cb31c3078eb5edd5c325108f6d6f.ts?1416176849':
Duration: 00:00:08.53, start: 1.400000, bitrate: 1236 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 480x480, 30 fps, 30 tbr, 90k tbn, 60 tbc
Stream #0:1[0x101](und): Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, mono, fltp, 67 kb/s