René's URL Explorer Experiment


Title: How to terminate a running ffmpegio stream forcibly? · python-ffmpegio/python-ffmpegio · Discussion #7 · GitHub

Open Graph Title: How to terminate a running ffmpegio stream forcibly? · python-ffmpegio/python-ffmpegio · Discussion #7

X Title: How to terminate a running ffmpegio stream forcibly? · python-ffmpegio/python-ffmpegio · Discussion #7

Description: How to terminate a running ffmpegio stream forcibly?

Open Graph Description: Hello! Is there a way to terminate an ongoing ffmpegio stream like the one below, if it runs in its own thread: with ffmpegio.open('http://stream.url', 'ra', blocksize=5000, ac=2, sample_fmt='flt',...

X Description: Hello! Is there a way to terminate an ongoing ffmpegio stream like the one below, if it runs in its own thread: with ffmpegio.open('http://stream.url', 'ra', blocksize=5000, ac=2, s...

Opengraph URL: https://github.com/python-ffmpegio/python-ffmpegio/discussions/7

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"How to terminate a running ffmpegio stream forcibly?","text":"\u003cp dir=\"auto\"\u003eHello!\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIs there a way to terminate an ongoing ffmpegio stream like the one below, if it runs in its own thread:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"with ffmpegio.open('http://stream.url', 'ra', blocksize=5000, ac=2, sample_fmt='flt', reconnect_at_eof=1,reconnect_streamed=1) as stream:\n    for block in stream:\n         process(block)\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode class=\"notranslate\"\u003ewith ffmpegio.open('http://stream.url', 'ra', blocksize=5000, ac=2, sample_fmt='flt', reconnect_at_eof=1,reconnect_streamed=1) as stream:\n    for block in stream:\n         process(block)\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eOne possibility could be to kill the ffmpeg by looking at its PPID, which is of course the PID of the main Python process the code is run from. But is there a more elegant way? I need to terminate the ffmpeg process and the thread in case they hang, but I have not found any robust method for that.\u003c/p\u003e","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"\u003cp dir=\"auto\"\u003e\u003ca class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/suurj/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/suurj\"\u003e@suurj\u003c/a\u003e - the code snippet will terminate the FFmpeg process if it's not dead when Python process exits the context. If FFmpeg process has not been terminated (i.e., all frames were read) it calls \u003ccode class=\"notranslate\"\u003ePopen.kill()\u003c/code\u003e on the FFmpeg process. If it is not behaving as such, I need to investigate into in (need more info).\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eYou can inspect how the stream closes here:\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003c/p\u003e\u003cdiv class=\"Box Box--condensed my-2\"\u003e\n  \u003cdiv class=\"Box-header f6\"\u003e\n    \u003cp class=\"mb-0 text-bold\"\u003e\n      \u003ca href=\"https://github.com/python-ffmpegio/python-ffmpegio/blob/4fd16e1b914d0be18154caf1b06f7d046bed55b2/src/ffmpegio/streams/SimpleStreams.py#L91\"\u003epython-ffmpegio/src/ffmpegio/streams/SimpleStreams.py\u003c/a\u003e\n    \u003c/p\u003e\n    \u003cp class=\"mb-0 color-fg-muted\"\u003e\n         Line 91\n      in\n      \u003ca data-pjax=\"true\" class=\"commit-tease-sha Link--inTextBlock\" href=\"/python-ffmpegio/python-ffmpegio/commit/4fd16e1b914d0be18154caf1b06f7d046bed55b2\"\u003e4fd16e1\u003c/a\u003e\n    \u003c/p\u003e\n  \u003c/div\u003e\n  \u003cdiv itemprop=\"text\" class=\"Box-body p-0 blob-wrapper blob-wrapper-embedded data\"\u003e\n    \u003ctable class=\"highlight tab-size mb-0 js-file-line-container\" data-tab-size=\"8\" data-paste-markdown-skip=\"\"\u003e\n\n        \u003ctbody\u003e\u003ctr class=\"border-0\"\u003e\n          \u003ctd id=\"L91\" class=\"blob-num border-0 tmp-px-3 py-0 color-bg-default\" data-line-number=\"91\"\u003e\u003c/td\u003e\n          \u003ctd id=\"LC91\" class=\"blob-code border-0 tmp-px-3 py-0 color-bg-default blob-code-inner js-file-line\"\u003e \u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eclose\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eself\u003c/span\u003e): \u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\u003c/table\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003e\u003c/p\u003e","upvoteCount":1,"url":"https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#discussioncomment-3881060"}}}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format)
route-controllervoltron_discussions_fragments
route-actiondiscussion_layout
fetch-noncev2:f474cdcb-6370-f86b-7375-f5e91579ee62
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-idAC8A:27B055:282571:37FE18:6AFD737D
html-safe-noncec4cf48bba7ad2dc85757d290d1b424d3884ca122722748c09e9611a55edb1abd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzhBOjI3QjA1NToyODI1NzE6MzdGRTE4OjZBRkQ3MzdEIiwidmlzaXRvcl9pZCI6IjY5Mzc1OTIwNzU4MDYxNDMzNTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf357ee5a08aa28f6f483b00f5781ae756bd4a7fef1ceeca20816c80fb71aa019
hovercard-subject-tagdiscussion:4474269
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/discussions_fragments/discussion_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/python-ffmpegio/python-ffmpegio/7/discussion_layout
twitter:imagehttps://opengraph.githubassets.com/11d9e2a7f902805bdae9fb3f7d5485aeac7c1b6e6e6b158a8b1b0fdb3336b3a4/python-ffmpegio/python-ffmpegio/discussions/7
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/11d9e2a7f902805bdae9fb3f7d5485aeac7c1b6e6e6b158a8b1b0fdb3336b3a4/python-ffmpegio/python-ffmpegio/discussions/7
og:image:altHello! Is there a way to terminate an ongoing ffmpegio stream like the one below, if it runs in its own thread: with ffmpegio.open('http://stream.url', 'ra', blocksize=5000, ac=2, sample_fmt='flt',...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee54006cf2b96d1ac260960edd10003132911469ccd1ec99c9803119fe2a4e032
turbo-cache-controlno-preview
go-importgithub.com/python-ffmpegio/python-ffmpegio git https://github.com/python-ffmpegio/python-ffmpegio.git
octolytics-dimension-user_id98168493
octolytics-dimension-user_loginpython-ffmpegio
octolytics-dimension-repository_id355600490
octolytics-dimension-repository_nwopython-ffmpegio/python-ffmpegio
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id355600490
octolytics-dimension-repository_network_root_nwopython-ffmpegio/python-ffmpegio
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5be0bf2b8cf26f8897d31e6bc3c232d328b12a54
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-ffmpegio%2Fpython-ffmpegio%2Fdiscussions%2F7
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-ffmpegio%2Fpython-ffmpegio%2Fdiscussions%2F7
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fdiscussions_fragments%2Fdiscussion_layout&source=header-repo&source_repo=python-ffmpegio%2Fpython-ffmpegio
Reloadhttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7
Reloadhttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7
Reloadhttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7
python-ffmpegiohttps://github.com/python-ffmpegio
python-ffmpegiohttps://github.com/python-ffmpegio/python-ffmpegio
Codehttps://github.com/python-ffmpegio/python-ffmpegio
Issues4 (4)https://github.com/python-ffmpegio/python-ffmpegio/issues
Pull requests1 (1)https://github.com/python-ffmpegio/python-ffmpegio/pulls
Discussionshttps://github.com/python-ffmpegio/python-ffmpegio/discussions
Actionshttps://github.com/python-ffmpegio/python-ffmpegio/actions
Projectshttps://github.com/python-ffmpegio/python-ffmpegio/projects
Wikihttps://github.com/python-ffmpegio/python-ffmpegio/wiki
Security and qualityhttps://github.com/python-ffmpegio/python-ffmpegio/security
Insightshttps://github.com/python-ffmpegio/python-ffmpegio/insights
Answered https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#discussioncomment-3881060
tikuma-lsuhschttps://github.com/tikuma-lsuhsc
suurj https://github.com/suurj
Q&Ahttps://github.com/python-ffmpegio/python-ffmpegio/discussions/categories/q-a
How to terminate a running ffmpegio stream forcibly? https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#top
suurj https://github.com/suurj
Answered https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#discussioncomment-3881060
tikuma-lsuhschttps://github.com/tikuma-lsuhsc
Return to tophttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7#top
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7
https://github.com/python-ffmpegio/python-ffmpegio/discussions/7
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7
https://github.com/python-ffmpegio/python-ffmpegio/discussions/7
suurj https://github.com/suurj
Oct 14, 2022 https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#discussion-4474269
tikuma-lsuhsc https://github.com/tikuma-lsuhsc
Oct 14, 2022 https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#discussioncomment-3881060
@suurjhttps://github.com/suurj
python-ffmpegio/src/ffmpegio/streams/SimpleStreams.pyhttps://github.com/python-ffmpegio/python-ffmpegio/blob/4fd16e1b914d0be18154caf1b06f7d046bed55b2/src/ffmpegio/streams/SimpleStreams.py#L91
4fd16e1https://github.com/python-ffmpegio/python-ffmpegio/commit/4fd16e1b914d0be18154caf1b06f7d046bed55b2
View full answer https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#discussioncomment-3881060
Oldest https://github.com/python-ffmpegio/python-ffmpegio/discussions/7?sort=old
Newest https://github.com/python-ffmpegio/python-ffmpegio/discussions/7?sort=new
Top https://github.com/python-ffmpegio/python-ffmpegio/discussions/7?sort=top
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7
https://github.com/python-ffmpegio/python-ffmpegio/discussions/7
tikuma-lsuhsc https://github.com/tikuma-lsuhsc
Oct 14, 2022 https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#discussioncomment-3881060
@suurjhttps://github.com/suurj
python-ffmpegio/src/ffmpegio/streams/SimpleStreams.pyhttps://github.com/python-ffmpegio/python-ffmpegio/blob/4fd16e1b914d0be18154caf1b06f7d046bed55b2/src/ffmpegio/streams/SimpleStreams.py#L91
4fd16e1https://github.com/python-ffmpegio/python-ffmpegio/commit/4fd16e1b914d0be18154caf1b06f7d046bed55b2
https://github.com/suurj
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7
https://github.com/python-ffmpegio/python-ffmpegio/discussions/7
suurjhttps://github.com/suurj
Oct 15, 2022 https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#discussioncomment-3885432
https://github.com/tikuma-lsuhsc
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/7
https://github.com/python-ffmpegio/python-ffmpegio/discussions/7
tikuma-lsuhschttps://github.com/tikuma-lsuhsc
Oct 15, 2022 https://github.com/python-ffmpegio/python-ffmpegio/discussions/7#discussioncomment-3886223
suurjhttps://github.com/suurj
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-ffmpegio%2Fpython-ffmpegio%2Fdiscussions%2F7
🙏 Q&A https://github.com/python-ffmpegio/python-ffmpegio/discussions/categories/q-a
https://github.com/suurj
https://github.com/tikuma-lsuhsc
https://github.com/python-ffmpegio/python-ffmpegio/discussions/7
https://github.com/settings/replies?return_to=1
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.