
Recherche avancée
Autres articles (41)
-
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 (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (6289)
-
FFmpeg filtergraph memory leak
5 juillet 2017, par Leif AndersenI have an FFmpeg program that :
- Demuxes and decodes a video file.
- Passes it through a filtergraph
- encodes and muxes the new video.
The filtergraph itself is rather complex, and can be run directly from the command line as such :
ffmpeg -i demo.mp4 -filter_complex \
"[audio3]atrim=end=30:start=10[audio2];\
[video5]trim=end=30:start=10[video4];[audio2]anull[audio6];\
[video4]scale=width=1920:height=1080[video7];[audio6]anull[audio8];\
[video7]fps=fps=30[video9];[audio8]anull[audio10];\
[video9]format=pix_fmts=yuv420p[video11];\
[audio10]asetpts=expr=PTS-STARTPTS[audio12];\
[video11]setpts=expr=PTS-STARTPTS[video13];\
[audio15]concat=v=0:a=1:n=1[audio14];\
[video17]concat=v=1:a=0:n=1[video16];\
[audio12]afifo[audio15];[video13]fifo[video17];\
[audio14]afifo[audio18];[video16]fifo[video19];\
[audio18]anull[audio20];\
[video19]pad=width=1920:height=1080[video21];\
[audio20]anull[audio22];[video21]fps=fps=25[video23];\
[audio22]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo[fa];\
[video23]format=pix_fmts=yuv420p[fv];[0:a]afifo[audio3];\
[0:v]fifo[video5]" \
-map "[fv]" -map "[fa]" out.mp4I realize this is a massive filtergraph with a lot of no-op filters, it was autogenerated rather than being hand written. Here is a more cleaner version of the graph. (Its a graphviz file, you can run it in the command line or here.)
Anyway, when I run the program that uses this filtergraph my memory usage spikes. I end up using about 7 GB of RAM for a 30 second clip. However, when I run the program using the ffmpeg command above, it peaks out at about 600 MB of RAM. This causes me to believe that the problem is not the ungodly size of the filtergraph, but a problem with how my program is using it.
The program sets up the filtergraph (using
av_filter_parse_ptr
, giving the filtergraph string shown above), encoder, muxer, decoder, and demuxer, then spawns two threads, one that sends frames into the filtergraph, and one that receives them. The frame that sends them looks something like :void decode () {
while(... more_frames ...) {
AVFrame *frame = av_frame_alloc();
... fill next frame of stream ...
av_buffersrc_write_frame(ctx, frame);
av_frame_free(&frame);
}
}(I have elided the
av_send_packet/av_receive_frame
functions as they don’t seem to be leaking memory. I have also elided the process of flushing the buffersrc as that won’t happen until the end, and the memory spikes long before that.)And the encoder thread looks similar :
void encode() {
while(... nodes_in_graph ...) {
AVFrame *frame = av_frame_alloc();
av_buffersink_get_frame(ctx, frame);
... ensure frame actually was filled ...
... send frame to encoder ...
av_frame_free(&frame);
}
}As with the decoder, I have elided the
send_frame/receive_packet
combo as they don’t seem to be leaking memory. Additionally I have elided the details of ensuring that the frame actually was filled. The code loops until the frame eventually does get filled.Every frame I allocate I fairly quickly deallocate. I additionally handled all of the error cases that the ffmpeg can give (Elided in the example).
I have also tried having only one frame for the encoder and one for the decoder (and calling
av_frame_unref
in each iteration of the loop).Am I forgetting to free something, or am I just using the calls to libavfilter incorrectly such that it has to buffer all of the data ? I don’t think the leak is caused by the memory graph because running it from the command line doesn’t seem to cause the same memory explosion.
FWIW, the actual code is here, although its written in Racket. I do have a minimal example that also seems to duplicate this behavior (modified from the
doc/example/filtering_video.c
file from the ffmpeg code :#include
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
#include <libavfilter></libavfilter>avfiltergraph.h>
#include <libavfilter></libavfilter>buffersink.h>
#include <libavfilter></libavfilter>buffersrc.h>
#include <libavutil></libavutil>opt.h>
const char *filter_descr = "trim=start=10:end=30,scale=78:24,transpose=cclock";
static AVFormatContext *fmt_ctx;
static AVCodecContext *dec_ctx;
AVFilterContext *buffersink_ctx;
AVFilterContext *buffersrc_ctx;
AVFilterGraph *filter_graph;
static int video_stream_index = -1;
static int64_t last_pts = AV_NOPTS_VALUE;
static int open_input_file(const char *filename)
{
int ret;
AVCodec *dec;
if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)) < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot open input file\n");
return ret;
}
if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
return ret;
}
/* select the video stream */
ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, &dec, 0);
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot find a video stream in the input file\n");
return ret;
}
video_stream_index = ret;
/* create decoding context */
dec_ctx = avcodec_alloc_context3(dec);
if (!dec_ctx)
return AVERROR(ENOMEM);
avcodec_parameters_to_context(dec_ctx, fmt_ctx->streams[video_stream_index]->codecpar);
av_opt_set_int(dec_ctx, "refcounted_frames", 1, 0);
/* init the video decoder */
if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot open video decoder\n");
return ret;
}
return 0;
}
static int init_filters(const char *filters_descr)
{
char args[512];
int ret = 0;
AVFilter *buffersrc = avfilter_get_by_name("buffer");
AVFilter *buffersink = avfilter_get_by_name("buffersink");
AVFilterInOut *outputs = avfilter_inout_alloc();
AVFilterInOut *inputs = avfilter_inout_alloc();
AVRational time_base = fmt_ctx->streams[video_stream_index]->time_base;
enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE };
filter_graph = avfilter_graph_alloc();
if (!outputs || !inputs || !filter_graph) {
ret = AVERROR(ENOMEM);
goto end;
}
/* buffer video source: the decoded frames from the decoder will be inserted here. */
snprintf(args, sizeof(args),
"video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d",
dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt,
time_base.num, time_base.den,
dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den);
ret = avfilter_graph_create_filter(&buffersrc_ctx, buffersrc, "in",
args, NULL, filter_graph);
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot create buffer source\n");
goto end;
}
/* buffer video sink: to terminate the filter chain. */
ret = avfilter_graph_create_filter(&buffersink_ctx, buffersink, "out",
NULL, NULL, filter_graph);
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot create buffer sink\n");
goto end;
}
ret = av_opt_set_int_list(buffersink_ctx, "pix_fmts", pix_fmts,
AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot set output pixel format\n");
goto end;
}
outputs->name = av_strdup("in");
outputs->filter_ctx = buffersrc_ctx;
outputs->pad_idx = 0;
outputs->next = NULL;
inputs->name = av_strdup("out");
inputs->filter_ctx = buffersink_ctx;
inputs->pad_idx = 0;
inputs->next = NULL;
if ((ret = avfilter_graph_parse_ptr(filter_graph, filters_descr,
&inputs, &outputs, NULL)) < 0)
goto end;
if ((ret = avfilter_graph_config(filter_graph, NULL)) < 0)
goto end;
end:
avfilter_inout_free(&inputs);
avfilter_inout_free(&outputs);
return ret;
}
int main(int argc, char **argv)
{
int ret;
AVPacket packet;
AVFrame *frame = av_frame_alloc();
AVFrame *filt_frame = av_frame_alloc();
if (!frame || !filt_frame) {
perror("Could not allocate frame");
exit(1);
}
if (argc != 2) {
fprintf(stderr, "Usage: %s file\n", argv[0]);
exit(1);
}
av_register_all();
avfilter_register_all();
if ((ret = open_input_file(argv[1])) < 0)
goto end;
if ((ret = init_filters(filter_descr)) < 0)
goto end;
/* read all packets */
while (1) {
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
break;
if (packet.stream_index == video_stream_index) {
ret = avcodec_send_packet(dec_ctx, &packet);
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Error while sending a packet to the decoder\n");
break;
}
while (ret >= 0) {
ret = avcodec_receive_frame(dec_ctx, frame);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
break;
} else if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Error while receiving a frame from the decoder\n");
goto end;
}
if (ret >= 0) {
frame->pts = av_frame_get_best_effort_timestamp(frame);
/* push the decoded frame into the filtergraph */
if (av_buffersrc_add_frame_flags(buffersrc_ctx, frame, AV_BUFFERSRC_FLAG_KEEP_REF) < 0) {
av_log(NULL, AV_LOG_ERROR, "Error while feeding the filtergraph\n");
break;
}
/* pull filtered frames from the filtergraph */
while (1) {
ret = av_buffersink_get_frame(buffersink_ctx, filt_frame);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
break;
if (ret < 0)
goto end;
av_frame_unref(filt_frame);
}
av_frame_unref(frame);
}
}
}
av_packet_unref(&packet);
}
end:
avfilter_graph_free(&filter_graph);
avcodec_free_context(&dec_ctx);
avformat_close_input(&fmt_ctx);
av_frame_free(&frame);
av_frame_free(&filt_frame);
return ret;
} -
ffmpeg Error while filtering : Cannot allocate memory
7 juillet 2017, par Andres MEREMy workstation seems to have plenty of memory (and everything). When I am trying to run ffmpeg as follows :
/usr/local/bin/ffmpeg \
-loglevel debug \
-i "A066C002_170619NU_CANON.mov" \
-filter_complex "[0:0] [0:2] amerge, aformat=sample_fmts=s16:channel_layouts=stereo [a]" \
-map "[a]" \
-map 0:5 \
-c:a libfdk_aac \
-vbr 3 \
-vcodec libx264 \
-profile:v baseline \
-level 3.0 \
-vf scale=1280:720 \
-pix_fmt yuv420p \
-crf 20 \
-metadata title="Test movie" \
-movflags +faststart \
-y \
"A066C002_170619NU_CANON.mp4"It fails with "Error while filtering : Cannot allocate memory".
ffmpeg version N-86721-gf605b56-am Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --extra-version=am --enable-gpl --enable-libfdk-aac --enable-libsoxr --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared
libavutil 55. 67.100 / 55. 67.100
libavcodec 57.100.103 / 57.100.103
libavformat 57. 75.100 / 57. 75.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 94.100 / 6. 94.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input url with argument 'A066C002_170619NU_CANON.mov'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument '[0:0] [0:2] amerge, aformat=sample_fmts=s16:channel_layouts=stereo [a]'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '[a]'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:5'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'libfdk_aac'.
Reading option '-vbr' ... matched as AVOption 'vbr' with argument '3'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'.
Reading option '-profile:v' ... matched as option 'profile' (set profile) with argument 'baseline'.
Reading option '-level' ... matched as AVOption 'level' with argument '3.0'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'scale=1280:720'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'.
Reading option '-crf' ... matched as AVOption 'crf' with argument '20'.
Reading option '-metadata' ... matched as option 'metadata' (add metadata) with argument 'title=Test movie'.
Reading option '-movflags' ... matched as AVOption 'movflags' with argument '+faststart'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'A066C002_170619NU_CANON.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option filter_complex (create a complex filtergraph) with argument [0:0] [0:2] amerge, aformat=sample_fmts=s16:channel_layouts=stereo [a].
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url A066C002_170619NU_CANON.mov.
Successfully parsed a group of options.
Opening an input file: A066C002_170619NU_CANON.mov.
[NULL @ 0x1c4f920] Opening 'A066C002_170619NU_CANON.mov' for reading
[file @ 0x1c4ffc0] Setting default whitelist 'file,crypto'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Unknown dref type 0x73696c61 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Processing st: 0, edit list 0 - media time: 0, duration: 129254400
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Unknown dref type 0x73696c61 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Processing st: 1, edit list 0 - media time: 0, duration: 129254400
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Unknown dref type 0x73696c61 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Processing st: 2, edit list 0 - media time: 0, duration: 129254400
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Unknown dref type 0x73696c61 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Processing st: 3, edit list 0 - media time: 0, duration: 129254400
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Unknown dref type 0x73696c61 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Processing st: 4, edit list 0 - media time: 0, duration: 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Unknown dref type 0x73696c61 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Processing st: 5, edit list 0 - media time: 0, duration: 67320
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] Before avformat_find_stream_info() pos: 59339926200 bytes read:760258 seeks:3 nb_streams:6
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c4f920] After avformat_find_stream_info() pos: 1180516 bytes read:1945622 seeks:4 frames:144
Guessed Channel Layout for Input Stream #0.0 : mono
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'A066C002_170619NU_CANON.mov':
Metadata:
creation_time : 2017-06-19T10:12:13.000000Z
com.apple.quicktime.creationdate: 2017-06-19T13:12:13+0300
com.apple.proapps.manufacturer: CANON
com.apple.quicktime.make: CANON
com.apple.proapps.mio.cameraName: EOS C300 Mark II
com.apple.proapps.cameraname: EOS C300 Mark II
com.apple.quicktime.model: EOS C300 Mark II
com.apple.quicktime.camera.identifier: 060e2b34-0401-010d-0e15-0056454f0200
com.divergentmedia.editready.timecodeStart: 05:45:28:08
com.divergentmedia.editready.sonyXDCamTC: 05:45:28:08
com.divergentmedia.editReady.version: EditReady 1.4.9, 798
com.apple.proapps.studio.metadataFieldDominanceOverride: 1
date : 2017-06-19T13:12:13+0300
date-eng : 2017-06-19T13:12:13+0300
make : CANON
make-eng : CANON
model : EOS C300 Mark II
model-eng : EOS C300 Mark II
timecode : 05:45:28:08
Duration: 00:44:52.80, start: 0.000000, bitrate: 176292 kb/s
Stream #0:0(eng), 47, 1/48000: Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, mono, s16, 768 kb/s (default)
Metadata:
creation_time : 2017-06-19T10:12:13.000000Z
handler_name : Apple Alias Data Handler
Stream #0:1(eng), 47, 1/48000: Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, mono, s16, 768 kb/s (default)
Metadata:
creation_time : 2017-06-19T10:12:13.000000Z
handler_name : Apple Alias Data Handler
Stream #0:2(eng), 47, 1/48000: Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, mono, s16, 768 kb/s (default)
Metadata:
creation_time : 2017-06-19T10:12:13.000000Z
handler_name : Apple Alias Data Handler
Stream #0:3(eng), 1, 1/48000: Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, mono, s16, 768 kb/s (default)
Metadata:
creation_time : 2017-06-19T10:12:13.000000Z
handler_name : Apple Alias Data Handler
Stream #0:4(eng), 1, 1/25: Data: none (tmcd / 0x64636D74), 0/1, 0 kb/s (default)
Metadata:
creation_time : 2017-06-19T10:12:13.000000Z
handler_name : Apple Alias Data Handler
timecode : 05:45:28:08
Stream #0:5(eng), 1, 1/25: Video: prores, 1 reference frame (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080, 0/1, 173217 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 25 tbn, 25 tbc (default)
Metadata:
creation_time : 2017-06-21T11:52:58.000000Z
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (HQ)
Successfully opened the file.
detected 16 logical cores
[Parsed_aformat_1 @ 0x1c71a60] Setting 'sample_fmts' to value 's16'
[Parsed_aformat_1 @ 0x1c71a60] Setting 'channel_layouts' to value 'stereo'
Parsing a group of options: output url A066C002_170619NU_CANON.mp4.
Applying option map (set input stream mapping) with argument [a].
Applying option map (set input stream mapping) with argument 0:5.
Applying option c:a (codec name) with argument libfdk_aac.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264.
Applying option profile:v (set profile) with argument baseline.
Applying option vf (set video filters) with argument scale=1280:720.
Applying option pix_fmt (set pixel format) with argument yuv420p.
Applying option metadata (add metadata) with argument title=Test movie.
Successfully parsed a group of options.
Opening an output file: A066C002_170619NU_CANON.mp4.
[file @ 0x1d4fe40] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
Stream #0:0 (pcm_s16le) -> amerge:in0 (graph 0)
Stream #0:2 (pcm_s16le) -> amerge:in1 (graph 0)
aformat (graph 0) -> Stream #0:0 (libfdk_aac)
Stream #0:5 -> #0:1 (prores (native) -> h264 (libx264))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 1 times
[Parsed_scale_0 @ 0x2397e60] Setting 'w' to value '1280'
[Parsed_scale_0 @ 0x2397e60] Setting 'h' to value '720'
[Parsed_scale_0 @ 0x2397e60] Setting 'flags' to value 'bicubic'
[Parsed_scale_0 @ 0x2397e60] w:1280 h:720 flags:'bicubic' interl:0
[graph 1 input from stream 0:5 @ 0x23984c0] Setting 'video_size' to value '1920x1080'
[graph 1 input from stream 0:5 @ 0x23984c0] Setting 'pix_fmt' to value '74'
[graph 1 input from stream 0:5 @ 0x23984c0] Setting 'time_base' to value '1/25'
[graph 1 input from stream 0:5 @ 0x23984c0] Setting 'pixel_aspect' to value '1/1'
[graph 1 input from stream 0:5 @ 0x23984c0] Setting 'sws_param' to value 'flags=2'
[graph 1 input from stream 0:5 @ 0x23984c0] Setting 'frame_rate' to value '25/1'
[graph 1 input from stream 0:5 @ 0x23984c0] w:1920 h:1080 pixfmt:yuv422p10le tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[format @ 0x2399240] compat: called with args=[yuv420p]
[format @ 0x2399240] Setting 'pix_fmts' to value 'yuv420p'
[AVFilterGraph @ 0x1d517e0] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[Parsed_scale_0 @ 0x2397e60] w:1920 h:1080 fmt:yuv422p10le sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x4
[libx264 @ 0x1d4f1a0] using mv_range_thread = 24
[libx264 @ 0x1d4f1a0] using SAR=1/1
[libx264 @ 0x1d4f1a0] frame MB size (80x45) > level limit (1620)
[libx264 @ 0x1d4f1a0] MB rate (90000) > level limit (40500)
[libx264 @ 0x1d4f1a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x1d4f1a0] profile Constrained Baseline, level 3.0
[libx264 @ 0x1d4f1a0] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=22 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 94 times
[Parsed_aformat_1 @ 0x2559500] Setting 'sample_fmts' to value 's16'
[Parsed_aformat_1 @ 0x2559500] Setting 'channel_layouts' to value 'stereo'
[graph_0_in_0_0 @ 0x257c7c0] Setting 'time_base' to value '1/48000'
[graph_0_in_0_0 @ 0x257c7c0] Setting 'sample_rate' to value '48000'
[graph_0_in_0_0 @ 0x257c7c0] Setting 'sample_fmt' to value 's16'
[graph_0_in_0_0 @ 0x257c7c0] Setting 'channel_layout' to value '0x4'
[graph_0_in_0_0 @ 0x257c7c0] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x4
[graph_0_in_0_2 @ 0x25820a0] Setting 'time_base' to value '1/48000'
[graph_0_in_0_2 @ 0x25820a0] Setting 'sample_rate' to value '48000'
[graph_0_in_0_2 @ 0x25820a0] Setting 'sample_fmt' to value 's16'
[graph_0_in_0_2 @ 0x25820a0] Setting 'channel_layout' to value '0x4'
[graph_0_in_0_2 @ 0x25820a0] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x4
[format_out_0_0 @ 0x2580ce0] Setting 'sample_fmts' to value 's16'
[format_out_0_0 @ 0x2580ce0] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000'
[format_out_0_0 @ 0x2580ce0] Setting 'channel_layouts' to value '0x4|0x3|0x7|0x107|0x37|0x3f|0xff|0x63f'
[Parsed_amerge_0 @ 0x1c6edc0] No channel layout for input 1
[AVFilterGraph @ 0x1c8abc0] query_formats: 5 queried, 6 merged, 0 already done, 9 delayed
[AVFilterGraph @ 0x1c8abc0] query_formats not finished
[Parsed_amerge_0 @ 0x1c6edc0] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
[AVFilterGraph @ 0x1c8abc0] query_formats: 1 queried, 9 merged, 6 already done, 0 delayed
[Parsed_amerge_0 @ 0x1c6edc0] in0:mono + in1:mono -> out:stereo
[libfdk_aac @ 0x1d4e300] Note, the VBR setting is unsupported and only works with some parameter combinations
Output #0, mp4, to 'A066C002_170619NU_CANON.mp4':
Metadata:
timecode : 05:45:28:08
com.apple.quicktime.creationdate: 2017-06-19T13:12:13+0300
com.apple.proapps.manufacturer: CANON
com.apple.quicktime.make: CANON
com.apple.proapps.mio.cameraName: EOS C300 Mark II
com.apple.proapps.cameraname: EOS C300 Mark II
com.apple.quicktime.model: EOS C300 Mark II
com.apple.quicktime.camera.identifier: 060e2b34-0401-010d-0e15-0056454f0200
com.divergentmedia.editready.timecodeStart: 05:45:28:08
com.divergentmedia.editready.sonyXDCamTC: 05:45:28:08
com.divergentmedia.editReady.version: EditReady 1.4.9, 798
com.apple.proapps.studio.metadataFieldDominanceOverride: 1
date : 2017-06-19T13:12:13+0300
date-eng : 2017-06-19T13:12:13+0300
make : CANON
make-eng : CANON
model : EOS C300 Mark II
model-eng : EOS C300 Mark II
title : Test movie
encoder : Lavf57.75.100
Stream #0:0, 0, 1/48000: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, delay 2048 (default)
Metadata:
encoder : Lavc57.100.103 libfdk_aac
Stream #0:1(eng), 0, 1/12800: Video: h264 (libx264), 1 reference frame (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 0/1, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
creation_time : 2017-06-21T11:52:58.000000Z
handler_name : Apple Alias Data Handler
encoder : Lavc57.100.103 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 2 times
Clipping frame in rate conversion by 0.000008
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 201 times
cur_dts is invalid (this is harmless if it occurs once at the start per stream) 0x
Last message repeated 157 times
cur_dts is invalid (this is harmless if it occurs once at the start per stream) 0x
[libx264 @ 0x1d4f1a0] frame= 0 QP=19.02 NAL=3 Slice:I Poc:0 I:3600 P:0 SKIP:0 size=49899 bytes
Error while filtering: Cannot allocate memory
[libx264 @ 0x1d4f1a0] frame= 1 QP=19.20 NAL=2 Slice:P Poc:2 I:14 P:2118 SKIP:1468 size=6808 bytes
[libx264 @ 0x1d4f1a0] frame= 2 QP=18.86 NAL=2 Slice:P Poc:4 I:15 P:2339 SKIP:1246 size=7088 bytes
[libx264 @ 0x1d4f1a0] frame= 3 QP=19.08 NAL=2 Slice:P Poc:6 I:9 P:2449 SKIP:1142 size=7341 bytes
[libx264 @ 0x1d4f1a0] frame= 4 QP=18.92 NAL=2 Slice:P Poc:8 I:5 P:2482 SKIP:1113 size=7725 bytes
[libx264 @ 0x1d4f1a0] frame= 5 QP=18.73 NAL=2 Slice:P Poc:10 I:6 P:2100 SKIP:1494 size=6831 bytes
[libx264 @ 0x1d4f1a0] frame= 6 QP=18.73 NAL=2 Slice:P Poc:12 I:4 P:2492 SKIP:1104 size=8298 bytes
[libx264 @ 0x1d4f1a0] frame= 7 QP=18.52 NAL=2 Slice:P Poc:14 I:1 P:2397 SKIP:1202 size=7250 bytes
[libx264 @ 0x1d4f1a0] frame= 8 QP=18.51 NAL=2 Slice:P Poc:16 I:7 P:1523 SKIP:2070 size=5344 bytes
[libx264 @ 0x1d4f1a0] frame= 9 QP=18.51 NAL=2 Slice:P Poc:18 I:6 P:2398 SKIP:1196 size=7865 bytes
[libx264 @ 0x1d4f1a0] frame= 10 QP=18.58 NAL=2 Slice:P Poc:20 I:1 P:1840 SKIP:1759 size=6451 bytes
[libx264 @ 0x1d4f1a0] frame= 11 QP=18.58 NAL=2 Slice:P Poc:22 I:5 P:1764 SKIP:1831 size=6159 bytes
[libx264 @ 0x1d4f1a0] frame= 12 QP=18.52 NAL=2 Slice:P Poc:24 I:3 P:2421 SKIP:1176 size=8151 bytes
[libx264 @ 0x1d4f1a0] frame= 13 QP=18.51 NAL=2 Slice:P Poc:26 I:1 P:1892 SKIP:1707 size=6476 bytes
[libx264 @ 0x1d4f1a0] frame= 14 QP=18.41 NAL=2 Slice:P Poc:28 I:3 P:1919 SKIP:1678 size=6431 bytes
[libx264 @ 0x1d4f1a0] frame= 15 QP=18.48 NAL=2 Slice:P Poc:30 I:1 P:1255 SKIP:2344 size=4060 bytes
[libx264 @ 0x1d4f1a0] frame= 16 QP=18.79 NAL=2 Slice:P Poc:32 I:2 P:1373 SKIP:2225 size=4398 bytes
[libx264 @ 0x1d4f1a0] frame= 17 QP=18.77 NAL=2 Slice:P Poc:34 I:2 P:1459 SKIP:2139 size=4480 bytes
[libx264 @ 0x1d4f1a0] frame= 18 QP=19.01 NAL=2 Slice:P Poc:36 I:7 P:1658 SKIP:1935 size=5003 bytes
[libx264 @ 0x1d4f1a0] scene cut at 48 Icost:227110 Pcost:199261 ratio:0.1226 bias:0.1307 gop:48 (imb:3134 pmb:220)
[libx264 @ 0x1d4f1a0] frame= 19 QP=18.95 NAL=2 Slice:P Poc:38 I:0 P:2461 SKIP:1139 size=7169 bytes
[libx264 @ 0x1d4f1a0] frame= 20 QP=19.01 NAL=2 Slice:P Poc:40 I:1 P:2118 SKIP:1481 size=6048 bytes
[libx264 @ 0x1d4f1a0] frame= 21 QP=19.04 NAL=2 Slice:P Poc:42 I:0 P:2114 SKIP:1486 size=5838 bytes
[libx264 @ 0x1d4f1a0] frame= 22 QP=18.97 NAL=2 Slice:P Poc:44 I:3 P:2277 SKIP:1320 size=5952 bytes
[libx264 @ 0x1d4f1a0] frame= 23 QP=19.12 NAL=2 Slice:P Poc:46 I:0 P:1658 SKIP:1942 size=4813 bytes
[libx264 @ 0x1d4f1a0] frame= 24 QP=19.33 NAL=2 Slice:P Poc:48 I:0 P:1926 SKIP:1674 size=5503 bytes
[libx264 @ 0x1d4f1a0] frame= 25 QP=19.25 NAL=2 Slice:P Poc:50 I:0 P:2470 SKIP:1130 size=6478 bytes
[libx264 @ 0x1d4f1a0] frame= 26 QP=19.21 NAL=2 Slice:P Poc:52 I:0 P:2589 SKIP:1011 size=6985 bytes
[libx264 @ 0x1d4f1a0] frame= 27 QP=19.12 NAL=2 Slice:P Poc:54 I:0 P:2312 SKIP:1288 size=6381 bytes
[libx264 @ 0x1d4f1a0] frame= 28 QP=19.20 NAL=2 Slice:P Poc:56 I:2 P:2532 SKIP:1066 size=7296 bytes
[libx264 @ 0x1d4f1a0] frame= 29 QP=19.01 NAL=2 Slice:P Poc:58 I:0 P:2611 SKIP:989 size=8186 bytes
[libx264 @ 0x1d4f1a0] frame= 30 QP=18.95 NAL=2 Slice:P Poc:60 I:0 P:2582 SKIP:1018 size=7610 bytes
[libx264 @ 0x1d4f1a0] frame= 31 QP=19.02 NAL=2 Slice:P Poc:62 I:2 P:2620 SKIP:978 size=8077 bytes
[libx264 @ 0x1d4f1a0] frame= 32 QP=19.09 NAL=2 Slice:P Poc:64 I:1 P:1989 SKIP:1610 size=6214 bytes
[libx264 @ 0x1d4f1a0] frame= 33 QP=19.09 NAL=2 Slice:P Poc:66 I:0 P:2483 SKIP:1117 size=7027 bytes
[libx264 @ 0x1d4f1a0] frame= 34 QP=19.17 NAL=2 Slice:P Poc:68 I:0 P:2477 SKIP:1123 size=6833 bytes
[libx264 @ 0x1d4f1a0] frame= 35 QP=19.07 NAL=2 Slice:P Poc:70 I:1 P:2373 SKIP:1226 size=6915 bytes
[libx264 @ 0x1d4f1a0] frame= 36 QP=19.28 NAL=2 Slice:P Poc:72 I:3 P:2400 SKIP:1197 size=6975 bytes
[libx264 @ 0x1d4f1a0] frame= 37 QP=19.21 NAL=2 Slice:P Poc:74 I:1 P:2643 SKIP:956 size=7505 bytes
[libx264 @ 0x1d4f1a0] frame= 38 QP=19.40 NAL=2 Slice:P Poc:76 I:0 P:2289 SKIP:1311 size=6682 bytes
[libx264 @ 0x1d4f1a0] frame= 39 QP=19.52 NAL=2 Slice:P Poc:78 I:1 P:2074 SKIP:1525 size=5823 bytes
[libx264 @ 0x1d4f1a0] frame= 40 QP=19.72 NAL=2 Slice:P Poc:80 I:2 P:2420 SKIP:1178 size=6552 bytes
[libx264 @ 0x1d4f1a0] frame= 41 QP=19.99 NAL=2 Slice:P Poc:82 I:274 P:2019 SKIP:1307 size=7398 bytes
[libx264 @ 0x1d4f1a0] frame= 42 QP=19.77 NAL=2 Slice:P Poc:84 I:545 P:1946 SKIP:1109 size=7933 bytes
[libx264 @ 0x1d4f1a0] frame= 43 QP=19.52 NAL=2 Slice:P Poc:86 I:523 P:1969 SKIP:1108 size=7596 bytes
[libx264 @ 0x1d4f1a0] frame= 44 QP=19.25 NAL=2 Slice:P Poc:88 I:649 P:1303 SKIP:1648 size=6070 bytes
[libx264 @ 0x1d4f1a0] frame= 45 QP=18.80 NAL=2 Slice:P Poc:90 I:949 P:1115 SKIP:1536 size=6608 bytes
[libx264 @ 0x1d4f1a0] frame= 46 QP=18.51 NAL=2 Slice:P Poc:92 I:915 P:1141 SKIP:1544 size=6499 bytes
[libx264 @ 0x1d4f1a0] frame= 47 QP=18.38 NAL=2 Slice:P Poc:94 I:882 P:1071 SKIP:1647 size=6326 bytes
[libx264 @ 0x1d4f1a0] frame= 48 QP=15.38 NAL=3 Slice:I Poc:0 I:3600 P:0 SKIP:0 size=15254 bytes
[libx264 @ 0x1d4f1a0] frame= 49 QP=18.47 NAL=2 Slice:P Poc:2 I:870 P:1178 SKIP:1552 size=9327 bytes
[libx264 @ 0x1d4f1a0] frame= 50 QP=18.35 NAL=2 Slice:P Poc:4 I:691 P:1606 SKIP:1303 size=9056 bytes
[libx264 @ 0x1d4f1a0] frame= 51 QP=18.56 NAL=2 Slice:P Poc:6 I:567 P:1697 SKIP:1336 size=9923 bytes
[libx264 @ 0x1d4f1a0] frame= 52 QP=18.72 NAL=2 Slice:P Poc:8 I:500 P:1725 SKIP:1375 size=10632 bytes
[libx264 @ 0x1d4f1a0] frame= 53 QP=18.46 NAL=2 Slice:P Poc:10 I:537 P:1789 SKIP:1274 size=9973 bytes
[libx264 @ 0x1d4f1a0] frame= 54 QP=18.55 NAL=2 Slice:P Poc:12 I:478 P:1916 SKIP:1206 size=10196 bytes
[libx264 @ 0x1d4f1a0] frame= 55 QP=18.68 NAL=2 Slice:P Poc:14 I:446 P:2027 SKIP:1127 size=10172 bytes
[libx264 @ 0x1d4f1a0] frame= 56 QP=19.00 NAL=2 Slice:P Poc:16 I:284 P:2138 SKIP:1178 size=9705 bytes
[libx264 @ 0x1d4f1a0] frame= 57 QP=19.10 NAL=2 Slice:P Poc:18 I:244 P:2116 SKIP:1240 size=9518 bytes
[libx264 @ 0x1d4f1a0] frame= 58 QP=19.39 NAL=2 Slice:P Poc:20 I:239 P:2231 SKIP:1130 size=8953 bytes
[libx264 @ 0x1d4f1a0] frame= 59 QP=19.16 NAL=2 Slice:P Poc:22 I:178 P:2379 SKIP:1043 size=9059 bytes
[libx264 @ 0x1d4f1a0] frame= 60 QP=19.28 NAL=2 Slice:P Poc:24 I:58 P:2329 SKIP:1213 size=8257 bytes
[libx264 @ 0x1d4f1a0] frame= 61 QP=19.21 NAL=2 Slice:P Poc:26 I:34 P:2231 SKIP:1335 size=6689 bytes
[libx264 @ 0x1d4f1a0] frame= 62 QP=19.55 NAL=2 Slice:P Poc:28 I:14 P:2219 SKIP:1367 size=6164 bytes
[libx264 @ 0x1d4f1a0] frame= 63 QP=20.04 NAL=2 Slice:P Poc:30 I:8 P:1836 SKIP:1756 size=4318 bytes
[mp4 @ 0x1d4c880] Starting second pass: moving the moov atom to the beginning of the file
[mp4 @ 0x1d4c880] Opening 'A066C002_170619NU_CANON.mp4' for reading
[file @ 0xa01a460] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x6b95260] Statistics: 509968 bytes read, 0 seeks
frame= 64 fps= 48 q=-1.0 Lsize= 500kB time=00:00:02.52 bitrate=1625.5kbits/s speed=1.88x
video:497kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.417128%
Input file #0 (A066C002_170619NU_CANON.mov):
Input stream #0:0 (audio): 141 packets read (288000 bytes); 141 frames decoded (144000 samples);
Input stream #0:1 (audio): 47 packets read (96000 bytes);
Input stream #0:2 (audio): 141 packets read (288000 bytes); 141 frames decoded (144000 samples);
Input stream #0:3 (audio): 1 packets read (2048 bytes);
Input stream #0:4 (data): 1 packets read (4 bytes);
Input stream #0:5 (video): 64 packets read (59520416 bytes); 64 frames decoded;
Total: 395 packets (60194468 bytes) demuxed
Output file #0 (A066C002_170619NU_CANON.mp4):
Output stream #0:0 (audio): 1 frames encoded (1024 samples); 3 packets muxed (740 bytes);
Output stream #0:1 (video): 64 frames encoded; 64 packets muxed (509175 bytes);
Total: 67 packets (509915 bytes) muxed
346 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x1c71880] Statistics: 4 seeks, 7 writeouts
[libx264 @ 0x1d4f1a0] frame I:2 Avg QP:17.20 size: 32576
[libx264 @ 0x1d4f1a0] frame P:62 Avg QP:18.99 size: 7152
[libx264 @ 0x1d4f1a0] mb I I16..4: 49.2% 0.0% 50.8%
[libx264 @ 0x1d4f1a0] mb P I16..4: 3.5% 0.0% 1.0% P16..4: 45.1% 8.4% 3.5% 0.0% 0.0% skip:38.5%
[libx264 @ 0x1d4f1a0] coded y,uvDC,uvAC intra: 30.7% 30.5% 4.8% inter: 7.0% 19.1% 0.3%
[libx264 @ 0x1d4f1a0] i16 v,h,dc,p: 47% 21% 9% 23%
[libx264 @ 0x1d4f1a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 18% 18% 5% 6% 4% 5% 4% 3%
[libx264 @ 0x1d4f1a0] i8c dc,h,v,p: 72% 11% 15% 2%
[libx264 @ 0x1d4f1a0] ref P L0: 63.8% 36.2%
[libx264 @ 0x1d4f1a0] kb/s:1589.21
[AVIOContext @ 0x1c583a0] Statistics: 61656934 bytes read, 59 seeksI happen to be absolute beginner (at least in ffmpeg). What went wrong ?
Thanks ! Andres Mere
-
ffmpeg 1FPS extraction call spits out infinite images until disk is bricked on poorly-encoded movie
12 juillet 2017, par John AllardThis is one of the oddest things I’ve ever seen while using ffmpeg.
This is the scenario - we are getting video footage from a IONODE ION-E100 encoder, the footage is encoded in h264. I can view the footage fine in VLC, and I can copy it over to another video using
ffmpeg
and-c:v copy
. The issue arises when I try and extract one FPS from the movie using the following command :ffmpeg -i testmovie.mp4 -r 1 -vf 640:-2 -q:v 18 -loglevel error /tmp/tmp/extraction_%04d.jpeg
What this should do is go through the movie and extract one frame per second, then dump the frames to the files
/tmp/tmp/extraction_0001.jpeg, /tmp/tmp/extraction_0002.jpeg, ..., /tmp/tmp/extraction_000X.jpeg
. It should end when it reaches the end of the video.Now the odd thing that happens when I run this command is that it will run in a tight loop, writing tens or hundreds of thousands of images to the disk until the disk is full at which point the command fails. All of the extracted images are the exact same as one another.
Here is the ffmpeg stats output on the video
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/john/ionode/test2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : /videoinput_1:0/h264_1/media.stm
encoder : Lavf57.56.100
Duration: 00:00:16.52, start: -9791.427750, bitrate: 2165 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2119 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 236 kb/s (default)
Metadata:
handler_name : SoundHandler(notice the
start: -9791.427750
value, what is this ?)Here are the encoding details on the footage :
{
"programs": [
],
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High",
"codec_type": "video",
"codec_time_base": "1/50",
"codec_tag_string": "avc1",
"codec_tag": "0x31637661",
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1080,
"has_b_frames": 2,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuv420p",
"level": 40,
"chroma_location": "left",
"refs": 1,
"is_avc": "true",
"nal_length_size": "4",
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"time_base": "1/12800",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 211456,
"duration": "16.520000",
"bit_rate": "2119813",
"bits_per_raw_sample": "8",
"nb_frames": "413",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "und",
"handler_name": "VideoHandler"
}
}
]
}Here a link to the sample video to use : http://s000.tinyupload.com/?file_id=03169189167771012515
(it’s a 5MB video file)The only clues I have as to what is actually going on is the error output
from the command that grabs the video from the encoder :[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823640, current: -630275919; changing to -629823639. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823639, current: -630274895; changing to -629823638. This may result in incorrect timestamps in the output file.
frame= 124 fps= 21 q=28.0 size= 41kB time=00:00:02.60 bitrate= 128.8kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823638, current: -630273871; changing to -629823637. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823637, current: -630272847; changing to -629823636. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823636, current: -630271824; changing to -629823635. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823635, current: -630270800; changing to -629823634. This may result in incorrect timestamps in the output file.
frame= 124 fps= 19 q=28.0 size= 43kB time=00:00:02.60 bitrate= 137.0kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823634, current: -630269776; changing to -629823633. This may result in incorrect timestamps in the output file.
[aac @ 0x7faa1a832000] Queue input is backward in time
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823633, current: -630268752; changing to -629823632. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823632, current: -630267728; changing to -629823631. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823631, current: -630513833; changing to -629823630. This may result in incorrect timestamps in the output file.
frame= 124 fps= 18 q=28.0 size= 46kB time=00:00:02.60 bitrate= 145.4kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823630, current: -630512810; changing to -629823629. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823629, current: -630511786; changing to -629823628. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823628, current: -630510762; changing to -629823627. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823627, current: -630509738; changing to -629823626. This may result in incorrect timestamps in the output file.
frame= 124 fps= 17 q=28.0 size= 49kB time=00:00:02.60 bitrate= 153.6kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823626, current: -630508714; changing to -629823625. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823625, current: -630507690; changing to -629823624. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823624, current: -630506667; changing to -629823623. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823623, current: -630505643; changing to -629823622. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823622, current: -630504619; changing to -629823621. This may result in incorrect timestamps in the output file.
frame= 124 fps= 16 q=28.0 size= 52kB time=00:00:02.60 bitrate= 163.5kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823621, current: -630503595; changing to -629823620. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823620, current: -630502571; changing to -629823619. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823619, current: -630501548; changing to -629823618. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823618, current: -630500524; changing to -629823617. This may result in incorrect timestamps in the output file.
frame= 124 fps= 15 q=28.0 size= 54kB time=00:00:02.60 bitrate= 171.4kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823617, current: -630499500; changing to -629823616. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823616, current: -630498476; changing to -629823615. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823615, current: -630497452; changing to -629823614. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823614, current: -630496428; changing to -629823613. This may result in incorrect timestamps in the output file.
frame= 124 fps= 14 q=28.0 size= 57kB time=00:00:02.60 bitrate= 179.3kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823613, current: -630495405; changing to -629823612. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823612, current: -630494381; changing to -629823611. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823611, current: -630493357; changing to -629823610. This may result in incorrect timestamps in the output file.
frame= 124 fps= 13 q=28.0 size= 59kB time=00:00:02.60 bitrate= 185.6kbits/s dup=26 drop=4 spee[aac @ 0x7faa1a832000] Queue input is backward in time
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823610, current: -630492333; changing to -629823609. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823609, current: -630491309; changing to -629823608. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823608, current: -630736398; changing to -629823607. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823607, current: -630735375; changing to -629823606. This may result in incorrect timestamps in the output file.
frame= 124 fps= 12 q=28.0 size= 61kB time=00:00:02.60 bitrate= 193.5kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823606, current: -630734351; changing to -629823605. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823605, current: -630733327; changing to -629823604. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823604, current: -630732303; changing to -629823603. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823603, current: -630731279; changing to -629823602. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823602, current: -630730256; changing to -629823601. This may result in incorrect timestamps in the output file.
frame= 124 fps= 12 q=-1.0 Lsize= 507kB time=00:00:04.84 bitrate= 858.7kbits/s dup=26 drop=4 speed=0.453xSo my question is, why does this video break ffmpeg ? Why does ffmpeg get caught up in a tight loop extracting images without ever making any progres towards the end of the video ?