
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 (64)
-
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...) -
MediaSPIP Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...) -
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)
Sur d’autres sites (9348)
-
rtpdec : Don’t pass non-const pointers to fmtp attribute parsing functions
24 février 2015, par Martin Storsjörtpdec : Don’t pass non-const pointers to fmtp attribute parsing functions
This makes it clear that the individual parsing functions can’t
touch the parsed out value.Signed-off-by : Martin Storsjö <martin@martin.st>
- [DBH] libavformat/rtpdec.c
- [DBH] libavformat/rtpdec.h
- [DBH] libavformat/rtpdec_amr.c
- [DBH] libavformat/rtpdec_dv.c
- [DBH] libavformat/rtpdec_h264.c
- [DBH] libavformat/rtpdec_hevc.c
- [DBH] libavformat/rtpdec_ilbc.c
- [DBH] libavformat/rtpdec_latm.c
- [DBH] libavformat/rtpdec_mpeg4.c
- [DBH] libavformat/rtpdec_xiph.c
-
aarch64 : vp9 : Implement NEON loop filters
13 novembre 2016, par Martin Storsjöaarch64 : vp9 : Implement NEON loop filters
This work is sponsored by, and copyright, Google.
These are ported from the ARM version ; thanks to the larger
amount of registers available, we can do the loop filters with
16 pixels at a time. The implementation is fully templated, with
a single macro which can generate versions for both 8 and
16 pixels wide, for both 4, 8 and 16 pixels loop filters
(and the 4/8 mixed versions as well).For the 8 pixel wide versions, it is pretty close in speed (the
v_4_8 and v_8_8 filters are the best examples of this ; the h_4_8
and h_8_8 filters seem to get some gain in the load/transpose/store
part). For the 16 pixels wide ones, we get a speedup of around
1.2-1.4x compared to the 32 bit version.Examples of runtimes vs the 32 bit version, on a Cortex A53 :
ARM AArch64
vp9_loop_filter_h_4_8_neon : 144.0 127.2
vp9_loop_filter_h_8_8_neon : 207.0 182.5
vp9_loop_filter_h_16_8_neon : 415.0 328.7
vp9_loop_filter_h_16_16_neon : 672.0 558.6
vp9_loop_filter_mix2_h_44_16_neon : 302.0 203.5
vp9_loop_filter_mix2_h_48_16_neon : 365.0 305.2
vp9_loop_filter_mix2_h_84_16_neon : 365.0 305.2
vp9_loop_filter_mix2_h_88_16_neon : 376.0 305.2
vp9_loop_filter_mix2_v_44_16_neon : 193.2 128.2
vp9_loop_filter_mix2_v_48_16_neon : 246.7 218.4
vp9_loop_filter_mix2_v_84_16_neon : 248.0 218.5
vp9_loop_filter_mix2_v_88_16_neon : 302.0 218.2
vp9_loop_filter_v_4_8_neon : 89.0 88.7
vp9_loop_filter_v_8_8_neon : 141.0 137.7
vp9_loop_filter_v_16_8_neon : 295.0 272.7
vp9_loop_filter_v_16_16_neon : 546.0 453.7The speedup vs C code in checkasm tests is around 2-7x, which is
pretty much the same as for the 32 bit version. Even if these functions
are faster than their 32 bit equivalent, the C version that we compare
to also became around 1.3-1.7x faster than the C version in 32 bit.Based on START_TIMER/STOP_TIMER wrapping around a few individual
functions, the speedup vs C code is around 4-5x.Examples of runtimes vs C on a Cortex A57 (for a slightly older version
of the patch) :
A57 gcc-5.3 neon
loop_filter_h_4_8_neon : 256.6 93.4
loop_filter_h_8_8_neon : 307.3 139.1
loop_filter_h_16_8_neon : 340.1 254.1
loop_filter_h_16_16_neon : 827.0 407.9
loop_filter_mix2_h_44_16_neon : 524.5 155.4
loop_filter_mix2_h_48_16_neon : 644.5 173.3
loop_filter_mix2_h_84_16_neon : 630.5 222.0
loop_filter_mix2_h_88_16_neon : 697.3 222.0
loop_filter_mix2_v_44_16_neon : 598.5 100.6
loop_filter_mix2_v_48_16_neon : 651.5 127.0
loop_filter_mix2_v_84_16_neon : 591.5 167.1
loop_filter_mix2_v_88_16_neon : 855.1 166.7
loop_filter_v_4_8_neon : 271.7 65.3
loop_filter_v_8_8_neon : 312.5 106.9
loop_filter_v_16_8_neon : 473.3 206.5
loop_filter_v_16_16_neon : 976.1 327.8The speed-up compared to the C functions is 2.5 to 6 and the cortex-a57
is again 30-50% faster than the cortex-a53.Signed-off-by : Martin Storsjö <martin@martin.st>
-
FFmpeg remuxing parts of an audio file
22 décembre 2022, par zorleoneI'm trying to remux individual tracks from a FLAC file using the FFmpeg libraries.
I get the starting timestamps from a Cue sheet, I seek to the timestamps using
avformat_seek_file
. However after writing the packets to output files, they only have data from the beginning of the input file.

