
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (76)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)
Sur d’autres sites (10462)
-
Build Opencv3.1 with ffmpeg
10 mai 2018, par batumanI tried to build Opencv3.1 at Ubuntu16.04 with ffmpeg.
I follow the instructions how to install ffmpeg at here.According to this discussion ,I checked.
>> mediainfo ~/Desktop/grb_2.mp4
General
Complete name : /home/nyan/Desktop/grb_2.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 445 KiB
Duration : 27s 862ms
Overall bit rate : 131 Kbps
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
Writing application : Lavf57.66.105
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 27s 862ms
Bit rate : 128 Kbps
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Original display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.012
Stream size : 435 KiB (98%)
Writing library : x264 core 148
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 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=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
ffmpeg -codecs | grep -i avc
ffmpeg version N-90982-gb995ec0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --prefix=/home/nyan/ffmpeg_build --enable-shared --extra-cflags=-I/home/nyan/ffmpeg_build/include --extra-ldflags=-L/home/nyan/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/nyan/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 56. 18.100 / 56. 18.100
libavcodec 58. 19.100 / 58. 19.100
libavformat 58. 13.101 / 58. 13.101
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 21.100 / 7. 21.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_v4l2m2m h264_vaapi )
D.A.L. avc On2 Audio for Video Codec (decoders: on2avc )So my ffmpeg installation is ok.
When I cmake to my Opencv, I have set up to ffmpeg as
But when I make to compile, I have error as
make[2]: *** No rule to make target '/home/nyan/ffmpeg_build/lib/libavresample.a', needed by 'lib/libopencv_videoio.so.3.1.0'. Stop.
CMakeFiles/Makefile2:8709: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2How can I fix the problem ?
I install libavresample manually and
sudo apt-get install libavresample-dev
[sudo] password for nyan:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libavresample-dev is already the newest version (7:2.8.14-0ubuntu0.16.04.1).It is newest version.
EDIT:
Actually libavresample at ffmpeg is deprecated already.
So I tried to install Opencv3.4.1 higher version.
Compile, build and installation are fine.
ButVideoCapture cap(0);
does not read from the device.
So I checked ffmpeg at Opencv3.4.1 installation aspython -c "import cv2; print(cv2.getBuildInformation())" | grep -i ffmpeg
FFMMPEG IS NO. So build with ffmpeg is not successful even though there was no error at build for Opencv3.4.1.
-
FFmpeg decoding subtitle (delphi) decoding resutl > 0 but values are zero/null
27 janvier 2020, par cobanwhile True do begin
if vst.sub_q.size = 0
then Continue;
ret := mpl.packet_queue_get(vst.sub_q, pkt, 0);
if(pkt.data = mpl.flush_pkt.data) then
begin
avcodec_flush_buffers(vst.sub_st.codec);
continue;
end;
ret := avcodec_decode_subtitle2(vst.sub_codec_ctx, @subt, @got_sub, @pkt);
if ret >= 0
then begin
if got_sub = 1
then begin
for i := 0 to subt.num_rects-1
do begin
s := subt.rects[i].text;
if (subt.rects[i].text <> '') or
(subt.rects[i].ass <> '')
then raise Exception.Create(s);
end;
end;
end;
av_packet_unref(pkt);
end;I’m trying to build a video player using ffmpeg + sdl2 with Delphi. I found an example for this which did play video without problems but had problems with audio. Audio is solved by inspecting the ffplay example in c/c++ and translating the audio part to Delphi. I tried to translate complete ffplay but I had strange behavior on video part, it starts playing but after a few seconds audio is going on without problems, while video is getting green screen.
Something is not going well while calling "decoder_decode_frame" function or "video_refresh" in case of video shomehow ?
However, I am, so far, able to decode/play audio and video streams synchronized. At the moment picture/video quality can be better, but this is for later.The problem :
I am using the code above to decode the subtitle stream.
initializing and opening the codec is succeeds "avcodec_open2", queueing packets is succeeds, retrieving packet succeeds at the right moment when it should be displayed."avcodec_decode_subtitle2" function succeeds, result is > 0, got_frame variable is assigned "1", avsubtitle(subt) is being assigned.
I do not get any errors or warnings everyting seems to be correct except the value of avsubtitle.subt format is 1 this seems to be the problem, inspecting ffplay.c
subt start_display_time is 0
subt end_display_time is 0
subt num_rects is 1rects ppAVSubtitleRect is assigned with values zero/nil
rects type_ is subtitle_nonePlaying a *.mkv file, subtitle information from codec is
codec name ’srt’
codec long_name ’SubRip subtitle’
If this type of subtitle is not supported, why can we decode it without any warnings or errors ?
If it is possible to get the subtitle text, how can I achieve this ?AVSubtitle = record
format: uint16_t; (* 0 = graphics *)
start_display_time: uint32_t; (* relative to packet pts, in ms *)
end_display_time: uint32_t; (* relative to packet pts, in ms *)
num_rects: unsigned;
rects: ppAVSubtitleRect;
pts: int64_t; // < Same as packet pts, in AV_TIME_BASE
end;
AVSubtitleType = ( //
SUBTITLE_NONE, SUBTITLE_BITMAP, // < A bitmap, pict will be set
(*
* Plain text, the text field must be set by the decoder and is
* authoritative. ass and pict fields may contain approximations.
*)
SUBTITLE_TEXT,
(*
* Formatted text, the ass field must be set by the decoder and is
* authoritative. pict and text fields may contain approximations.
*)
SUBTITLE_ASS);
AVSubtitleRect = record
x: int; // < top left corner of pict, undefined when pict is not set
y: int; // < top left corner of pict, undefined when pict is not set
w: int; // < width of pict, undefined when pict is not set
h: int; // < height of pict, undefined when pict is not set
nb_colors: int; // < number of colors in pict, undefined when pict is not set
{$IFDEF FF_API_AVPICTURE}
(*
* @deprecated unused
*)
// attribute_deprecated
pict: AVPicture deprecated;
{$ENDIF}
(*
* data+linesize for the bitmap of this subtitle.
* Can be set for text/ass as well once they are rendered.
*)
data: puint8_t_array_4;
linesize: Tint_array_4;
_type: AVSubtitleType;
text: pAnsiChar; // < 0 terminated plain UTF-8 text
(*
* 0 terminated ASS/SSA compatible event line.
* The presentation of this is unaffected by the other values in this
* struct.
*)
ass: pAnsiChar;
flags: int;
end;-----------edit----------------------
SetLength(buf, 0);
for i := 0 to pkt.size-1
do begin
Insert(pkt.data[i], buf, length(buf));
end;
s := TEncoding.UTF8.GetString(buf);It seems that in this case the text is stored in pkt.data, I don’t think this is the right way to get the subtitle text but I wonder why avsubtitle doesn’t get the values. avpacket values seem like, (pts, dts, duration) etc, to be correct.
If I should use such construction to get the subtitle (text)value, how can I detect if it is utf8 encoded or how to determine the encoding ?
There are more questions to be answered like, the position of the subtitle. The bad thing about ffmpeg is it’s almost impossible to get answers.------------------edi2----------------------------------
Ok how I am solving this, is creating in memory a png image with transparency and writing text over it, converting the image to PAVRAME and show at the given pts time + duration. For the positioning is chosen horizontal center for each line and vertically the bottom minus X pixels. Looks like it’s working so far.Next ; the formatting of the text, like bold italic etc. Can anybody give a hint if there is a quick solution(function/method/example), I will try to create one, but a quick solution is welcome. As long as there is no nested formatting is used, it doesn’t sound tricky, but I’ve read that nested formatting can be used.
Should it be that this(formatted text) the reason is why ffmpeg is not assigning any values to avsubtitle ?
-
lavu/x86 : add FFT assembly
10 avril 2021, par Lynnelavu/x86 : add FFT assembly
This commit adds a pure x86 assembly SIMD version of the FFT in libavutil/tx.
The design of this pure assembly FFT is pretty unconventional.On the lowest level, instead of splitting the complex numbers into
real and imaginary parts, we keep complex numbers together but split
them in terms of parity. This saves a number of shuffles in each transform,
but more importantly, it splits each transform into two independent
paths, which we process using separate registers in parallel.
This allows us to keep all units saturated and lets us use all available
registers to avoid dependencies.
Moreover, it allows us to double the granularity of our per-load permutation,
skipping many expensive lookups and allowing us to use just 4 loads per register,
rather than 8, or in case FMA3 (and by extension, AVX2), use the vgatherdpd
instruction, which is at least as fast as 4 separate loads on old hardware,
and quite a bit faster on modern CPUs).Higher up, we go for a bottom-up construction of large transforms, foregoing
the traditional per-transform call-return recursion chains. Instead, we always
start at the bottom-most basis transform (in this case, a 32-point transform),
and continue constructing larger and larger transforms until we return to the
top-most transform.
This way, we only touch the stack 3 times per a complete target transform :
once for the 1/2 length transform and two times for the 1/4 length transform.The combination algorithm we use is a standard Split-Radix algorithm,
as used in our C code. Although a version with less operations exists
(Steven G. Johnson and Matteo Frigo's "A modified split-radix FFT with fewer
arithmetic operations", IEEE Trans. Signal Process. 55 (1), 111–119 (2007),
which is the one FFTW uses), it only has 2% less operations and requires at least 4x
the binary code (due to it needing 4 different paths to do a single transform).
That version also has other issues which prevent it from being implemented
with SIMD code as efficiently, which makes it lose the marginal gains it offered,
and cannot be performed bottom-up, requiring many recursive call-return chains,
whose overhead adds up.We go through a lot of effort to minimize load/stores by keeping as much in
registers in between construcring transforms. This saves us around 32 cycles,
on paper, but in reality a lot more due to load/store aliasing (a load from a
memory location cannot be issued while there's a store pending, and there are
only so many (2 for Zen 3) load/store units in a CPU).
Also, we interleave coefficients during the last stage to save on a store+load
per register.Each of the smallest, basis transforms (4, 8 and 16-point in our case)
has been extremely optimized. Our 8-point transform is barely 20 instructions
in total, beating our old implementation 8-point transform by 1 instruction.
Our 2x8-point transform is 23 instructions, beating our old implementation by
6 instruction and needing 50% less cycles. Our 16-point transform's combination
code takes slightly more instructions than our old implementation, but makes up
for it by requiring a lot less arithmetic operations.Overall, the transform was optimized for the timings of Zen 3, which at the
time of writing has the most IPC from all documented CPUs. Shuffles were
preferred over arithmetic operations due to their 1/0.5 latency/throughput.On average, this code is 30% faster than our old libavcodec implementation.
It's able to trade blows with the previously-untouchable FFTW on small transforms,
and due to its tiny size and better prediction, outdoes FFTW on larger transforms
by 11% on the largest currently supported size.