Re: [FFmpeg-user] [FFmpeg-devel] vstats info options
Hello, I have been able to get accurate bitrate stats by using the OutputStream's data_size structure in the print_report method. total_size += ost->data_size; // For enc->codec_type AVMEDIA_TYPE_VIDEO and AVMEDIA_TYPE_AUDIO. Progress reports now have valid size and bitrate for non-seekable media. This is a fallback setting on total_size if it is still not valid after avio_tell(). Does this seem ok? Is it preferrable to file a bug report or a commit for review? Thanks On Tue, Jan 3, 2017 at 8:13 PM, Kamaldeep Tumkurwrote: > Hello, > > It appears that the progress information is more valid for 'seek'able > media. But for live capture/encode, the frame_size and bitrate values > are not valid. If there was access to the AVPacket structure or frame > data at the time of sending the progress, we may have had reliable > size and bitrate stats. > > Also lines 1560-1562 (ffmpeg.c v3.1.1) > > total_size = avio_size(oc->pb); > if (total_size <= 0) // FIXME improve avio_size() so it works with > non seekable output too > total_size = avio_tell(oc->pb); > > Is there another possiblility here? Could you shed some light on why > the size is calculated based on seek lengths. > > Thanks > Kamal > > On Mon, Jan 2, 2017 at 5:28 PM, Kamaldeep Tumkur > wrote: >> Thanks for your suggestion on the use of progress. This is definitely >> a user question. Though some further questions are: >> >> frame=4866 >> fps=24.1 >> stream_0_0_q=32.0 >> bitrate=N/A >> total_size=N/A >> out_time_ms=202688000 >> out_time=00:03:22.688000 >> dup_frames=0 >> drop_frames=0 >> speed= 1x >> progress=continue >> >> >> There is no valid bitrate information. vstats always returns a valid >> bitrate-per-frame and an avg-bitrate-per-sec value. Is there a way to >> get the current bitrate consistently? >> >> Are the assessments in the following ticket accurate? >> https://trac.ffmpeg.org/ticket/5288 >> >> Going to look at having my application reliably use progress data. >> >> Thanks >> Kamal >> >> On Mon, Jan 2, 2017 at 1:44 PM, Marton Balint wrote: >>> >>> On Mon, 2 Jan 2017, Marton Balint wrote: >>> On Mon, 2 Jan 2017, Kamaldeep Tumkur wrote: > Hello, > > Is there a possibility to provide the option to write vstats info from > an encoding session remotely, say to another DB or to memory from > where it can be handled by another process. > > The only possibility for consuming vstats info in real-time seems to > be to have some kind of watch+notifier that will act upon > modifications to the vstats log file. I want to be able to use these > stats from a live encoding session for other purposes. Please suggest. > Would you accept patches to ffmpeg.c so that it would provide more > options to export the vstats info? Thanks for the time. Have you checked the -progress option? >>> >>> Also please respond on ffmpeg-user mailing list, as this question clearly >>> belongs there. >>> >>> Thanks, >>> >>> Marton >>> ___ >>> ffmpeg-devel mailing list >>> ffmpeg-de...@ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] [FFmpeg-devel] vstats info options
Hello, It appears that the progress information is more valid for 'seek'able media. But for live capture/encode, the frame_size and bitrate values are not valid. If there was access to the AVPacket structure or frame data at the time of sending the progress, we may have had reliable size and bitrate stats. Also lines 1560-1562 (ffmpeg.c v3.1.1) total_size = avio_size(oc->pb); if (total_size <= 0) // FIXME improve avio_size() so it works with non seekable output too total_size = avio_tell(oc->pb); Is there another possiblility here? Could you shed some light on why the size is calculated based on seek lengths. Thanks Kamal On Mon, Jan 2, 2017 at 5:28 PM, Kamaldeep Tumkurwrote: > Thanks for your suggestion on the use of progress. This is definitely > a user question. Though some further questions are: > > frame=4866 > fps=24.1 > stream_0_0_q=32.0 > bitrate=N/A > total_size=N/A > out_time_ms=202688000 > out_time=00:03:22.688000 > dup_frames=0 > drop_frames=0 > speed= 1x > progress=continue > > > There is no valid bitrate information. vstats always returns a valid > bitrate-per-frame and an avg-bitrate-per-sec value. Is there a way to > get the current bitrate consistently? > > Are the assessments in the following ticket accurate? > https://trac.ffmpeg.org/ticket/5288 > > Going to look at having my application reliably use progress data. > > Thanks > Kamal > > On Mon, Jan 2, 2017 at 1:44 PM, Marton Balint wrote: >> >> On Mon, 2 Jan 2017, Marton Balint wrote: >> >>> >>> On Mon, 2 Jan 2017, Kamaldeep Tumkur wrote: >>> Hello, Is there a possibility to provide the option to write vstats info from an encoding session remotely, say to another DB or to memory from where it can be handled by another process. The only possibility for consuming vstats info in real-time seems to be to have some kind of watch+notifier that will act upon modifications to the vstats log file. I want to be able to use these stats from a live encoding session for other purposes. Please suggest. Would you accept patches to ffmpeg.c so that it would provide more options to export the vstats info? Thanks for the time. >>> >>> >>> Have you checked the -progress option? >>> >> >> Also please respond on ffmpeg-user mailing list, as this question clearly >> belongs there. >> >> Thanks, >> >> Marton >> ___ >> ffmpeg-devel mailing list >> ffmpeg-de...@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] [FFmpeg-devel] vstats info options
Thanks for your suggestion on the use of progress. This is definitely a user question. Though some further questions are: frame=4866 fps=24.1 stream_0_0_q=32.0 bitrate=N/A total_size=N/A out_time_ms=202688000 out_time=00:03:22.688000 dup_frames=0 drop_frames=0 speed= 1x progress=continue There is no valid bitrate information. vstats always returns a valid bitrate-per-frame and an avg-bitrate-per-sec value. Is there a way to get the current bitrate consistently? Are the assessments in the following ticket accurate? https://trac.ffmpeg.org/ticket/5288 Going to look at having my application reliably use progress data. Thanks Kamal On Mon, Jan 2, 2017 at 1:44 PM, Marton Balintwrote: > > On Mon, 2 Jan 2017, Marton Balint wrote: > >> >> On Mon, 2 Jan 2017, Kamaldeep Tumkur wrote: >> >>> Hello, >>> >>> Is there a possibility to provide the option to write vstats info from >>> an encoding session remotely, say to another DB or to memory from >>> where it can be handled by another process. >>> >>> The only possibility for consuming vstats info in real-time seems to >>> be to have some kind of watch+notifier that will act upon >>> modifications to the vstats log file. I want to be able to use these >>> stats from a live encoding session for other purposes. Please suggest. >>> Would you accept patches to ffmpeg.c so that it would provide more >>> options to export the vstats info? Thanks for the time. >> >> >> Have you checked the -progress option? >> > > Also please respond on ffmpeg-user mailing list, as this question clearly > belongs there. > > Thanks, > > Marton > ___ > ffmpeg-devel mailing list > ffmpeg-de...@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] [FFmpeg-devel] vstats info options
Thanks for your suggestion on the use of progress. This is definitely a user question. Though some further questions are: frame=4866 fps=24.1 stream_0_0_q=32.0 bitrate=N/A total_size=N/A out_time_ms=202688000 out_time=00:03:22.688000 dup_frames=0 drop_frames=0 speed= 1x progress=continue There is no valid bitrate information. vstats always returns a valid bitrate-per-frame and an avg-bitrate-per-sec value. Is there a way to get the current bitrate consistently? Are the assessments in the following ticket accurate? https://trac.ffmpeg.org/ticket/5288 Going to look at having my application reliably use progress data. Thanks Kamal On Mon, Jan 2, 2017 at 1:44 PM, Marton Balintwrote: > > On Mon, 2 Jan 2017, Marton Balint wrote: > >> >> On Mon, 2 Jan 2017, Kamaldeep Tumkur wrote: >> >>> Hello, >>> >>> Is there a possibility to provide the option to write vstats info from >>> an encoding session remotely, say to another DB or to memory from >>> where it can be handled by another process. >>> >>> The only possibility for consuming vstats info in real-time seems to >>> be to have some kind of watch+notifier that will act upon >>> modifications to the vstats log file. I want to be able to use these >>> stats from a live encoding session for other purposes. Please suggest. >>> Would you accept patches to ffmpeg.c so that it would provide more >>> options to export the vstats info? Thanks for the time. >> >> >> Have you checked the -progress option? >> > > Also please respond on ffmpeg-user mailing list, as this question clearly > belongs there. > > Thanks, > > Marton > ___ > ffmpeg-devel mailing list > ffmpeg-de...@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".