PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, May 19, 2022

[FIXED] How to stop ffmpeg live stream to youtube over cron?

 May 19, 2022     ffmpeg, python, web-services     No comments   

Issue

I want to stream a video to youtube,

But don't know what to do to stop that live stream, like I want to stop in case wrong video gets streamed.

Like if i do a python subprocess or via cron not attached to the output, How can I stop the streaming and probably kill ffmpeg.


Solution

On Linux & macOS you can use:

kill $(pgrep ffmpeg)

Note that this will stop all ffmpeg instances. If you want to be more discriminate see ffmpeg How to end a specific process?, or look into creating a PID file for each process.



Answered By - llogan
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing