Detect Frozen video

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

Detect Frozen video

José María Infanzón
Hi All, I'm streaming a live channel and I want to use ffmpeg to monitor
the stream, what I need to check is when the image is frozen. Is there a
way yo achieve this? I've read that I can use blend function, but not sure
how.

Thanks!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Detect Frozen video

Michael Shaffer
I don't know if there is a way to use ffmpeg to do it. I use a little
program I made to monitor the bandwidth and if it drops off it restarts the
stream. I'm using Ubuntu Linux and Python with the sysdig command to get
the bandwidth of each individual ffmpeg process. I have 5 ffmpeg's going at
once so this way I can restart only the one that crashes. With Windows you
can only get the bandwidth of the entire network card.

On Wed, Nov 28, 2018 at 6:46 AM José María Infanzón <[hidden email]>
wrote:

> Hi All, I'm streaming a live channel and I want to use ffmpeg to monitor
> the stream, what I need to check is when the image is frozen. Is there a
> way yo achieve this? I've read that I can use blend function, but not sure
> how.
>
> Thanks!
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Detect Frozen video

Mustafa Al Ani
Hi Michael,

I'm interested in your way of monitoring the bandwidth, can you share more
info please?

Regards,
Mustafa

On Wed, Nov 28, 2018 at 1:16 PM Michael Shaffer <[hidden email]>
wrote:

> I don't know if there is a way to use ffmpeg to do it. I use a little
> program I made to monitor the bandwidth and if it drops off it restarts the
> stream. I'm using Ubuntu Linux and Python with the sysdig command to get
> the bandwidth of each individual ffmpeg process. I have 5 ffmpeg's going at
> once so this way I can restart only the one that crashes. With Windows you
> can only get the bandwidth of the entire network card.
>
> On Wed, Nov 28, 2018 at 6:46 AM José María Infanzón <[hidden email]>
> wrote:
>
> > Hi All, I'm streaming a live channel and I want to use ffmpeg to monitor
> > the stream, what I need to check is when the image is frozen. Is there a
> > way yo achieve this? I've read that I can use blend function, but not
> sure
> > how.
> >
> > Thanks!
> > _______________________________________________
> > ffmpeg-user mailing list
> > [hidden email]
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > [hidden email] with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Detect Frozen video

Martin Vignali
In reply to this post by José María Infanzón
Le mer. 28 nov. 2018 à 12:46, José María Infanzón <[hidden email]> a
écrit :

> Hi All, I'm streaming a live channel and I want to use ffmpeg to monitor
> the stream, what I need to check is when the image is frozen. Is there a
> way yo achieve this? I've read that I can use blend function, but not sure
> how.
>
>
A freeze detect filter have been recently add :
https://www.ffmpeg.org/ffmpeg-filters.html#freezedetect

Martin
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Detect Frozen video

José María Infanzón
Hi Martin,

El mié., 28 nov. 2018 a las 9:37, Martin Vignali
(<[hidden email]>) escribió:

>>
>> Le mer. 28 nov. 2018 à 12:46, José María Infanzón <[hidden email]> a
>> écrit :
>>
>> > Hi All, I'm streaming a live channel and I want to use ffmpeg to monitor
>> > the stream, what I need to check is when the image is frozen. Is there a
>> > way yo achieve this? I've read that I can use blend function, but not sure
>> > how.
>> >
>> >
>> A freeze detect filter have been recently add :
>> https://www.ffmpeg.org/ffmpeg-filters.html#freezedetect
> In which version? I've compiled ffmpeg 4.1, and the filter is not available yet:
>[AVFilterGraph @ 0x55bf7fcb2480] No such filter: 'freezedetect'
>Error reinitializing filters!
>Failed to inject frame into filter network: Invalid argument
>Error while processing the decoded data for stream #0:0
>jinfanzon@jinfanzon-MOV:~/Downloads$ ffmpeg -version
>ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers


>>
>> Martin
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".



--
José María Infanzón
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Detect Frozen video

Michael Shaffer
In reply to this post by Mustafa Al Ani
Hi Mustafa, here's a link to a zip file containing the restart program I
made.

https://github.com/mcshaf01/ffmpeg-stream-restart-tool/blob/master/ffmpeg-restart-tool-v030.zip

Setup instructions:
Make a directory called c:\ffmpeg\bin\
rename and copy ffmpeg.exe to several different ffmpeg's in the
c:\ffmpeg\bin\ folder
c:\ffmpeg\bin\ffmpeg1.exe
c:\ffmpeg\bin\ ffmpeg2.exe
c:\ffmpeg\bin\ ffmpeg3.exe
c:\ffmpeg\bin\ ffmpeg4.exe
c:\ffmpeg\bin\ ffmpeg5.exe
c:\ffmpeg\bin\ ffmpeg6.exe

In the c:\ffmpeg\bin directory, put a batch file called
c:\ffmpeg\bin\stream1.bat
c:\ffmpeg\bin\stream2.bat
c:\ffmpeg\bin\stream3.bat
c:\ffmpeg\bin\stream4.bat
c:\ffmpeg\bin\stream5.bat
c:\ffmpeg\bin\stream6.bat

Put the ffmpeg command for each stream in each batch file
For instance my stream1.bat looks like this

c:\ffmpeg\bin\ffmpeg1.exe -re -rtsp_transport tcp -i "rtsp://
admin:password@201.58.112.10:554/VideoInput/1/h264/1" -f lavfi -f dshow
-rtbufsize 2000M -thread_queue_size 5096 -i audio="virtual-audio-capturer"
-c:a libmp3lame -ab 128k -ar 44100 -c:v copy -threads 0 -bufsize 512k -f
flv "rtmp://a.rtmp.youtube.com/live2/bfbp-3e10-sdh2-3hgj"

If you only have one stream you can just create the ffmpeg1.exe and
stream1.bat. It will give an error though if you try to start one of the
other streams and you didn't make the ffmpeg and batch file for it.

Here's a picture with some instructions.
https://github.com/mcshaf01/ffmpeg-stream-restart-tool/blob/master/instructions.jpg


On Wed, Nov 28, 2018 at 7:19 AM Mustafa Al Ani <[hidden email]>
wrote:

> Hi Michael,
>
> I'm interested in your way of monitoring the bandwidth, can you share more
> info please?
>
> Regards,
> Mustafa
>
> On Wed, Nov 28, 2018 at 1:16 PM Michael Shaffer <[hidden email]>
> wrote:
>
> > I don't know if there is a way to use ffmpeg to do it. I use a little
> > program I made to monitor the bandwidth and if it drops off it restarts
> the
> > stream. I'm using Ubuntu Linux and Python with the sysdig command to get
> > the bandwidth of each individual ffmpeg process. I have 5 ffmpeg's going
> at
> > once so this way I can restart only the one that crashes. With Windows
> you
> > can only get the bandwidth of the entire network card.
> >
> > On Wed, Nov 28, 2018 at 6:46 AM José María Infanzón <[hidden email]
> >
> > wrote:
> >
> > > Hi All, I'm streaming a live channel and I want to use ffmpeg to
> monitor
> > > the stream, what I need to check is when the image is frozen. Is there
> a
> > > way yo achieve this? I've read that I can use blend function, but not
> > sure
> > > how.
> > >
> > > Thanks!
> > > _______________________________________________
> > > ffmpeg-user mailing list
> > > [hidden email]
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> > >
> > > To unsubscribe, visit link above, or email
> > > [hidden email] with subject "unsubscribe".
> > _______________________________________________
> > ffmpeg-user mailing list
> > [hidden email]
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > [hidden email] with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Detect Frozen video

Carl Eugen Hoyos-2
In reply to this post by José María Infanzón
2018-11-30 18:51 GMT+01:00, José María Infanzón <[hidden email]>:

>>> A freeze detect filter have been recently add :
>>> https://www.ffmpeg.org/ffmpeg-filters.html#freezedetect
>> In which version? I've compiled ffmpeg 4.1

On this mailing list, only current FFmpeg git head is
supported (your question is an explanation why).

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Detect Frozen video

Dmitry Menshikov
Hi to everyone.

I may suggest to use our opensource lib written in node.js that monitors
end-system. This module tracks frames and can detect absence of frames,
encoded bandwith and quality, network bandwith and quality.

https://github.com/LCMApps/video-quality-tools


сб, 1 дек. 2018 г., 00:36 Carl Eugen Hoyos [hidden email]:

> 2018-11-30 18:51 GMT+01:00, José María Infanzón <[hidden email]>:
>
> >>> A freeze detect filter have been recently add :
> >>> https://www.ffmpeg.org/ffmpeg-filters.html#freezedetect
> >> In which version? I've compiled ffmpeg 4.1
>
> On this mailing list, only current FFmpeg git head is
> supported (your question is an explanation why).
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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