René's URL Explorer Experiment


Title: Does this work?: Audio NumPy Array » ffmpegio audio-processing » NumPy Array · python-ffmpegio/python-ffmpegio · Discussion #13 · GitHub

Open Graph Title: Does this work?: Audio NumPy Array » ffmpegio audio-processing » NumPy Array · python-ffmpegio/python-ffmpegio · Discussion #13

X Title: Does this work?: Audio NumPy Array » ffmpegio audio-processing » NumPy Array · python-ffmpegio/python-ffmpegio · Discussion #13

Description: Does this work?: Audio NumPy Array » ffmpegio audio-processing » NumPy Array

Open Graph Description: Good afternoon thank you very much for sharing your great work!, it's very useful to have ffmpegio. Because ffmpeg has great audio-/video-processing features, I had this idea: Is it possible to use...

X Description: Good afternoon thank you very much for sharing your great work!, it's very useful to have ffmpegio. Because ffmpeg has great audio-/video-processing features, I had this idea: Is it possible to...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Does this work?: Audio NumPy Array » ffmpegio audio-processing » NumPy Array","text":"\u003cp dir=\"auto\"\u003eGood afternoon\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003ethank you very much for sharing your great work!\u003c/strong\u003e, it's very useful to have \u003ccode class=\"notranslate\"\u003effmpegio\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eBecause ffmpeg has great audio-/video-processing features, I had this idea:\u003c/p\u003e\n\u003ch4 dir=\"auto\"\u003eIs it possible to use \u003ccode class=\"notranslate\"\u003effmpegio\u003c/code\u003e to process numpy arrays with ffmpeg audio/video processors without having to create files on the disc?\u003c/h4\u003e\n\u003cp dir=\"auto\"\u003eI have a practical, simple example:\u003c/p\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003eStereo audio data is stored in a numpy array\u003c/li\u003e\n\u003cli\u003eThe numpy array is passed to \u003ccode class=\"notranslate\"\u003effmpegio\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode class=\"notranslate\"\u003effmpegio\u003c/code\u003e uses ffmpeg and converts the stereo signal to mono\u003c/li\u003e\n\u003cli\u003eAfterwards, the result is passed back to Python as numpy Array\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp dir=\"auto\"\u003e\u003cem\u003e(I use this example because if one mathematically convert stereo to mono, the result is about 3dB less loud than the stereo signal and there can be spikes with large peaks. So one must start a postprocessor after the mono conversion - what ffmpeg does very well 😃)\u003c/em\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThanks a lot for any help!, kind regards,\u003cbr\u003e\nThomas\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/schittli/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/schittli\"\u003e@schittli\u003c/a\u003e - That's an interesting usecase that I didn't think of. I had to do some digging to find a workaround, and luckily there is an \u003ccode class=\"notranslate\"\u003eanull\u003c/code\u003e filter, which does nothing but just pass the input samples to output. With it, you can use the \u003ccode class=\"notranslate\"\u003efilter\u003c/code\u003e function.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eHere is a quick example:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import ffmpegio as ff\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\nfs = 16000\nT = 1\nx = np.random.default_rng().integers(2^-15,2^15,dtype='int16',size=(T*fs,2))\n\nfsout,y = ff.audio.filter('anull', fs, x, ac=1) # no explicit filtering, just implicit stereo-\u0026gt;mono conversion\n\nplt.plot(x)\nplt.plot(y)\nplt.show()\"\u003e\u003cpre class=\"notranslate\"\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003effmpegio\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eas\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eff\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enumpy\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eas\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ematplotlib\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003epyplot\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eas\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eplt\u003c/span\u003e\n\n\u003cspan class=\"pl-s1\"\u003efs\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e16000\u003c/span\u003e\n\u003cspan class=\"pl-c1\"\u003eT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003enp\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erandom\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003edefault_rng\u003c/span\u003e().\u003cspan class=\"pl-c1\"\u003eintegers\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e^\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e15\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e^\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e15\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003edtype\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e'int16'\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003esize\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003eT\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e*\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003efs\u003c/span\u003e,\u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e))\n\n\u003cspan class=\"pl-s1\"\u003efsout\u003c/span\u003e,\u003cspan class=\"pl-s1\"\u003ey\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eff\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eaudio\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efilter\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'anull'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003efs\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eac\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e) \u003cspan class=\"pl-c\"\u003e# no explicit filtering, just implicit stereo-\u0026gt;mono conversion\u003c/span\u003e\n\n\u003cspan class=\"pl-s1\"\u003eplt\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eplot\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ex\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003eplt\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eplot\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ey\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003eplt\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eshow\u003c/span\u003e()\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eLet me know if this works for you\u003c/p\u003e","upvoteCount":2,"url":"https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussioncomment-6231093"}}}

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:eeb676f2-68c2-a9dc-9a75-af9d6dddf307
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-id8446:27EE91:25D9B9:354AC8:6AFD7398
html-safe-noncec18680e423ae8578fd7a2942afce05553c0d8959af950419e839881df7cc08f0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDQ2OjI3RUU5MToyNUQ5Qjk6MzU0QUM4OjZBRkQ3Mzk4IiwidmlzaXRvcl9pZCI6IjQyNTU0NjM3Nzc3NDQyODY2MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7506d21e7a60c673fa671c6666f6c76ea9f0f83b8a5c81ecb8f8cd0cfb3fc83f
hovercard-subject-tagdiscussion:5319735
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/13/discussion_layout
twitter:imagehttps://opengraph.githubassets.com/9b98aca9cb3e71d30273ad0475831c7d267c7debf32d30a63dd2c03af791178b/python-ffmpegio/python-ffmpegio/discussions/13
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9b98aca9cb3e71d30273ad0475831c7d267c7debf32d30a63dd2c03af791178b/python-ffmpegio/python-ffmpegio/discussions/13
og:image:altGood afternoon thank you very much for sharing your great work!, it's very useful to have ffmpegio. Because ffmpeg has great audio-/video-processing features, I had this idea: Is it possible to use...
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/13#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-ffmpegio%2Fpython-ffmpegio%2Fdiscussions%2F13
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%2F13
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/13
Reloadhttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13
Reloadhttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13
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/13#discussioncomment-6231093
tikuma-lsuhschttps://github.com/tikuma-lsuhsc
schittli https://github.com/schittli
Q&Ahttps://github.com/python-ffmpegio/python-ffmpegio/discussions/categories/q-a
Does this work?: Audio NumPy Array » ffmpegio audio-processing » NumPy Array https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#top
schittli https://github.com/schittli
Answered https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussioncomment-6231093
tikuma-lsuhschttps://github.com/tikuma-lsuhsc
Return to tophttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13#top
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13
https://github.com/python-ffmpegio/python-ffmpegio/discussions/13
schittli https://github.com/schittli
Jun 20, 2023 https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussion-5319735
tikuma-lsuhsc https://github.com/tikuma-lsuhsc
Jun 20, 2023 https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussioncomment-6231093
@schittlihttps://github.com/schittli
View full answer https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussioncomment-6231093
Oldest https://github.com/python-ffmpegio/python-ffmpegio/discussions/13?sort=old
Newest https://github.com/python-ffmpegio/python-ffmpegio/discussions/13?sort=new
Top https://github.com/python-ffmpegio/python-ffmpegio/discussions/13?sort=top
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13
https://github.com/python-ffmpegio/python-ffmpegio/discussions/13
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13
https://github.com/python-ffmpegio/python-ffmpegio/discussions/13
tikuma-lsuhsc https://github.com/tikuma-lsuhsc
Jun 20, 2023 https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussioncomment-6231093
@schittlihttps://github.com/schittli
https://github.com/schittli
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13
https://github.com/python-ffmpegio/python-ffmpegio/discussions/13
schittlihttps://github.com/schittli
Jun 20, 2023 https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussioncomment-6234392
@tikuma-lsuhschttps://github.com/tikuma-lsuhsc
https://github.com/tikuma-lsuhsc
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13
https://github.com/python-ffmpegio/python-ffmpegio/discussions/13
tikuma-lsuhschttps://github.com/tikuma-lsuhsc
Jun 20, 2023 https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussioncomment-6234420
https://github.com/SohamTilekar
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13
https://github.com/python-ffmpegio/python-ffmpegio/discussions/13
SohamTilekarhttps://github.com/SohamTilekar
Jan 18, 2024 https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussioncomment-8170750
https://github.com/tikuma-lsuhsc
Please reload this pagehttps://github.com/python-ffmpegio/python-ffmpegio/discussions/13
https://github.com/python-ffmpegio/python-ffmpegio/discussions/13
tikuma-lsuhschttps://github.com/tikuma-lsuhsc
Jan 18, 2024 https://github.com/python-ffmpegio/python-ffmpegio/discussions/13#discussioncomment-8170796
schittlihttps://github.com/schittli
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%2F13
🙏 Q&A https://github.com/python-ffmpegio/python-ffmpegio/discussions/categories/q-a
https://github.com/schittli
https://github.com/tikuma-lsuhsc
https://github.com/SohamTilekar
https://github.com/python-ffmpegio/python-ffmpegio/discussions/13
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.