Repository navigation
Add ffmpeg pixi example for blog post - #10993
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Document or enforce the Pixi-specific invocation so the example does not fail under the default uv sandbox.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds a Pixi-backed FFmpeg audio example with reactive tone generation.
Changes:
- Declares
ffmpegas a Pixi dependency. - Adds pitch-controlled WAV generation and playback.
| File | Summary |
|---|---|
examples/misc/using_ffmpeg.py |
New interactive FFmpeg audio example. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # [tool.pixi.workspace] | ||
| # channels = ["conda-forge"] | ||
| # | ||
| # [tool.pixi.dependencies] | ||
| # ffmpeg = "*" |
There was a problem hiding this comment.
2 issues found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="examples/misc/using_ffmpeg.py">
<violation number="1" location="examples/misc/using_ffmpeg.py:9">
P2: This example only runs with `marimo edit --sandbox=pixi` after installing Pixi and pulling `ffmpeg` from conda-forge, but the new file documents none of that: no intro markdown cell, no README entry, and `examples/misc/README.md` still lists only `using_r.py` as the pixi-based example. Opening it via the README's default `--sandbox` (uv) installs marimo but not ffmpeg, so the cell fails with `ffmpeg` not found. Add the `marimo edit --sandbox=pixi examples/misc/using_ffmpeg.py` command and a Pixi installation link where the example is introduced (as `using_r.py` does in its header/intro cell).</violation>
<violation number="2" location="examples/misc/using_ffmpeg.py:39">
P3: `check=True` swallows ffmpeg's stderr: on failure `CalledProcessError` shows only "returned non-zero exit status N" in the cell, so the actual ffmpeg diagnostic never appears. And when the notebook is opened without the pixi sandbox (the misc README explicitly allows `marimo edit <notebook.py>` with self-installed requirements), a missing `ffmpeg` raises a bare `FileNotFoundError` with no hint. Check the return code and surface `stderr.decode()`, and give a helpful message when ffmpeg is not on PATH. See the existing pattern in `examples/cloud/modal/nbs/notebook.py` which handles the missing-binary case.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| # channels = ["conda-forge"] | ||
| # | ||
| # [tool.pixi.dependencies] | ||
| # ffmpeg = "*" |
There was a problem hiding this comment.
P2: This example only runs with marimo edit --sandbox=pixi after installing Pixi and pulling ffmpeg from conda-forge, but the new file documents none of that: no intro markdown cell, no README entry, and examples/misc/README.md still lists only using_r.py as the pixi-based example. Opening it via the README's default --sandbox (uv) installs marimo but not ffmpeg, so the cell fails with ffmpeg not found. Add the marimo edit --sandbox=pixi examples/misc/using_ffmpeg.py command and a Pixi installation link where the example is introduced (as using_r.py does in its header/intro cell).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At examples/misc/using_ffmpeg.py, line 9:
<comment>This example only runs with `marimo edit --sandbox=pixi` after installing Pixi and pulling `ffmpeg` from conda-forge, but the new file documents none of that: no intro markdown cell, no README entry, and `examples/misc/README.md` still lists only `using_r.py` as the pixi-based example. Opening it via the README's default `--sandbox` (uv) installs marimo but not ffmpeg, so the cell fails with `ffmpeg` not found. Add the `marimo edit --sandbox=pixi examples/misc/using_ffmpeg.py` command and a Pixi installation link where the example is introduced (as `using_r.py` does in its header/intro cell).</comment>
<file context>
@@ -0,0 +1,46 @@
+# channels = ["conda-forge"]
+#
+# [tool.pixi.dependencies]
+# ffmpeg = "*"
+# ///
+
</file context>
| "-f", "wav", "pipe:1", | ||
| ], | ||
| capture_output=True, | ||
| check=True, |
There was a problem hiding this comment.
P3: check=True swallows ffmpeg's stderr: on failure CalledProcessError shows only "returned non-zero exit status N" in the cell, so the actual ffmpeg diagnostic never appears. And when the notebook is opened without the pixi sandbox (the misc README explicitly allows marimo edit <notebook.py> with self-installed requirements), a missing ffmpeg raises a bare FileNotFoundError with no hint. Check the return code and surface stderr.decode(), and give a helpful message when ffmpeg is not on PATH. See the existing pattern in examples/cloud/modal/nbs/notebook.py which handles the missing-binary case.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At examples/misc/using_ffmpeg.py, line 39:
<comment>`check=True` swallows ffmpeg's stderr: on failure `CalledProcessError` shows only "returned non-zero exit status N" in the cell, so the actual ffmpeg diagnostic never appears. And when the notebook is opened without the pixi sandbox (the misc README explicitly allows `marimo edit <notebook.py>` with self-installed requirements), a missing `ffmpeg` raises a bare `FileNotFoundError` with no hint. Check the return code and surface `stderr.decode()`, and give a helpful message when ffmpeg is not on PATH. See the existing pattern in `examples/cloud/modal/nbs/notebook.py` which handles the missing-binary case.</comment>
<file context>
@@ -0,0 +1,46 @@
+ "-f", "wav", "pipe:1",
+ ],
+ capture_output=True,
+ check=True,
+ )
+ mo.audio(io.BytesIO(tone.stdout))
</file context>
305091c to
c0baa3d
Compare

Also renames
using_r.py->pixi_r.py.