Extracting information from ffmpeg logs when streaming

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Extracting information from ffmpeg logs when streaming

Verachten Bruno
Hi there,

I'd like to extract the number of frames pushed when streaming with ffmpeg
to a RTMP server.
For the time being, I can see the number of frames in the console, and I
read that the -report option could redirect that information to a file.
I could then parse the file, and extract the frame numbers.
Is there anything more straightforward?

Thanks.
--
Bruno Verachten
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Extracting information from ffmpeg logs when streaming

Verachten Bruno
Hi there,

thanks to SO, I have found an approach that gives me more or less what I
was looking for.

mkfifo ffmpeg.logfmpeg -y -f lavfi -i
testsrc=duration=10:size=1920x1080:rate=25 -progress pipe:3 null.mkv
3> ffmpeg.logcat ffmpeg.log |awk
'/^frame/{split($1,frame,"=")}/^fps/{split($1,fps,"=")}/^speed=.+x$/{split($1,speed,"=");printf
"%s|%s|%s\n", frame[2],fps[2],speed[2]}'

And I get:
35|0.0|
47|42.5|
69|42.5|0.394x
91|42.4|0.709x
113|42.6|0.904x
135|42.8|1.04x
157|42.8|1.14x
179|42.8|
201|42.8|1.26x
223|42.8|
245|42.8|1.34x
267|42.8|1.37x
289|42.8|
303|41.7|1.38x
325|41.8|
347|41.9|1.42x
369|41.9|1.44x
391|42.0|1.45x
413|42.0|1.47x
435|42.1|1.48x
457|42.1|1.49x
479|42.2|
501|42.2|1.51x
523|42.3|1.52x
545|42.3|1.53x
559|41.7|1.51x
581|41.8|1.52x
603|41.8|1.52x


Thanks.

Bruno Verachten



On Thu, Dec 5, 2019 at 9:36 PM Verachten Bruno <[hidden email]> wrote:

> Hi there,
>
> I'd like to extract the number of frames pushed when streaming with ffmpeg
> to a RTMP server.
> For the time being, I can see the number of frames in the console, and I
> read that the -report option could redirect that information to a file.
> I could then parse the file, and extract the frame numbers.
> Is there anything more straightforward?
>
> Thanks.
> --
> Bruno Verachten
>


--
Bruno Verachten
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".