Skip to content

Add ffmpeg pixi example for blog post - #10993

Merged
manzt merged 1 commit into
mainfrom
push-wxvmzrzyqvvx
Sep 25, 2026
Merged

manzt merged 1 commit into
mainfrom
push-wxvmzrzyqvvx

Conversation

@manzt

@manzt manzt commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Also renames using_r.py -> pixi_r.py.

Copilot AI lite review requested due to automatic review settings September 25, 2026 15:50
@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
marimo-docs Ready Ready Preview Sep 25, 2026 4:07pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@manzt manzt added the documentation Improvements or additions to documentation label Sep 25, 2026
@manzt
manzt requested review from akshayka and removed request for akshayka September 25, 2026 15:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Low severity

Open (1)
What changed in this PR

Adds a Pixi-backed FFmpeg audio example with reactive tone generation.

Changes:

  • Declares ffmpeg as 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.

Comment on lines +5 to +9
# [tool.pixi.workspace]
# channels = ["conda-forge"]
#
# [tool.pixi.dependencies]
# ffmpeg = "*"

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 = "*"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

akshayka
akshayka previously approved these changes Sep 25, 2026
@manzt
manzt merged commit bff3951 into main Sep 25, 2026
30 checks passed
@manzt
manzt deleted the push-wxvmzrzyqvvx branch September 25, 2026 16:07

This branch was successfully deployed

1 active deployment
Preview — c0baa3da Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants