ffmpeg hang in background

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

ffmpeg hang in background

sailor-godkane
Hello,

I am using ffmpeg in a big project for video/audio automated processing.
Each project for processing requires lots of ffmpeg commands. Those commands
are run by a daemon written in ObjC using GnuStep.
Since it runs on the background i used -nostdin and -loglevel quiet for
production use.
To be sure i read everything on stdout and stderr to /dev/null but it should
not matter since the command does not output anything.
Everything run fine except sometimes a ffmpeg command will hang and i cannot
understand why.
Sometimes i can see a few % of cpu used by the commands but after hours it
was still there.
When it happens i have to shutdown my daemon and restart the processing. The
same command will then run fine and the process can be finished.

Details of ffmpeg (compiled from source)

ffmpeg version n4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 4.8 (SUSE Linux)
  configuration: --disable-programs --enable-ffprobe --enable-ffmpeg
--enable-libx264 --enable-gpl --enable-shared --enable-pthreads
--enable-libmp3lame --enable-pic
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100

System is :

openSUSE 13.1 - 3.11.10-29-desktop

The machine is a virtual one running on VMWare.

The command that most often hangs is

ffmpeg -nostdin -loglevel quiet -y -i front_slide_video.mov -an -r 16.000000
-c:v libx264 -preset slow -b:v 5000k -aspect 1.333333 -vf
scale=640:480,pad=640:480:0:0:black front_slide_video-rescaled.mov

But i had other commands hanging randomly as well so this is just a sample.

Since this is completely random i have no way of testing it. The command
that hang works fine if i run it manually and it runs fine most of the time
when the daemon runs it.
I upgraded from a version 2.X that was running on the previous major version
of my software. It's been a few years since i worked on it but i don't
recall hangs back in the day with version 2.

I had the same problem with 4.0.1 btw.

Thanks for your help




--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
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: ffmpeg hang in background

Paul B Mahol
On 10/10/18, sailor-godkane <[hidden email]> wrote:

> Hello,
>
> I am using ffmpeg in a big project for video/audio automated processing.
> Each project for processing requires lots of ffmpeg commands. Those commands
> are run by a daemon written in ObjC using GnuStep.
> Since it runs on the background i used -nostdin and -loglevel quiet for
> production use.
> To be sure i read everything on stdout and stderr to /dev/null but it should
> not matter since the command does not output anything.
> Everything run fine except sometimes a ffmpeg command will hang and i cannot
> understand why.
> Sometimes i can see a few % of cpu used by the commands but after hours it
> was still there.
> When it happens i have to shutdown my daemon and restart the processing. The
> same command will then run fine and the process can be finished.
>
> Details of ffmpeg (compiled from source)
>
> ffmpeg version n4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
>   built with gcc 4.8 (SUSE Linux)
>   configuration: --disable-programs --enable-ffprobe --enable-ffmpeg
> --enable-libx264 --enable-gpl --enable-shared --enable-pthreads
> --enable-libmp3lame --enable-pic
>   libavutil      56. 14.100 / 56. 14.100
>   libavcodec     58. 18.100 / 58. 18.100
>   libavformat    58. 12.100 / 58. 12.100
>   libavdevice    58.  3.100 / 58.  3.100
>   libavfilter     7. 16.100 /  7. 16.100
>   libswscale      5.  1.100 /  5.  1.100
>   libswresample   3.  1.100 /  3.  1.100
>   libpostproc    55.  1.100 / 55.  1.100
>
> System is :
>
> openSUSE 13.1 - 3.11.10-29-desktop
>
> The machine is a virtual one running on VMWare.
>
> The command that most often hangs is
>
> ffmpeg -nostdin -loglevel quiet -y -i front_slide_video.mov -an -r 16.000000
> -c:v libx264 -preset slow -b:v 5000k -aspect 1.333333 -vf
> scale=640:480,pad=640:480:0:0:black front_slide_video-rescaled.mov

What if you do not use -r parameter but fps filter explicitly in filtergraph?

>
> But i had other commands hanging randomly as well so this is just a sample.
>
> Since this is completely random i have no way of testing it. The command
> that hang works fine if i run it manually and it runs fine most of the time
> when the daemon runs it.
> I upgraded from a version 2.X that was running on the previous major version
> of my software. It's been a few years since i worked on it but i don't
> recall hangs back in the day with version 2.
>
> I had the same problem with 4.0.1 btw.
>
> Thanks for your help
>
>
>
>
> --
> Sent from: http://www.ffmpeg-archive.org/
> _______________________________________________
> 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: ffmpeg hang in background

DopeLabs
its not very well documented but ffmpeg has a daemon mode

ffmpeg -d <all your stuff> </dev/null &



> On Oct 10, 2018, at 6:56 46AM, Paul B Mahol <[hidden email]> wrote:
>
> On 10/10/18, sailor-godkane <[hidden email]> wrote:
>> Hello,
>>
>> I am using ffmpeg in a big project for video/audio automated processing.
>> Each project for processing requires lots of ffmpeg commands. Those commands
>> are run by a daemon written in ObjC using GnuStep.
>> Since it runs on the background i used -nostdin and -loglevel quiet for
>> production use.
>> To be sure i read everything on stdout and stderr to /dev/null but it should
>> not matter since the command does not output anything.
>> Everything run fine except sometimes a ffmpeg command will hang and i cannot
>> understand why.
>> Sometimes i can see a few % of cpu used by the commands but after hours it
>> was still there.
>> When it happens i have to shutdown my daemon and restart the processing. The
>> same command will then run fine and the process can be finished.
>>
>> Details of ffmpeg (compiled from source)
>>
>> ffmpeg version n4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
>>  built with gcc 4.8 (SUSE Linux)
>>  configuration: --disable-programs --enable-ffprobe --enable-ffmpeg
>> --enable-libx264 --enable-gpl --enable-shared --enable-pthreads
>> --enable-libmp3lame --enable-pic
>>  libavutil      56. 14.100 / 56. 14.100
>>  libavcodec     58. 18.100 / 58. 18.100
>>  libavformat    58. 12.100 / 58. 12.100
>>  libavdevice    58.  3.100 / 58.  3.100
>>  libavfilter     7. 16.100 /  7. 16.100
>>  libswscale      5.  1.100 /  5.  1.100
>>  libswresample   3.  1.100 /  3.  1.100
>>  libpostproc    55.  1.100 / 55.  1.100
>>
>> System is :
>>
>> openSUSE 13.1 - 3.11.10-29-desktop
>>
>> The machine is a virtual one running on VMWare.
>>
>> The command that most often hangs is
>>
>> ffmpeg -nostdin -loglevel quiet -y -i front_slide_video.mov -an -r 16.000000
>> -c:v libx264 -preset slow -b:v 5000k -aspect 1.333333 -vf
>> scale=640:480,pad=640:480:0:0:black front_slide_video-rescaled.mov
>
> What if you do not use -r parameter but fps filter explicitly in filtergraph?
>
>>
>> But i had other commands hanging randomly as well so this is just a sample.
>>
>> Since this is completely random i have no way of testing it. The command
>> that hang works fine if i run it manually and it runs fine most of the time
>> when the daemon runs it.
>> I upgraded from a version 2.X that was running on the previous major version
>> of my software. It's been a few years since i worked on it but i don't
>> recall hangs back in the day with version 2.
>>
>> I had the same problem with 4.0.1 btw.
>>
>> Thanks for your help
>>
>>
>>
>>
>> --
>> Sent from: http://www.ffmpeg-archive.org/
>> _______________________________________________
>> 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: ffmpeg hang in background

Micael Silva
In reply to this post by sailor-godkane
On Wed, Oct 10, 2018 at 10:37 AM sailor-godkane <[hidden email]> wrote:

> Hello,
>
> I am using ffmpeg in a big project for video/audio automated processing.
> Each project for processing requires lots of ffmpeg commands. Those
> commands
> are run by a daemon written in ObjC using GnuStep.
> Since it runs on the background i used -nostdin and -loglevel quiet for
> production use.
> To be sure i read everything on stdout and stderr to /dev/null but it
> should
> not matter since the command does not output anything.
> Everything run fine except sometimes a ffmpeg command will hang and i
> cannot
> understand why.
> Sometimes i can see a few % of cpu used by the commands but after hours it
> was still there.
> When it happens i have to shutdown my daemon and restart the processing.
> The
> same command will then run fine and the process can be finished.
>
> Details of ffmpeg (compiled from source)
>
> ffmpeg version n4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
>   built with gcc 4.8 (SUSE Linux)
>   configuration: --disable-programs --enable-ffprobe --enable-ffmpeg
> --enable-libx264 --enable-gpl --enable-shared --enable-pthreads
> --enable-libmp3lame --enable-pic
>   libavutil      56. 14.100 / 56. 14.100
>   libavcodec     58. 18.100 / 58. 18.100
>   libavformat    58. 12.100 / 58. 12.100
>   libavdevice    58.  3.100 / 58.  3.100
>   libavfilter     7. 16.100 /  7. 16.100
>   libswscale      5.  1.100 /  5.  1.100
>   libswresample   3.  1.100 /  3.  1.100
>   libpostproc    55.  1.100 / 55.  1.100
>
> System is :
>
> openSUSE 13.1 - 3.11.10-29-desktop
>
> The machine is a virtual one running on VMWare.
>
> The command that most often hangs is
>
> ffmpeg -nostdin -loglevel quiet -y -i front_slide_video.mov -an -r
> 16.000000
> -c:v libx264 -preset slow -b:v 5000k -aspect 1.333333 -vf
> scale=640:480,pad=640:480:0:0:black front_slide_video-rescaled.mov
>
> But i had other commands hanging randomly as well so this is just a sample.
>
> Since this is completely random i have no way of testing it. The command
> that hang works fine if i run it manually and it runs fine most of the time
> when the daemon runs it.
> I upgraded from a version 2.X that was running on the previous major
> version
> of my software. It's been a few years since i worked on it but i don't
> recall hangs back in the day with version 2.
>
> I had the same problem with 4.0.1 btw.
>
> Thanks for your help
>
>
I had similar problems since 4.0 version. I switched back to 3.4.4 and the
problem disapper.
_______________________________________________
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: ffmpeg hang in background

sailor-godkane
In reply to this post by Paul B Mahol
Could using -r with a filtergraph at the same time hang the command at
random?



--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
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: ffmpeg hang in background

Paul B Mahol
On 10/16/18, sailor-godkane <[hidden email]> wrote:
> Could using -r with a filtergraph at the same time hang the command at
> random?
>

It could produce various weird effects.
_______________________________________________
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: ffmpeg hang in background

DopeLabs
In reply to this post by sailor-godkane
never happens to me and i have many processes that use -r running in the background 24/7

they all start with

ffmpeg -d -i

and end with

-f flv rtmp://host/app/stream  </dev/null &


> On Oct 16, 2018, at 3:16 16AM, sailor-godkane <[hidden email]> wrote:
>
> Could using -r with a filtergraph at the same time hang the command at
> random?
>
>
>
> --
> Sent from: http://www.ffmpeg-archive.org/
> _______________________________________________
> 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: ffmpeg hang in background

Paul B Mahol
On 10/16/18, DopeLabs <[hidden email]> wrote:

> never happens to me and i have many processes that use -r running in the
> background 24/7
>
> they all start with
>
> ffmpeg -d -i
>
> and end with
>
> -f flv rtmp://host/app/stream  </dev/null &

Do you use filtergraphs that change pts at all?

Try with loop filters and -r and you will get fancy effect.


>
>
>> On Oct 16, 2018, at 3:16 16AM, sailor-godkane <[hidden email]> wrote:
>>
>> Could using -r with a filtergraph at the same time hang the command at
>> random?
>>
>>
>>
>> --
>> Sent from: http://www.ffmpeg-archive.org/
>> _______________________________________________
>> 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: ffmpeg hang in background

DopeLabs
here is an example of one of the commands i have running without any issues...

ffmpeg -d -i http://127.0.0.1:5000 -r 60 -i viz.mp4 -loop 1 -i mask.png -filter_complex lowpass=600,showwaves=s=1280x720:mode=cline:r=60:colors=random|random[viz];[1:v]scale=1280x720,setsar=1/1[sun];[viz][sun]blend=all_mode=heat:shortest=1[bg];[bg][2:v]blend=all_mode=overlay:shortest=1:repeatlast=0:enable=lt(mod(t\,300)\,5),drawtext=fontfile=d3.ttf:fontsize=38:fontcolor=gray:text=DSFM.TV:x=5:y=(h-text_h)-5,drawtext=fontfile=helvbold.ttf:fix_bounds=true:fontsize=28:textfile=nowplaying.txt:fontcolor=gray:reload=1:y=(h-text_h)-5:x=(w-text_w)/2:enable=lt(mod(t\,60)\,15),drawtext=fontfile=helvbold.ttf:fontsize=24:fontcolor=gray:textfile=tuneid.txt:reload=1:y=5:x=(w-text_w)/2,drawtext=fontfile=helvbold.ttf:fontsize=24:fontcolor=gray:textfile=date.txt:reload=1:y=5:x=(w-text_w)-5:enable=lt(mod(t\,60)\,15),drawtext=fontfile=d3.ttf:fontsize=38:fontcolor=gray:textfile=count.txt:reload=1:x=(w-text_w)-5:y=(h-text_h)+20,hue=H=2*sin(400*PI/600*t) -s 1280x720 -c:a libfdk_aac -b:a 256k -c:v libx264 -preset ultrafast -profile:v high -level 4.2 -g 120 -bf 4 -x264opts keyint=120:min-keyint=120:8x8dct=1 -pix_fmt yuv420p -r 60 -f flv rtmp://127.0.0.1/live/viz

in short it grabs my net radio stream and outputs visualizations and adds text for the current playing mix, when the air date was, and the current number of people watching... i publish the stream at dsfm.tv

nothing that changes pts mid stream though.. that sounds like it wouldnt be good though...

> On Oct 16, 2018, at 1:04 42PM, Paul B Mahol <[hidden email]> wrote:
>
> On 10/16/18, DopeLabs <[hidden email]> wrote:
>> never happens to me and i have many processes that use -r running in the
>> background 24/7
>>
>> they all start with
>>
>> ffmpeg -d -i
>>
>> and end with
>>
>> -f flv rtmp://host/app/stream  </dev/null &
>
> Do you use filtergraphs that change pts at all?
>
> Try with loop filters and -r and you will get fancy effect.
>
>
>>
>>
>>> On Oct 16, 2018, at 3:16 16AM, sailor-godkane <[hidden email]> wrote:
>>>
>>> Could using -r with a filtergraph at the same time hang the command at
>>> random?
>>>
>>>
>>>
>>> --
>>> Sent from: http://www.ffmpeg-archive.org/
>>> _______________________________________________
>>> 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: ffmpeg hang in background

sailor-godkane
As suggested i have used the filter instead of -r. I also used it in
other commands as well since it seems more appropriate for my use.
After looking into it i did not know the 2 ways existed and the
difference between the 2.
I can just now hope it does not happen again.

Thanks to your command detail i also know that i can write text on
frames using only ffmpeg. I did not know that but maybe when i developed
my solution, it did not exist.

On 17/10/18 10:52, DopeLabs wrote:

> here is an example of one of the commands i have running without any issues...
>
> ffmpeg -d -i http://127.0.0.1:5000 -r 60 -i viz.mp4 -loop 1 -i mask.png -filter_complex lowpass=600,showwaves=s=1280x720:mode=cline:r=60:colors=random|random[viz];[1:v]scale=1280x720,setsar=1/1[sun];[viz][sun]blend=all_mode=heat:shortest=1[bg];[bg][2:v]blend=all_mode=overlay:shortest=1:repeatlast=0:enable=lt(mod(t\,300)\,5),drawtext=fontfile=d3.ttf:fontsize=38:fontcolor=gray:text=DSFM.TV:x=5:y=(h-text_h)-5,drawtext=fontfile=helvbold.ttf:fix_bounds=true:fontsize=28:textfile=nowplaying.txt:fontcolor=gray:reload=1:y=(h-text_h)-5:x=(w-text_w)/2:enable=lt(mod(t\,60)\,15),drawtext=fontfile=helvbold.ttf:fontsize=24:fontcolor=gray:textfile=tuneid.txt:reload=1:y=5:x=(w-text_w)/2,drawtext=fontfile=helvbold.ttf:fontsize=24:fontcolor=gray:textfile=date.txt:reload=1:y=5:x=(w-text_w)-5:enable=lt(mod(t\,60)\,15),drawtext=fontfile=d3.ttf:fontsize=38:fontcolor=gray:textfile=count.txt:reload=1:x=(w-text_w)-5:y=(h-text_h)+20,hue=H=2*sin(400*PI/600*t) -s 1280x720 -c:a libfdk_aac -b:a 256k -c:v libx264 -preset ultrafast -profile:v high -level 4.2 -g 120 -bf 4 -x264opts keyint=120:min-keyint=120:8x8dct=1 -pix_fmt yuv420p -r 60 -f flv rtmp://127.0.0.1/live/viz
>
> in short it grabs my net radio stream and outputs visualizations and adds text for the current playing mix, when the air date was, and the current number of people watching... i publish the stream at dsfm.tv
>
> nothing that changes pts mid stream though.. that sounds like it wouldnt be good though...
>
>> On Oct 16, 2018, at 1:04 42PM, Paul B Mahol <[hidden email]> wrote:
>>
>> On 10/16/18, DopeLabs <[hidden email]> wrote:
>>> never happens to me and i have many processes that use -r running in the
>>> background 24/7
>>>
>>> they all start with
>>>
>>> ffmpeg -d -i
>>>
>>> and end with
>>>
>>> -f flv rtmp://host/app/stream  </dev/null &
>> Do you use filtergraphs that change pts at all?
>>
>> Try with loop filters and -r and you will get fancy effect.
>>
>>
>>>
>>>> On Oct 16, 2018, at 3:16 16AM, sailor-godkane <[hidden email]> wrote:
>>>>
>>>> Could using -r with a filtergraph at the same time hang the command at
>>>> random?
>>>>

       

_______________________________________________
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: ffmpeg hang in background

sailor-godkane
In reply to this post by DopeLabs
I am back with this because it has not been resolved.
I removed -r and used -vf for framerate modification but the same
command hanged again completely at random.

What has happened now in one project with 5 run without changing
anything between each run :
- Run 1 : ffmpeg exited with code 11
- Run 2 : hang
- Run 3 : ffmpeg exited with code 11
- Run 4 : ffmpeg exited with code 11
- Run 5 : ran well

Does the code 11 mean a segmentation fault?
If it is, can i get more information about that segfault when running in
the background?
It's impossible to reproduce the error just by running the command
manually since it always works that way.

On 10/10/18 16:18, DopeLabs wrote:

