
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (112)
-
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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
Sur d’autres sites (10067)
-
FFServer streaming H.264 from Logitech C920
23 octobre 2014, par Ricardo Frederico Leote MotaI’m having some trouble trying to implement a web live stream from my Logitech C920 webcam w/ H.264 encoding using ffmpeg/ffserver.
Here is the configuration file I’m using for the ffserver :
# Port on which the server is listening. You must select a different
# port from your standard HTTP web server if it is running on the same
# computer.
Port 8090
# Address on which the server is bound. Only useful if you have
# several network interfaces.
BindAddress 0.0.0.0
# Number of simultaneous HTTP connections that can be handled. It has
# to be defined *before* the MaxClients parameter, since it defines the
# MaxClients maximum limit.
MaxHTTPConnections 2000
# Number of simultaneous requests that can be handled. Since FFServer
# is very fast, it is more likely that you will want to leave this high
# and use MaxBandwidth, below.
MaxClients 1000
# This the maximum amount of kbit/sec that you are prepared to
# consume when streaming to clients.
MaxBandwidth 1000
# Access log file (uses standard Apache log file format)
# '-' is the standard output.
CustomLog -
##################################################################
# Definition of the live feeds. Each live feed contains one video
# and/or audio sequence coming from an ffmpeg encoder or another
# ffserver. This sequence may be encoded simultaneously with several
# codecs at several resolutions.
<feed>
# You must use 'ffmpeg' to send a live feed to ffserver. In this
# example, you can type:
#
File /tmp/feed.ffm
FileMaxSize 100M
# You could specify
# ReadOnlyFile /saved/specialvideo.ffm
# This marks the file as readonly and it will not be deleted or updated.
# Only allow connections from localhost to the feed.
ACL allow 127.0.0.1
</feed>
##################################################################
# Now you can define each stream which will be generated from the
# original audio and video stream. Each format has a filename (here
# 'test1.mpg'). FFServer will send this stream when answering a
# request containing this filename.
<stream>
Feed feed.ffm
Format mp4
# Audio settings
NoAudio
# Video Settings
#VideoSize 1280x720 # Video resolution
#VideoFrameRate 30 # Video FPS
#AVOptionVideo flags +global_header # Parameters passed to encoder
#AVOptionVideo cpu-used 0
#AVOptionVideo qmin 10
#AVOptionVideo qmax 42
#AVOptionVideo quality good
PreRoll 0
StartSendOnKey
#VideoBitRate 400 # Video bitrate
</stream>
# Server status
<stream>
Format status
# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</stream>
# Redirect index.html to the appropriate siteAnd here is the command I’m issuing through the command line and the respective output :
ffmpeg -s 1280x720 -f video4linux2 -r 30 -vcodec h264 -re -i /dev/video0 -copyinkf -codec copy h**p://localhost:8090/feed.ffm
ffmpeg version N-67036-g04a4fb8 Copyright (c) 2000-2014 the FFmpeg developers
built on Oct 20 2014 17:39:50 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --enable-gpl --enable-libx264
libavutil 54. 10.100 / 54. 10.100
libavcodec 56. 8.102 / 56. 8.102
libavformat 56. 9.101 / 56. 9.101
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 2.100 / 5. 2.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 12614.859199, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 60 tbc
Output #0, ffm, to 'h**p://localhost:8090/feed.ffm':
Metadata:
creation_time : now
encoder : Lavf56.9.101
Stream #0:0: Video: h264, yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, -5 kb/s, 30 fps, 1000k tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -166263; changing to 1. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 1, current: -134365; changing to 2. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 2, current: -102381; changing to 3. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 3, current: -66434; changing to 4. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 4, current: -34548; changing to 5. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 5, current: -2645; changing to 6. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232857, current: 138514; changing to 232858. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232858, current: 167942; changing to 232859. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232859, current: 197415; changing to 232860. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232860, current: 227037; changing to 232861. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 997959, current: 938599; changing to 997960. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 997960, current: 995052; changing to 997961. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 1240745, current: 1232841; changing to 1240746. This may result in incorrect timestamps in the output file.
[ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 1293561, current: 1282157; changing to 1293562. This may result in incorrect timestamps in the output file.
frame= 69 fps= 34 q=-1.0 Lsize= 912kB time=00:00:02.01 bitrate=3702.1kbits/sWhen I try to play the stream with VLC for example - vlc h**p ://localhost:8090/stream.mp4 - i get the following error :
[00007f5234003948] core stream error : cannot pre fill buffer
And I can’t watch the stream on the web browser side also.
Could someone give me an hint on this ?
Many thanks and your help is much appreciated ! ;)
-
ffmpeg error : parsed_overlay framesync - Buffer queue overflow, dropping
23 octobre 2014, par TomOn most video files my ffmpeg command works fine. but on some video files I get the following error code. something goes wrong with scaling and overlaying filters. but it depends on input files. I’m still searching for reasons and solutions. Maybe somebody knows more about it ?
[Parsed_overlay_1 @ *] [framesync @ *] Buffer queue overflow, dropping."
Input :
ffmpeg
-i "/var/www/vhosts/domain.com/httpdocs/video/temp/input.wmv"
-i "/var/www/vhosts/domain.com/httpdocs/images/logo_w140.png"
-filter_complex 'scale=trunc(oh*a/2)*2:320,overlay=main_w-overlay_w-10:main_h-overlay_h-10'
-ss 00:00:00 -t 00:00:44 -r 24 -b:v 360k -bt 416k -vcodec libx264
-preset veryslow -ar 11025 -y -acodec libfaac -ac 1 -ab 64k
/var/www/vhosts/domain.com/httpdocs/Protected/41000/output.mp4Output :
ffmpeg version 2.3.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 13 2014 16:39:32 with gcc 4.4.5 (Debian 4.4.5-8)
configuration: --enable-avfilter --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-libfaac --enable-nonfree --enable-filter=movie --enable-libx264 --enable-gpl --enable-version3 --enable-postproc --enable-libvorbis --enable-libx264 --enable-x11grab --prefix=/usr --enable-libgsm --enable-libdc1394
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
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
[wmv3 @ 0x2451bb0] Extra data: 8 bits left, value: 0
[mjpeg @ 0x2450c70] ignoring invalid SAR: 0/0
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, asf, from '/var/www/vhosts/domain.com/httpdocs/video/temp/input.wmv':
Metadata:
WMFSDKNeeded : 0.0.0.0000
DeviceConformanceTemplate: MP@LL
WMFSDKVersion : 12.0.7601.17514
IsVBR : 0
Duration: 00:00:43.99, start: 0.000000, bitrate: 1584 kb/s
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg), 320x240, 90k tbr, 90k tbn, 90k tbc
Metadata:
comment : Movie/video screen capture
Stream #0:1(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, 2 channels, fltp, 96 kb/s
Stream #0:2(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 320x240, 1500 kb/s, 30 fps, 30 tbr, 1k tbn, 1k tbc
Input #1, image2, from '/var/www/vhosts/domain.com/httpdocs/images/logo_w140.png':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #1:0: Video: png, rgba, 140x36, 25 tbr, 25 tbn, 25 tbc
[swscaler @ 0x2432d50] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x249c3b0] using cpu capabilities: none!
[libx264 @ 0x249c3b0] profile High, level 3.1
[libx264 @ 0x249c3b0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=abr mbtree=1 bitrate=360 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[wmv3 @ 0x245da80] Extra data: 8 bits left, value: 0
Output #0, mp4, to '/var/www/vhosts/domain.com/httpdocs/Protected/41000/b7fe950bc0ea5a3776c3893dc035a973.mp4':
Metadata:
WMFSDKNeeded : 0.0.0.0000
DeviceConformanceTemplate: MP@LL
WMFSDKVersion : 12.0.7601.17514
IsVBR : 0
encoder : Lavf55.48.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 426x320, q=-1--1, 360 kb/s, 24 fps, 12288 tbn, 24 tbc (default)
Metadata:
encoder : Lavc55.69.100 libx264
Stream #0:1(eng): Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 11025 Hz, mono, s16, 64 kb/s
Metadata:
encoder : Lavc55.69.100 libfaac
Stream mapping:
Stream #0:0 (mjpeg) -> scale (graph 0)
Stream #0:2 (wmv3) -> overlay:overlay (graph 0)
overlay (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (wmav2 (native) -> aac (libfaac))
Press [q] to stop, [?] for help
[mjpeg @ 0x2452690] ignoring invalid SAR: 0/0
[Parsed_overlay_1 @ 0x244d8c0] [framesync @ 0x244d988] Buffer queue overflow, dropping.
Last message repeated 161 times
frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:06.73 bitrate= 0.1kbits/s[Parsed_overlay_1 @ 0x244d8c0] [framesync @ 0x244d988] Buffer queue overflow, dropping.
Last message repeated 237 times
frame= 1 fps=1.0 q=0.0 size= 13kB time=00:00:14.44 bitrate= 7.3kbits/s[Parsed_overlay_1 @ 0x244d8c0] [framesync @ 0x244d988] Buffer queue overflow, dropping.
Last message repeated 238 times
frame= 1 fps=0.7 q=0.0 size= 34kB time=00:00:22.43 bitrate= 12.6kbits/s[Parsed_overlay_1 @ 0x244d8c0] [framesync @ 0x244d988] Buffer queue overflow, dropping.
Last message repeated 244 times
frame= 1 fps=0.5 q=0.0 size= 55kB time=00:00:30.23 bitrate= 14.9kbits/s[Parsed_overlay_1 @ 0x244d8c0] [framesync @ 0x244d988] Buffer queue overflow, dropping.
Last message repeated 241 times
frame= 1 fps=0.4 q=0.0 size= 76kB time=00:00:38.12 bitrate= 16.4kbits/s[Parsed_overlay_1 @ 0x244d8c0] [framesync @ 0x244d988] Buffer queue overflow, dropping.
Last message repeated 126 times
frame= 2 fps=0.7 q=-1.0 Lsize= 126kB time=00:00:44.00 bitrate= 23.4kbits/s dup=0 drop=64
video:3kB audio:118kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.045506%
[libx264 @ 0x249c3b0] frame I:1 Avg QP:30.19 size: 1778
[libx264 @ 0x249c3b0] frame P:1 Avg QP:34.00 size: 125
[libx264 @ 0x249c3b0] mb I I16..4: 54.1% 44.3% 1.7%
[libx264 @ 0x249c3b0] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 10.7% 0.4% 3.5% 0.0% 0.0% skip:85.4%
[libx264 @ 0x249c3b0] final ratefactor: 25.19
[libx264 @ 0x249c3b0] 8x8 transform intra:44.3% inter:100.0%
[libx264 @ 0x249c3b0] coded y,uvDC,uvAC intra: 20.9% 34.3% 0.2% inter: 0.0% 0.2% 0.0%
[libx264 @ 0x249c3b0] i16 v,h,dc,p: 34% 20% 14% 33%
[libx264 @ 0x249c3b0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 6% 15% 12% 15% 9% 13% 11% 10%
[libx264 @ 0x249c3b0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 8% 44% 14% 6% 4% 10% 5% 3% 5%
[libx264 @ 0x249c3b0] i8c dc,h,v,p: 48% 26% 21% 5%
[libx264 @ 0x249c3b0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x249c3b0] kb/s:182.69 -
Probe function in ffmpeg
14 octobre 2014, par eejsI am trying to write a demuxer for STL subtitle format(FFmpeg). I am having trouble understanding how the probe function is referenced in ffmpeg.
I have the following code for my probe :#include "avformat.h"
#include "internal.h"
#include "subtitles.h"
#include "libavutil/intreadwrite.h"
typedef struct {
FFDemuxSubtitlesQueue q;
} STLContext;
static int stl_probe(AVProbeData *p)
{
char c;
const unsigned char *ptr = p->buf;
av_log(0,100,"printing the probe function");
while(*ptr=='\r' || *ptr=='\n' || *ptr=='$' || (ptr[0]=='/' && ptr[1]=='/'))
ptr+=ff_subtitles_next_line(ptr);
if (sscanf(ptr, "%*d:%*d:%*d:%*d , %*d:%*d:%*d:%*d , %c", &c) == 1)
return AVPROBE_SCORE_MAX;
return 0;
}
static int64_t get_pts(char **buf, int *duration)
{
int hh1, mm1, ss1, ms1;
int hh2, mm2, ss2, ms2;
int len=0;
if (sscanf(*buf, "%2d:%2d:%2d:%2d , %2d:%2d:%2d:%2d , %n",
&hh1, &mm1, &ss1, &ms1,
&hh2, &mm2, &ss2, &ms2, &len) >= 8 && len>0) {
int64_t start = (hh1*3600LL + mm1*60LL + ss1) * 100LL + ms1;
int64_t end = (hh2*3600LL + mm2*60LL + ss2) * 100LL + ms2;
*duration = end - start;
*buf+=len;
return start;
}
return AV_NOPTS_VALUE;
}
static int stl_read_header(AVFormatContext *s)
{
STLContext *stl = s->priv_data;
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
avpriv_set_pts_info(st, 64, 1, 100);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_id = AV_CODEC_ID_TEXT;
while (!avio_feof(s->pb)) {
char line[4096];
char *p = line;
const int64_t pos = avio_tell(s->pb);
int len = ff_get_line(s->pb, line, sizeof(line));
int64_t pts_start;
int duration;
if (!len)
break;
line[strcspn(line, "\r\n")] = 0;
pts_start = get_pts(&p , &duration);
if (pts_start != AV_NOPTS_VALUE) {
AVPacket *sub;
sub = ff_subtitles_queue_insert(&stl->q, p, strlen(p), 0);
if (!sub)
return AVERROR(ENOMEM);
sub->pos = pos;
sub->pts = pts_start;
sub->duration = duration;
}
}
ff_subtitles_queue_finalize(&stl->q);
return 0;
}
static int stl_read_packet(AVFormatContext *s, AVPacket *pkt)
{
STLContext *stl = s->priv_data;
return ff_subtitles_queue_read_packet(&stl->q, pkt);
}
static int stl_read_seek(AVFormatContext *s, int stream_index,
int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
{
STLContext *stl = s->priv_data;
return ff_subtitles_queue_seek(&stl->q, s, stream_index,
min_ts, ts, max_ts, flags);
}
static int stl_read_close(AVFormatContext *s)
{
STLContext *stl = s->priv_data;
ff_subtitles_queue_clean(&stl->q);
return 0;
}
AVInputFormat ff_stl_demuxer = {
.name = "stl",
.long_name = NULL_IF_CONFIG_SMALL("STL subtitles"),
.priv_data_size = sizeof(STLContext),
.read_probe = stl_probe,
.read_header = stl_read_header,
.read_packet = stl_read_packet,
.read_seek2 = stl_read_seek,
.read_close = stl_read_close,
.extensions = "stl",
};Output of
./ffmpeg -f stl -i Test.stl Test.srt
ffmpeg version N-66838-g9071bab Copyright (c) 2000-2014 the FFmpeg developers
built on Oct 14 2014 12:28:54 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration:
libavutil 54. 10.100 / 54. 10.100
libavcodec 56. 4.101 / 56. 4.101
libavformat 56. 9.100 / 56. 9.100
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 1.105 / 5. 1.105
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
Input #0, stl, from '/home/eejya/SubtitleTesting/UK_FINAL_240511.stl':
Duration: N/A, bitrate: N/A
Stream #0:0: Subtitle: text
Output #0, srt, to '/home/eejya/SubtitleTesting/UkTest.srt':
Metadata:
encoder : Lavf56.9.100
Stream #0:0: Subtitle: subrip (srt)
Metadata:
encoder : Lavc56.4.101 srt
Stream mapping:
Stream #0:0 -> #0:0 (text (native) -> subrip (srt))
Press [q] to stop, [?] for help
size= 10kB time=00:27:10.06 bitrate= 0.0kbits/s
video:0kB audio:0kB subtitle:4kB other streams:0kB global headers:0kB muxing overhead: 121.594238%when I run the command
./ffmpeg -i Test.stl Test.srt
I don’t see any output printed by av_log and it says that the probe score is very less which may lead to mis-detection. That would mean only the extension is being checked.So, either my probe function is not being called or the buffer isn’t being read.
How do I check whether my probe function is being called or not ?
Also does the low score warning imply that the function is being called ?