
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (34)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (4831)
-
Revision a7355f3bbb : Merge changes Iaf7d6b0a,Iece0bf56 * changes : Use INLINE and include vpx_confi
5 mai 2014, par JohannMerge changes Iaf7d6b0a,Iece0bf56
* changes :
Use INLINE and include vpx_config.h instead of plain ’inline’
Use vreinterpret instead of casting neon vector types -
swscale/x86/rgb2rgb : optimize AVX2 version of uyvytoyuv422
20 février, par Shreesh Adigaswscale/x86/rgb2rgb : optimize AVX2 version of uyvytoyuv422
Currently the AVX2 version of uyvytoyuv422 in the SIMD loop does the following :
4 vinsertq to have interleaving of the vector lanes during load from memory.
4 vperm2i128 inside 4 RSHIFT_COPY calls to achieve the desired layout.This patch replaces the above 8 instructions with 2 vpermq and
2 vpermd with a vector register similar to AVX512ICL version.Observed the following numbers on various microarchitectures :
On AMD Zen3 laptop :
Before :
uyvytoyuv422_c : 51979.7 ( 1.00x)
uyvytoyuv422_sse2 : 5410.5 ( 9.61x)
uyvytoyuv422_avx : 4642.7 (11.20x)
uyvytoyuv422_avx2 : 4249.0 (12.23x)After :
uyvytoyuv422_c : 51659.8 ( 1.00x)
uyvytoyuv422_sse2 : 5420.8 ( 9.53x)
uyvytoyuv422_avx : 4651.2 (11.11x)
uyvytoyuv422_avx2 : 3953.8 (13.07x)On Intel Macbook Pro 2019 :
Before :
uyvytoyuv422_c : 185014.4 ( 1.00x)
uyvytoyuv422_sse2 : 22800.4 ( 8.11x)
uyvytoyuv422_avx : 19796.9 ( 9.35x)
uyvytoyuv422_avx2 : 13141.9 (14.08x)After :
uyvytoyuv422_c : 185093.4 ( 1.00x)
uyvytoyuv422_sse2 : 22795.4 ( 8.12x)
uyvytoyuv422_avx : 19791.9 ( 9.35x)
uyvytoyuv422_avx2 : 12043.1 (15.37x)On AMD Zen4 desktop :
Before :
uyvytoyuv422_c : 29105.0 ( 1.00x)
uyvytoyuv422_sse2 : 3888.0 ( 7.49x)
uyvytoyuv422_avx : 3374.2 ( 8.63x)
uyvytoyuv422_avx2 : 2649.8 (10.98x)
uyvytoyuv422_avx512icl : 1615.0 (18.02x)After :
uyvytoyuv422_c : 29093.4 ( 1.00x)
uyvytoyuv422_sse2 : 3874.4 ( 7.51x)
uyvytoyuv422_avx : 3371.6 ( 8.63x)
uyvytoyuv422_avx2 : 2174.6 (13.38x)
uyvytoyuv422_avx512icl : 1625.1 (17.90x)Signed-off-by : Shreesh Adiga <16567adigashreesh@gmail.com>
-
Programatically read fMP4 using ffmpeg
8 avril 2019, par igal kAll of my attempts to parse fmp4 have failed with the following errors :
avcodec_send_packet
returned with-10949955291
and printed the following errors :[h264 @ 0x105001600] No start code is found.
[h264 @ 0x105001600] Error splitting the input into NAL units.What did i do ?
Downloaded a perfectly playable
h.264
file and fragmented it using the following cmdffmpeg -i long.mp4 -an -sn -vcodec libx264 -force_key_frames "expr:gte(t,n_forced*4)" -sc_threshold 0 -r 25 -f hls -hls_time 4 -hls_list_size 99999 -start_number 1 -hls_segment_type fmp4 -hls_fmp4_init_filename init.mp4 -t 30 -threads 0 big_bunny.m3u8
and used the following
AVIO
read example#include <fstream>
#include <iterator>
#include <algorithm>
#include <libavcodec></libavcodec>avcodec.h>
std::vector<unsigned char="char"> b1;
std::vector<unsigned char="char"> b2;
bool initialized = false;
int bytesread = 0;
static int read_packet(void* opaque, uint8_t* buf, int buf_size)
{
if (b1.size() && !initialized) {
size_t bytesToRead = std::min(buf_size, (int)b1.size());
::memcpy(buf, b1.data(), bytesToRead);
bytesread += bytesToRead;
if (bytesread >= b1.size()) {
initialized = true;
bytesread = 0;
}
return bytesToRead;
}
::memcpy(buf, b2.data() + bytesread, buf_size);
bytesread += buf_size;
return buf_size;
}
int main(int argc, char** argv)
{
AVFormatContext* fmt_ctx = NULL;
AVIOContext* avio_ctx = NULL;
uint8_t *buffer = NULL, *buffer2 = nullptr, *avio_ctx_buffer = NULL;
size_t buffer_size, buffer_size2, avio_ctx_buffer_size = 4096;
char* input_filename = NULL;
int ret = 0;
struct buffer_data bd = {0};
std::ifstream input1("/Users/x/Downloads/fmp4/init.mp4", std::ios::binary);
std::ifstream input2("/Users/x/Downloads/fmp4/big_bunny1.m4s", std::ios::binary);
b1 = std::vector<unsigned char="char">((std::istreambuf_iterator<char>(input1)), std::istreambuf_iterator<char>());
b2 = std::vector<unsigned char="char">((std::istreambuf_iterator<char>(input2)), std::istreambuf_iterator<char>());
avio_ctx_buffer = (uint8_t*)av_malloc(avio_ctx_buffer_size);
fmt_ctx = avformat_alloc_context();
avio_ctx = avio_alloc_context(avio_ctx_buffer, avio_ctx_buffer_size, 0, nullptr, &read_packet, NULL, NULL);
fmt_ctx->pb = avio_ctx;
AVDictionary* opts = NULL;
// av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
ret = avformat_open_input(&fmt_ctx, NULL, NULL, &opts);
ret = avformat_find_stream_info(fmt_ctx, NULL);
AVCodec* decoder = nullptr;
decoder = avcodec_find_decoder(fmt_ctx->streams[0]->codecpar->codec_id);
AVCodecContext* decoderCtx = avcodec_alloc_context3(decoder);
ret = avcodec_open2(decoderCtx, decoder, nullptr);
AVPacket pkt;
av_init_packet(&pkt);
AVFrame* frame = av_frame_alloc();
while (true) {
ret = av_read_frame(fmt_ctx, &pkt);
ret = avcodec_send_packet(decoderCtx, &pkt);
if (ret != 0)
assert(false);
for (;;) {
ret = avcodec_receive_frame(decoderCtx, frame);
if (ret < 0) {
break;
}
int g;
g = 0;
}
}
</char></char></unsigned></char></char></unsigned></unsigned></unsigned></algorithm></iterator></fstream>I’m not even sure that this is the right way to process
fmp4
types. but for the clarity of this example, i simply loaded the init file into the first buffer, and the actual media file on the second buffer, and switch between the buffers respectfully tobuf_size
’s value.