> its not very well documented but ffmpeg has a daemon mode
>
> ffmpeg -d <all your stuff> </dev/null &
>
>
>
>> On Oct 10, 2018, at 6:56 46AM, Paul B Mahol <[hidden email]> wrote:
>>
>> On 10/10/18, sailor-godkane <[hidden email]> wrote:
>>> Hello,
>>>
>>> I am using ffmpeg in a big project for video/audio automated processing.
>>> Each project for processing requires lots of ffmpeg commands. Those commands
>>> are run by a daemon written in ObjC using GnuStep.
>>> Since it runs on the background i used -nostdin and -loglevel quiet for
>>> production use.
>>> To be sure i read everything on stdout and stderr to /dev/null but it should
>>> not matter since the command does not output anything.
>>> Everything run fine except sometimes a ffmpeg command will hang and i cannot
>>> understand why.
>>> Sometimes i can see a few % of cpu used by the commands but after hours it
>>> was still there.
>>> When it happens i have to shutdown my daemon and restart the processing. The
>>> same command will then run fine and the process can be finished.
>>>
>>> Details of ffmpeg (compiled from source)
>>>
>>> ffmpeg version n4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
>>>   built with gcc 4.8 (SUSE Linux)
>>>   configuration: --disable-programs --enable-ffprobe --enable-ffmpeg
>>> --enable-libx264 --enable-gpl --enable-shared --enable-pthreads
>>> --enable-libmp3lame --enable-pic
>>>   libavutil      56. 14.100 / 56. 14.100
>>>   libavcodec     58. 18.100 / 58. 18.100
>>>   libavformat    58. 12.100 / 58. 12.100
>>>   libavdevice    58.  3.100 / 58.  3.100
>>>   libavfilter     7. 16.100 /  7. 16.100
>>>   libswscale      5.  1.100 /  5.  1.100
>>>   libswresample   3.  1.100 /  3.  1.100
>>>   libpostproc    55.  1.100 / 55.  1.100
>>>
>>> System is :
>>>
>>> openSUSE 13.1 - 3.11.10-29-desktop
>>>
>>> The machine is a virtual one running on VMWare.
>>>
>>> The command that most often hangs is
>>>
>>> ffmpeg -nostdin -loglevel quiet -y -i front_slide_video.mov -an -r 16.000000
>>> -c:v libx264 -preset slow -b:v 5000k -aspect 1.333333 -vf
>>> scale=640:480,pad=640:480:0:0:black front_slide_video-rescaled.mov
>> What if you do not use -r parameter but fps filter explicitly in filtergraph?
>>
>>> But i had other commands hanging randomly as well so this is just a sample.
>>>
>>> Since this is completely random i have no way of testing it. The command
>>> that hang works fine if i run it manually and it runs fine most of the time
>>> when the daemon runs it.
>>> I upgraded from a version 2.X that was running on the previous major version
>>> of my software. It's been a few years since i worked on it but i don't
>>> recall hangs back in the day with version 2.
>>>
>>> I had the same problem with 4.0.1 btw.
>>>
>>> Thanks for your help
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://www.ffmpeg-archive.org/
>>> _______________________________________________
>>> 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".
--
Evo
Jimmy De Pauw
SENIOR BACK-END DEVELOPER & DATA ANALYST
W www.evo.group <http://www.evo.group>
T +32 (0)2 649 13 00 <tel:+32-2-649-1300>

_______________________________________________
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: ffmpeg hang in background

Carl Eugen Hoyos-2
2018-10-29 10:51 GMT+01:00, De Pauw Jimmy <[hidden email]>:

> I am back with this because it has not been resolved.
> I removed -r and used -vf for framerate modification but the same
> command hanged again completely at random.
>
> What has happened now in one project with 5 run without changing
> anything between each run :
> - Run 1 : ffmpeg exited with code 11
> - Run 2 : hang
> - Run 3 : ffmpeg exited with code 11
> - Run 4 : ffmpeg exited with code 11
> - Run 5 : ran well

It should be possible to tell your shell to write a system dump
when ffmpeg crashes, you can then investigate with gdb to
find out where the crash happened (and what caused it).

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".