Hi,

on the commandline I call

ffprobe -loglevel quiet -of compact=s=_ -select_streams v -show_entries stream=refs video.mp4

and get the result
stream_refs=1

When I add an argument, I'm presented with a different result
ffprobe -loglevel quiet -of compact=s=_ -select_streams v -show_entries stream=refs -analyze_frames video.mp4

returns
stream_refs=16


I took some time and a step debugger.
ffprobe calls a function avformat_find_stream_info from its open_input_file
Deep down there is a variable avctx that says refs=16
That information is lost.

Later, under certain conditions, - if (do_read_frames || do_read_packets) { - the video is read and decoded. Only then, refs is populated with the correct value.

I'm wondering why it is output, at all, if I call ffprobe without analyze_frames, when the value is wrong.


I saw there's the function codec_close in demux.c that calls
ret = avcodec_parameters_from_context(par_tmp, sti->avctx);
ret = avcodec_parameters_to_context(avctx_new, par_tmp);
avctx_new->pkt_timebase = sti->avctx->pkt_timebase;

This looks to me, like you are saving the timebase. Can refs be saved in a similar manner and output as the correct value without analyzing frames?


Best,
Bernhard
_______________________________________________
ffmpeg-user mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to