-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support audio controls in Notebook Renderer #118275
Comments
I think a good solution will be to build VSCode with some kind of "libre" ffmpeg - with only wav, ogg, vorbis for audio and AV1 for video. |
Assigning to @deepak1556 and @mjbvz as this is more about audio control in webview. |
I just want to point out that the whole reason we're here today is because ffmpeg inclusion was previously stonewalled multiple times and we were told to create an HTML workaround. |
I apologise for making it sound if the solution implemented by @robinhad is complex. That was not my intention at all. |
@DonJayamanne Sorry, I should rephrase that. Just want to make sure that we do something here.
|
In case anybody is looking for the reason why this is important for jupyter customers, here's our original issue: |
Hello! |
I haven't tried this, but it looks like it's possible to add the complete ffmpeg libraries oneself as a workaround. VSCodium/vscodium#152 (comment) . |
I would really appreciate this being implemented, as it is blocking me from using the jupyter extension. Cheers |
I'd be happy to provide more code samples and test JS notebooks from my end for vscode team to review and come up with a good solution. I don't think what's been discussed and proposed as a workaround solution in Jupyter repo @rchiodo linked us to is the best long term approach to resolve this, but thank you for linking them. |
WebCodecs is now part of Chrome 94 Beta: https://blog.chromium.org/2021/08/chrome-94-beta-webcodecs-webgpu.html I think that's the spec to watch and webGPU for compute to enable audio/video codecs apis in vscode when Chromium is updated to that version. |
This comment was marked as spam.
This comment was marked as spam.
There is clearly huge demand for this functionality. But why not simply create code that plays a raw audio buffer (e.g. mono/sterero I look forward to a situation where VSCode Notebook is able to act as a complete replacement for Jupyter Notebook. You are so close! |
Yes, playing from the buffer will be enough for most cases. I think most people will use this to check the results of their processing |
^ I've created a feature-request for a barebones functionality to play a mono/stereo np.array from a cell output. |
Ticket #151149 has been selected as candidate for backlog. If we upvote it, it will go into the backlog. It requests the ability to play raw waveforms in VSCode. |
VSCode moved it to their backlog as of July 2nd. Progress! |
Summary: Add notebook tutorial for VideoCLIP evaluation using pretrained checkpoint. - `retrieval/evaluation.ipynb`: notebook with step-by-step instructions for setting up model, calling model, and getting predictions Pull Request resolved: #193 Test Plan: Run notebook Note that vscode is incapable of rendering video/audio in notebooks (see [issue](microsoft/vscode#118275)) and github doesn't display the videos in output cells. Embedded videos can be played in google colab ([link to this tutorial in colab](https://colab.research.google.com/drive/1zCU0KPzFKns07aVbSlN_1c8gtKXG0ke2?usp=sharing)) or in jupyter lab. To install jupyterlab, convert your `torch-multimodal` conda env into a kernel, and launch jupyter lab: ``` (base) conda install -c conda-forge jupyterlab (base) conda activate torch-multimodal (torch-multimodal) conda install ipykernel (torch-multimodal) ipython kernel install --user --name=torch-multimodal (torch-multimodal) conda deactivate (base) jupyter lab ``` Reviewed By: langong347 Differential Revision: D38362846 Pulled By: sophiazhi fbshipit-source-id: aa18739cd02270ce80524d31cfd1a43b7e66287c
Summary: Add notebook tutorial for VideoCLIP evaluation using pretrained checkpoint. - `retrieval/evaluation.ipynb`: notebook with step-by-step instructions for setting up model, calling model, and getting predictions Pull Request resolved: facebookresearch#193 Test Plan: Run notebook Note that vscode is incapable of rendering video/audio in notebooks (see [issue](microsoft/vscode#118275)) and github doesn't display the videos in output cells. Embedded videos can be played in google colab ([link to this tutorial in colab](https://colab.research.google.com/drive/1zCU0KPzFKns07aVbSlN_1c8gtKXG0ke2?usp=sharing)) or in jupyter lab. To install jupyterlab, convert your `torch-multimodal` conda env into a kernel, and launch jupyter lab: ``` (base) conda install -c conda-forge jupyterlab (base) conda activate torch-multimodal (torch-multimodal) conda install ipykernel (torch-multimodal) ipython kernel install --user --name=torch-multimodal (torch-multimodal) conda deactivate (base) jupyter lab ``` Reviewed By: langong347 Differential Revision: D38362846 Pulled By: sophiazhi fbshipit-source-id: aa18739cd02270ce80524d31cfd1a43b7e66287c
@deepak1556 plans to add ffmpeg with the following codecs to VS Code insiders:
This should allow the majority of notebook scenarios from this issue. We would really appreciate if you try it out and let us know if there are scenarios which are still not working since they might require codecs which we are still not shipping. I will comment here once we release VS Code insiders with these changes next week. Thank you 🙏 |
Summary: Revise VideoCLIP tutorial notebook to better adhere to guidelines for official pytorch tutorials ([internal wiki](https://www.internalfb.com/intern/wiki/PyTorch/Teams/PyTorch_Doc_Engineering/PyTorch_Tutorials_QuickStart/)). Pull Request resolved: #242 Test Plan: Run notebook Note that vscode is incapable of rendering video/audio in notebooks (see [issue](microsoft/vscode#118275)) and github doesn't display the videos in output cells. Embedded videos can be played in google colab ([link to this tutorial in colab](https://colab.research.google.com/drive/1-J2BU-MDdOpnYKjzgvhsme4C1MAjyVsb#scrollTo=ZJCnp2DFRILI)) or in jupyter lab. To install jupyterlab, convert your `torch-multimodal` conda env into a kernel, and launch jupyter lab: ``` (base) conda install -c conda-forge jupyterlab (base) conda activate torch-multimodal (torch-multimodal) conda install ipykernel (torch-multimodal) ipython kernel install --user --name=torch-multimodal (torch-multimodal) conda deactivate (base) jupyter lab ``` Reviewed By: langong347 Differential Revision: D38797861 Pulled By: sophiazhi fbshipit-source-id: 7dd08bb3c5eacba9fcf9fd9d3c715082a6406580
Today's VS Code Insiders has all the codecs I have listed above ☝️ thanks to @deepak1556 and @alexeykuzmin. Please try it out with various Notebook scenarios and do let us know if some flows are still not working. I will still keep this issue open to collect feedback, and we can close it if things look good. Thank you 🙏 |
Fantastic work ! It (also) plays uncompressed signals:
|
Closing this issue as the planned work is done. And in case some scenarios are still not working do let us know or just open a new issue and ping me @isidorn on it. Thank you very much. |
Big thank you for the support here |
Didn't work, updated vscode and the feature is here and working! Thank you all! ❤🎉🎉 |
Request: Add support for Audio Control in Notebook Renderer.
We (Jupyter Extension) can accept the PR, however this would mean the Jupyter extension now has a custom renderer for HTML.
And I'm not too keen on owning rendering all HTML content in Notebook renderers (I know VS Code has custom code to handle a lot of the HTML content, links, etc).
Suggestion
@rebornix /cc
The text was updated successfully, but these errors were encountered: