Open Spirograph12 opened 1 year ago
UPDATE: A guy who wrote a GUI in Qt/C++ was able to solve the ffmpeg child process issue based on tips he found here:
https://www.baeldung.com/linux/get-process-child-processes
I don't know if that helps you with your Python GUI.
Thanks for the feedback and share the info. I will take a look 👀
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like that [x])WARNING
All invalid issues will be rejected!!
Before going further
If your problem is a bug with youtube-dl or a request for new site support please report it here
Make sure you are using the latest yt-dlg version (Click the
Settings
icon and thenAbout
to view the current version)Make sure you are using the latest youtube-dl version (Click the
Settings
icon and thenUpdate
to update to the latest youtube-dl version)Make sure you searched the bugtracker for similar issues including closed ones
Make sure to read the FAQs file
What is the purpose of your issue?
Bug report
If the problem occurs when downloading a URL please provide the full verbose output as follows:
Options > Extra
tabOptions > Advanced
tab and Clear your log contentWhat operating system do you use ?
This report is for: Linux openSUSE Tumbleweed python310-yt-dlg 1.8.3-1.216
List of actions to perform to reproduce the problem:
Set up yt-dlg to use yt-dlp as CLI backend.
In Extras tab, use recommended flags to download live streams via ffmpeg:
--downloader ffmpeg --hls-use-mpegts --no-part
Choose Custom and paste this:
%(title)s %(id)s.ts
Now yt-dlg is correctly set up to download live streams as mpegts transport streams with extension .ts
https://www.cbsnews.com/live/
https://wnetdt.lls.pbs.org/out/v1/0456457548354b88b32fc437e4e7ee01/index.m3u8
https://classicarts.akamaized.net/hls/live/1024257/CAS/master.m3u8
https://playoutengine.sinclairstoryline.com/playout/9f87522c-5a0e-4ff4-b82c-d5564216132f.m3u8
https://docubayvh.s.llnwi.net/526a07ab-6ae7-4b6c-84a1-159791416484_1000004372_HLS/manifest.m3u8
What is the expected behaviour ?
Hitting the stop button should stop the download. (It should kill both yt-dlp and ffmpeg.)
What happens instead ?
Hitting the stop button has no effect. The live stream continues to download. It must be stopped manually, using killall ffmpeg or task manager.
Note 1: This is an old bug which was never fixed on Windows, but was fixed on Linux using the os.killpg function. See this comment by original developer:
https://github.com/MrS0m30n3/youtube-dl-gui/issues/49#issuecomment-121231385
I'm NOT a coder, but maybe the reason old developer was perhaps using subprocess module is that subprocess module can be more easily killed in cases where CLI backend calls ffmpeg. If you're using the CLI backend directly from python instead of using the subprocess module, maybe that's the issue.
Note 2: In the old yt-dlg 0.4 such as Ubuntu binary 0.4-1 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/pool/main/y/youtube-dlg/youtube-dlg_0.4-1~webupd8~disco0_all.deb , hitting the stop button works as expected. ffmpeg stops downloading the live stream.
Note 3: The above yt-dlg Ubuntu binary still works in Ubuntu 20.04 with Python 3.8. Live streams downloaded using ffmpeg are successfully killed by pressing the stop button.
Note 4: Possibly at one time a workaround was to use "Prefer Native HLS". But in 2022 with yt-dlp this is not practical for live streams. To download most live streams, you need ffmpeg. Otherwise, only a short initial segment will download. Then the download will stop.
Note 5: Your FAQs file linking to old issue number 49 has typos leading to 404s. Please change youtubet to youtube (two instances).
Thank you for your time, and best wishes for a happy holiday season!