
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (73)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
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 (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (6411)
-
Using ffmpeg to read mp4 file from stdin and extract image is failing with "Invalid data found when processing input"
16 mars 2023, par jsindosUsing ffmpeg, I'm trying to read an mp4 file from stdin, and save the last frame of the file to jpg.


cat PXL_20221118_051057924.TS.mp4 | ffmpeg -sseof -3 -i - -f mp4 -update 1 -q:v 1 last.jpg



The command works fine when not running from stdin.


When running from stdin, an empty file is created, with the following error message :


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcb4d0041c0] stream 1, offset 0x2eaee0d: partial file
pipe:: Invalid data found when processing input



I've posted the full output below.


—


ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 built with Apple clang version 14.0.0 (clang-1400.0.29.202)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2_5 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcb4d0041c0] stream 2, offset 0x2c: partial file
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:':
 Metadata:
 major_brand : isom
 minor_version : 131072
 compatible_brands: isomiso2mp41
 creation_time : 2022-11-18T05:11:23.000000Z
 com.android.capture.fps: 30.000000
 Duration: 00:00:23.74, start: 0.000000, bitrate: N/A
 Stream #0:0[0x1](eng): Data: none (mett / 0x7474656D), 45 kb/s (default)
 Metadata:
 creation_time : 2022-11-18T05:11:23.000000Z
 handler_name : MetaHandle
 Stream #0:1[0x2](eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
 Metadata:
 creation_time : 2022-11-18T05:11:23.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
 Stream #0:2[0x3](eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19524 kb/s, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 90k tbn (default)
 Metadata:
 creation_time : 2022-11-18T05:11:23.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
 Side data:
 displaymatrix: rotation of -90.00 degrees
 Stream #0:3[0x4](eng): Data: none (mett / 0x7474656D) (default)
 Metadata:
 creation_time : 2022-11-18T05:11:23.000000Z
 handler_name : MetaHandle
Stream mapping:
 Stream #0:2 -> #0:0 (hevc (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcb4d0041c0] stream 1, offset 0x2eaee0d: partial file
pipe:: Invalid data found when processing input
[libx264 @ 0x7fcb4d10b500] -qscale is ignored, -crf is recommended.
[libx264 @ 0x7fcb4d10b500] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fcb4d10b500] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x7fcb4d10b500] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: 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=18 lookahead_threads=3 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
Output #0, mp4, to '/Users/josephtsindos/Downloads/last2.jpg':
 Metadata:
 major_brand : isom
 minor_version : 131072
 compatible_brands: isomiso2mp41
 com.android.capture.fps: 30.000000
 encoder : Lavf59.27.100
 Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuvj420p(pc), 1080x1920, q=2-31, 30 fps, 15360 tbn (default)
 Metadata:
 creation_time : 2022-11-18T05:11:23.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
 encoder : Lavc59.37.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 displaymatrix: rotation of -0.00 degrees
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2022-11-18T05:11:23.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
 encoder : Lavc59.37.100 aac
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x 
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 0x7fcb4d10c840] Qavg: nan



-
Add a sample "CAMM" data to specific PTS in a MP4 file
11 janvier 2023, par ChelouteFor testing purpose, I need to add programatically some samples to an existing MP4 video file but I can't understand how.
My goal is to add some CAMM1 records (exposure data) associated to each PTS multiple of 33366, that's to say : PTS=0, PTS=33366, PTS=66732, ...


I already have an existing camm track atom in my file, so the idea is to duplicate all the existing CAMM samples (CAMM2 and CAMM3 data), add my CAMM1 samples to the existing CAMM data, and write all the samples again at the end of the mdat atom (moov atom is located after mdat atom in my case). Next I'll update the CAMM track atom (stts, stsc, stsz and stco) to index all the samples correctly.


But I have 1 question I can't understand. STSC and STCO are dealing with offsets and STTS with time and delta, how can I do to link my CAMM1 records to PTS multiple of 33366 ?


Thanks


-
What is the right way to put data to abuffersrc and pull from abufersink when I have multiple inputs with FFMPEG "afir" filter ?
19 décembre 2022, par EvgeniiI want to understand why
av_buffersink_get_frame()
always returnAVERROR(EAGAIN)
.
I use this algorithm :

- 

- Open input file
input.mp3
, create decoder for input file - Open signal file
signal.wav
, create decoder for signal file - Create filter graph and inputs/outputs with function
avfilter_graph_parse2("[in0][in1]afir[out], &inputs, &outputs")
- Create
abuffersrc
for every inputs with names "in0", "in1" - Create one
abuffersink
for oneoutputs
with name "out" - Read and decode samples with methods
av_read_frame()
,avcodec_send_packet()
,avcodec_receive_frame()
, put samples to abuffersrc withav_buffersrc_add_frame()
and trying to read samples from abuffersink withav_buffersink_get_frame()
- HERE I getAVERROR(EAGAIN)
for every call














Please, help !


I've tried to read all samples and push its to abuffersrc for
input
andsignal
pipes in first step and and callav_buffersink_get_frame
one time in second step. I gotAVERROR(EGAIN)
again.

I've tried to config two outputs with names "in0" and "in1" and one input with name "out" and call
avfilter_graph_parse_ptr()
as done in here :

static AVFilterContext *init_buffersrc(AVCodecContext *decoder, AVFilterGraph *filter_graph, const char *pad_name) {
 AVFilterContext *buffersrc = NULL;
 uint8_t args[1024];

 snprintf(args, sizeof(args),
 "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64"",
 decoder->time_base.num, decoder->time_base.den, decoder->sample_rate, av_get_sample_fmt_name(decoder->sample_fmt), decoder->channel_layout);

 CHECK_AV(avfilter_graph_create_filter(&buffersrc, avfilter_get_by_name("abuffer"), pad_name, args, NULL, filter_graph));
 return buffersrc;
}

static AVFilterContext *init_buffersink(AVFilterGraph *filter_graph) {
 AVFilterContext *buffersink = NULL;

 CHECK_AV(avfilter_graph_create_filter(&buffersink, avfilter_get_by_name("abuffersink"), "out", NULL, NULL, filter_graph));
 return buffersink;
}

static void init_complex_graph(const char *desc, Context *ctx) {

 AVFilterGraph *filter_graph;
 AVFilterInOut *inputs = avfilter_inout_alloc();
 AVFilterInOut **outputs = (AVFilterInOut**) av_malloc(ctx->nb_input_files*sizeof(AVFilterInOut *));
 char *dump;
 uint8_t pad_name[64];

 filter_graph = ctx->filter_graph = avfilter_graph_alloc();
 filter_graph->nb_threads = 1;

 for (int i = 0; i< ctx->nb_input_files; ++i) {
 outputs[i] = avfilter_inout_alloc();
 }

 for (int i = 0; i < ctx->nb_input_files; ++i) {
 AVFilterContext *buffersrc;
 snprintf(pad_name, sizeof(pad_name), "in%d", i); 
 buffersrc = init_buffersrc(ctx->input_files[i]->decoder, filter_graph, pad_name);
 ctx->input_files[i]->buffersrc = buffersrc;
 outputs[i]->name = av_strdup(pad_name);
 outputs[i]->filter_ctx = buffersrc;
 outputs[i]->pad_idx = 0;
 if (i == ctx->nb_input_files - 1) {
 outputs[i]->next = NULL;
 }
 else {
 outputs[i]->next = outputs[i + 1];
 }
 }

 ctx->output_file->buffersink = init_buffersink(filter_graph);

 inputs->name = av_strdup("out");
 inputs->filter_ctx = ctx->output_file->buffersink;
 inputs->pad_idx =0;
 inputs->next = NULL;

 CHECK_AV(avfilter_graph_parse_ptr(filter_graph, desc, &inputs, outputs, NULL));

 CHECK_AV(avfilter_graph_config(filter_graph, NULL));
} 

// Call init_complex_graph("[in0][in1]afir[out]", SOME_CONTEXT);



and still nothing.


- Open input file