FFMPEG fails 5% responding to SIGTERM and SIGINT

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

FFMPEG fails 5% responding to SIGTERM and SIGINT

Osama Alshaykh
Hi Everyone,

I am a big fan of FFMPEG from my days in video standards.  We are using FFMPEG on debian Linux.  We are using it to capture screens using x11grab and also using alsa to capture audio.  
 I found, what I can't always stop ffmpeg even I have its pid.  we tried SIGTERM and we also tried sending SIGINT, but sometimes it doesn't work.   In 5% of the FFMPEG sessions, it fails to stop.
In these cases we can only stop ffmpeg only by SIGKILL, but video file is not correct after sending SIGKILL (doesn't have end-header). Any ideas or suggestions will be greatly appreciate.

Thanks,
Osama Alshaykh
_______________________________________________
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 fails 5% responding to SIGTERM and SIGINT

Osama Alshaykh
I apologize I forgot to include the command we use:


ffmpeg -y \
    -f x11grab -r $RATE -s $RESOLUTION -thread_queue_size $QUEUE_SIZE -i :$DISPLAY.0+0,0 \
    -f alsa -thread_queue_size $QUEUE_SIZE -i plug:asnoop$DISPLAY -acodec libfdk_aac -ar 44100 \
    -c:v libx264 -preset $PRESET -pix_fmt yuv420p -r $RATE \
    -crf 28 -g 120 -keyint_min 5 -tune zerolatency -threads 1 \
    -f mp4 $OUTPUT > /tmp/jibri-ffmpeg-$DISPLAY.out 2>&1 &

Thank you,
Osama




> On Feb 9, 2017, at 11:02 AM, Osama Alshaykh <[hidden email]> wrote:
>
> Hi Everyone,
>
> I am a big fan of FFMPEG from my days in video standards.  We are using FFMPEG on debian Linux.  We are using it to capture screens using x11grab and also using alsa to capture audio.  
> I found, what I can't always stop ffmpeg even I have its pid.  we tried SIGTERM and we also tried sending SIGINT, but sometimes it doesn't work.   In 5% of the FFMPEG sessions, it fails to stop.
> In these cases we can only stop ffmpeg only by SIGKILL, but video file is not correct after sending SIGKILL (doesn't have end-header). Any ideas or suggestions will be greatly appreciate.
>
> Thanks,
> Osama Alshaykh
> _______________________________________________
> 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 fails 5% responding to SIGTERM and SIGINT

Lou-2
On Thu, 9 Feb 2017 11:04:32 -0500
Osama Alshaykh <[hidden email]> wrote:

> I apologize I forgot to include the command we use:
>
>
> ffmpeg -y \
>     -f x11grab -r $RATE -s $RESOLUTION -thread_queue_size $QUEUE_SIZE -i :$DISPLAY.0+0,0 \
>     -f alsa -thread_queue_size $QUEUE_SIZE -i plug:asnoop$DISPLAY -acodec libfdk_aac -ar 44100 \
>     -c:v libx264 -preset $PRESET -pix_fmt yuv420p -r $RATE \
>     -crf 28 -g 120 -keyint_min 5 -tune zerolatency -threads 1 \
>     -f mp4 $OUTPUT > /tmp/jibri-ffmpeg-$DISPLAY.out 2>&1 &
>
> Thank you,
> Osama

You should show the actual, unscripted command and the complete console
output.

How can we easily duplicate this issue? Does the issue occur on other
machines? Are x11grab, alsa, libx264 and libfdk_aac required to
duplicate this issue? What's the simplest command that still shows the
issue?
_______________________________________________
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 fails 5% responding to SIGTERM and SIGINT

Osama Alshaykh
Hi,

The console output are normal.  We could not stop the process using SIGTERM or SIGINT.  The parameters we call are:

DISPLAY=$1
OUTPUT=$2
: ${RESOLUTION:=640x480}
: ${RATE:=30}
: ${PRESET:=veryfast}
: ${QUEUE_SIZE:=4096}
sleep 10
exec ffmpeg -y \
-f x11grab -r $RATE -s $RESOLUTION -thread_queue_size $QUEUE_SIZE -i :$DISPLAY.0+0,0 \
-f alsa -thread_queue_size $QUEUE_SIZE -i plug:asnoop$DISPLAY -acodec libfdk_aac -ar 44100 \
-c:v libx264 -preset $PRESET -pix_fmt yuv420p -r $RATE \
-crf 28 -g 120 -keyint_min 5 -tune zerolatency -threads 1 \
-f mp4 $OUTPUT > /tmp/jibri-ffmpeg-$DISPLAY.out 2>&1 &

We did not try different parameters to duplicate the issue.

Thank you,
Osama

> On Feb 9, 2017, at 3:11 PM, Lou <[hidden email]> wrote:
>
> On Thu, 9 Feb 2017 11:04:32 -0500
> Osama Alshaykh <[hidden email]> wrote:
>
>> I apologize I forgot to include the command we use:
>>
>>
>> ffmpeg -y \
>>    -f x11grab -r $RATE -s $RESOLUTION -thread_queue_size $QUEUE_SIZE -i :$DISPLAY.0+0,0 \
>>    -f alsa -thread_queue_size $QUEUE_SIZE -i plug:asnoop$DISPLAY -acodec libfdk_aac -ar 44100 \
>>    -c:v libx264 -preset $PRESET -pix_fmt yuv420p -r $RATE \
>>    -crf 28 -g 120 -keyint_min 5 -tune zerolatency -threads 1 \
>>    -f mp4 $OUTPUT > /tmp/jibri-ffmpeg-$DISPLAY.out 2>&1 &
>>
>> Thank you,
>> Osama
>
> You should show the actual, unscripted command and the complete console
> output.
>
> How can we easily duplicate this issue? Does the issue occur on other
> machines? Are x11grab, alsa, libx264 and libfdk_aac required to
> duplicate this issue? What's the simplest command that still shows the
> issue?
> _______________________________________________
> 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".