This is the code snippet which opens the input FLAC and also creates an output
AVFormatContext
for each track. I'm guessing the issue isavformat_seek_file
, it doesn't seem to do anything, since even though I seek to the beginning of a track, the output file contains data from the beginning of the input.

for(int i = 0; i <= sheet.ntracks; i++) {
 sheet.avfmtctx = avformat_alloc_context();
 if(avformat_open_input(&sheet.avfmtctx, sheet.file, NULL, NULL) < 0) {
 fprintf(stderr,
 "avformat_open_input(): failed to open %s\n",
 sheet.file);
 return 1;
 }
 int audio_stream_idx = -1;
 for(int i = 0; i < sheet.avfmtctx->nb_streams; i++) {
 if(sheet.avfmtctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
 audio_stream_idx = i;
 break;
 }
 }
 avformat_find_stream_info(sheet.avfmtctx, NULL);
 AVFormatContext *output;
 char *filepath = title_to_filepath(&sheet.tracks[i], sheet.file);
 avformat_alloc_output_context2(&output, NULL, NULL, filepath);
 AVStream *out_audio_stream = avformat_new_stream(output, NULL);
 avcodec_parameters_copy(out_audio_stream->codecpar,
 sheet.avfmtctx->streams[audio_stream_idx]->codecpar);

 if(avio_open(&output->pb, filepath, AVIO_FLAG_WRITE) < 0) {
 fprintf(stderr, "Failed to open %s for writing\n", filepath);
 return 1;
 }
 if(avformat_write_header(output, NULL) < 0) {
 fprintf(stderr, "avformat_write_header() failed\n");
 return 1;
 }
 int64_t current_frame = sheet.tracks[i].index;
 int64_t next_track_index = (i < sheet.ntracks) ?
 sheet.tracks[i + 1].index :
 INT64_MAX;
 if(avformat_seek_file(sheet.avfmtctx,
 -1,
 INT64_MIN,
 current_frame,
 current_frame,
 0) < 0) {
 fprintf(stderr, "Failed to seek to the index of track %d\n", i);
 avformat_free_context(sheet.avfmtctx);
 sheet.avfmtctx = NULL;
 av_write_trailer(output);
 avio_closep(&output->pb);
 avformat_free_context(output);
 free(filepath);
 continue;
 }
 AVPacket *pkt = av_packet_alloc();
 int64_t pts_diff = AV_NOPTS_VALUE, dts_diff = AV_NOPTS_VALUE;
 while(current_frame < next_track_index && !avio_feof(output->pb)) {
 int ret;
 if((ret = av_read_frame(sheet.avfmtctx, pkt)) < 0) {
 if(ret != AVERROR_EOF)
 fprintf(stderr, "av_read_frame() failed: %s\n", av_err2str(ret));
 break;
 }
 if(pkt->stream_index != audio_stream_idx)
 continue;
 // runs only once
 if(pts_diff == AV_NOPTS_VALUE && dts_diff == AV_NOPTS_VALUE) {
 pts_diff = pkt->pts;
 dts_diff = pkt->dts;
 }

 pkt->stream_index = 0; // first and only stream
 pkt->pts -= pts_diff;
 pkt->dts -= dts_diff;
 pkt->pos = -1;
 av_interleaved_write_frame(output, pkt);

 current_frame++;
 }

 avformat_free_context(sheet.avfmtctx);
 sheet.avfmtctx = NULL;

 av_write_trailer(output);
 av_packet_free(&pkt);
 avio_closep(&output->pb);
 avformat_free_context(output);

 free(filepath);
 }




current_frame
andnext_track_index
are calculated from the INDEX lines in the Cue sheet :MM * 60 * 75 + SS * 75 + FF
.
Can someone tell me what I'm doing wrong, and how to get the data I need from the input ?