<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Harry Xu</title>
    <description>The latest articles on DEV Community by Harry Xu (@harry_xu_74d04f7a971995d5).</description>
    <link>https://dev.to/harry_xu_74d04f7a971995d5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4084268%2F11979c5e-78ba-4c38-a8cc-8994fe58c5a8.png</url>
      <title>DEV Community: Harry Xu</title>
      <link>https://dev.to/harry_xu_74d04f7a971995d5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/harry_xu_74d04f7a971995d5"/>
    <language>en</language>
    <item>
      <title>Building a local video search CLI with ffmpeg and OpenCLIP</title>
      <dc:creator>Harry Xu</dc:creator>
      <pubDate>Tue, 25 Aug 2026 12:45:27 +0000</pubDate>
      <link>https://dev.to/harry_xu_74d04f7a971995d5/building-a-local-video-search-cli-with-ffmpeg-and-openclip-3a5g</link>
      <guid>https://dev.to/harry_xu_74d04f7a971995d5/building-a-local-video-search-cli-with-ffmpeg-and-openclip-3a5g</guid>
      <description>&lt;p&gt;I often remember the shot I want before I remember its filename.&lt;/p&gt;

&lt;p&gt;That gap is what &lt;strong&gt;binquery&lt;/strong&gt; is for. It is a local Python CLI that indexes video clips and turns a sentence into a ranked shortlist for a human to review. It deliberately stops before editing: no timeline generation, no automatic cut, and no render.&lt;/p&gt;

&lt;h2&gt;
  
  
  The smallest reproducible trial
&lt;/h2&gt;

&lt;p&gt;You can test the complete installed command path without supplying footage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
.venv/bin/pip &lt;span class="nb"&gt;install &lt;/span&gt;binquery
.venv/bin/binquery demo &lt;span class="nt"&gt;--out&lt;/span&gt; /tmp/binquery-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The demo generates a synthetic 30-second video locally, then exercises splitting, indexing, validation, and querying. The first run may download OpenCLIP model weights.&lt;/p&gt;

&lt;p&gt;This is an end-to-end pipeline smoke test, &lt;strong&gt;not&lt;/strong&gt; evidence of semantic search quality on real footage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why keep the architecture small?
&lt;/h2&gt;

&lt;p&gt;The current design uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ffmpeg&lt;/strong&gt; to sample three frames from each clip&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenCLIP ViT-B-32&lt;/strong&gt; to build the local visual index&lt;/li&gt;
&lt;li&gt;plain &lt;strong&gt;JSON and NumPy files&lt;/strong&gt; for metadata and vectors&lt;/li&gt;
&lt;li&gt;a JSON result containing clip paths, scores, and ranking signals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is no database, vector service, or daemon to operate. Querying an existing index does not resample the footage or rebuild the full index.&lt;/p&gt;

&lt;p&gt;The trade-off is straightforward: three frames keep indexing understandable and bounded, but they can miss important content in long or visually varied clips. I would rather expose that limitation than market a synthetic demo as a quality benchmark.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ranking signals are not explanations
&lt;/h2&gt;

&lt;p&gt;The output includes fields such as &lt;code&gt;score&lt;/code&gt;, &lt;code&gt;gate&lt;/code&gt;, and &lt;code&gt;reasons&lt;/code&gt;. Here, &lt;code&gt;reasons&lt;/code&gt; means ranking signals recorded by the pipeline. It should not be interpreted as a reliable semantic explanation of why a clip is correct.&lt;/p&gt;

&lt;p&gt;That distinction matters because a plausible-looking explanation can create more confidence than the underlying retrieval quality deserves. The shortlist is meant to reduce what a person must inspect, not replace editorial judgment.&lt;/p&gt;

&lt;h2&gt;
  
  
  What binquery does not do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It does not build a timeline or export a finished edit.&lt;/li&gt;
&lt;li&gt;It does not claim that the synthetic demo measures retrieval quality.&lt;/li&gt;
&lt;li&gt;It does not turn every indexed metadata field into a user-facing search filter.&lt;/li&gt;
&lt;li&gt;It does not hide the first-run model download.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I want feedback on
&lt;/h2&gt;

&lt;p&gt;I would especially value criticism of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;the three-frame sampling strategy,&lt;/li&gt;
&lt;li&gt;the CLI and JSON output contracts,&lt;/li&gt;
&lt;li&gt;packaging and first-run installation failures, and&lt;/li&gt;
&lt;li&gt;useful ways to evaluate ranking quality without committing private footage to the repository.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The project is MIT licensed and available on &lt;a href="https://github.com/jennifferweslowski-design/binquery" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. Version 0.3.0 is also on &lt;a href="https://pypi.org/project/binquery/0.3.0/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt; with a corresponding &lt;a href="https://github.com/jennifferweslowski-design/binquery/releases/tag/v0.3.0" rel="noopener noreferrer"&gt;GitHub Release&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;AI assistance disclosure:&lt;/strong&gt; AI tools assisted parts of development, review, and preparation of this article. I personally checked the repository changes, tests, release artifacts, published package, and the factual claims above. Remaining limitations and unverified behavior are documented rather than presented as measured results.&lt;/p&gt;

</description>
      <category>python</category>
      <category>opensource</category>
      <category>machinelearning</category>
      <category>programming</category>
    </item>
    <item>
      <title>session-close: write the handoff, fail if the card is empty</title>
      <dc:creator>Harry Xu</dc:creator>
      <pubDate>Wed, 19 Aug 2026 07:50:23 +0000</pubDate>
      <link>https://dev.to/harry_xu_74d04f7a971995d5/session-close-write-the-handoff-fail-if-the-card-is-empty-1leo</link>
      <guid>https://dev.to/harry_xu_74d04f7a971995d5/session-close-write-the-handoff-fail-if-the-card-is-empty-1leo</guid>
      <description>&lt;p&gt;A coding session ends. The next one starts from zero.&lt;/p&gt;

&lt;p&gt;session-close is a local Python CLI. You fill a close card. It checks the fields, then writes &lt;code&gt;SESSION_LOG.md&lt;/code&gt; (prepend one entry) and &lt;code&gt;NEXT.md&lt;/code&gt; (open items + exactly three opening lines). Empty skeleton fails: &lt;code&gt;doctor&lt;/code&gt; exit 2, no files written. &lt;code&gt;status&lt;/code&gt; is read-only git. It does not commit.&lt;/p&gt;

&lt;p&gt;It is not a model. It is not Superpowers or GSD. It is not on PyPI. Clone, then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
.venv/bin/pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
./session-close doctor &lt;span class="nt"&gt;--in&lt;/span&gt; examples/ok.json
./session-close emit &lt;span class="nt"&gt;--in&lt;/span&gt; examples/ok.json &lt;span class="nt"&gt;--root&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Skill install is instructions only. It does not install the Python package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; skills add jennifferweslowski-design/session-close
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/jennifferweslowski-design/session-close" rel="noopener noreferrer"&gt;https://github.com/jennifferweslowski-design/session-close&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>cli</category>
      <category>productivity</category>
    </item>
    <item>
      <title>binquery: scene-sequence and rushes intents (local shortlist, not Premiere)</title>
      <dc:creator>Harry Xu</dc:creator>
      <pubDate>Wed, 19 Aug 2026 05:15:46 +0000</pubDate>
      <link>https://dev.to/harry_xu_74d04f7a971995d5/binquery-scene-sequence-and-rushes-intents-local-shortlist-not-premiere-3cih</link>
      <guid>https://dev.to/harry_xu_74d04f7a971995d5/binquery-scene-sequence-and-rushes-intents-local-shortlist-not-premiere-3cih</guid>
      <description>&lt;p&gt;Two public editor asks map onto a local shortlist CLI. That is a mapping, not a claim we ran their bins.&lt;/p&gt;

&lt;p&gt;You have a pile of separately-cut scenes and you lose the original order when they hit a Premiere master. &lt;a href="https://www.reddit.com/r/VideoEditing/comments/1vppcap/how_can_i_paste_a_lot_of_scenes_in_the_master/" rel="noopener noreferrer"&gt;One r/VideoEditing thread&lt;/a&gt; is about pasting a lot of scenes into a master. binquery does not paste into Premiere, restore NLE markers, or read original sequence from the files. It takes &lt;strong&gt;one visual-intent sentence per scene&lt;/strong&gt; and returns 8–15 clips (&lt;code&gt;path&lt;/code&gt;, &lt;code&gt;score&lt;/code&gt;, &lt;code&gt;gate&lt;/code&gt;, &lt;code&gt;reasons&lt;/code&gt;). You keep the &lt;strong&gt;query order&lt;/strong&gt; as your sequence memory. People still watch.&lt;/p&gt;

&lt;p&gt;Trailer work often starts from rushes / dailies, not a locked master. &lt;a href="https://www.reddit.com/r/editors/comments/1vq6rbv/do_trailer_editors_typically_work_from_raw_rushes/" rel="noopener noreferrer"&gt;One r/editors thread&lt;/a&gt; asks whether trailer editors work from raw rushes. Index &lt;strong&gt;your own&lt;/strong&gt; folder, then one trailer-intent sentence → the same shortlist. It is not an auto-cut trailer.&lt;/p&gt;

&lt;p&gt;These are unmatched pictorial queries. Unknown sentences still run. You do not have to edit &lt;code&gt;src/intents.py&lt;/code&gt;. We have not run this against a real ~500-clip bin. CI only builds 3 lavfi clips and runs &lt;code&gt;index&lt;/code&gt; → &lt;code&gt;doctor&lt;/code&gt;. A real demo needs your own folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;BINQUERY_INDEX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;./my-box
./binquery index &lt;span class="nt"&gt;--input&lt;/span&gt; ./my-videos &lt;span class="nt"&gt;--index&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$BINQUERY_INDEX&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
./binquery doctor &lt;span class="nt"&gt;--index&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$BINQUERY_INDEX&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="c"&gt;# scene-sequence: one sentence per scene, keep this order yourself&lt;/span&gt;
./binquery query &lt;span class="nt"&gt;--index&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$BINQUERY_INDEX&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"scene 2 empty hallway lock-off"&lt;/span&gt;
&lt;span class="c"&gt;# rushes / trailer intent: one sentence against your own rushes box&lt;/span&gt;
./binquery query &lt;span class="nt"&gt;--index&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$BINQUERY_INDEX&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"cold open wide empty night"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Skill install is instructions only. It does not install the Python package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; skills add jennifferweslowski-design/binquery
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/jennifferweslowski-design/binquery" rel="noopener noreferrer"&gt;https://github.com/jennifferweslowski-design/binquery&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>cli</category>
      <category>video</category>
    </item>
    <item>
      <title>binquery: a local CLI shortlist, now also an agent skill</title>
      <dc:creator>Harry Xu</dc:creator>
      <pubDate>Wed, 19 Aug 2026 04:53:30 +0000</pubDate>
      <link>https://dev.to/harry_xu_74d04f7a971995d5/binquery-a-local-cli-shortlist-now-also-an-agent-skill-2pl1</link>
      <guid>https://dev.to/harry_xu_74d04f7a971995d5/binquery-a-local-cli-shortlist-now-also-an-agent-skill-2pl1</guid>
      <description>&lt;p&gt;I cut from a local footage box. I wanted 8–15 candidates from one sentence, not a full-library skim and not an auto-edit.&lt;/p&gt;

&lt;p&gt;binquery is a local Python CLI. You index your own folder with ffmpeg + OpenCLIP. query encodes only the sentence and prints a shortlist: path, score, gate, reasons. Limit is 8–15. People still watch.&lt;/p&gt;

&lt;p&gt;It is not a browser. It is not on PyPI. Clone, then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
.venv/bin/pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Needs ffmpeg / ffprobe on the machine.&lt;/p&gt;

&lt;p&gt;Agents can install the instructions as a skill (this does not install the Python package):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; skills add jennifferweslowski-design/binquery
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or copy &lt;code&gt;skills/binquery/&lt;/code&gt; into &lt;code&gt;.agents/skills/binquery&lt;/code&gt; or &lt;code&gt;.claude/skills/binquery&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/jennifferweslowski-design/binquery" rel="noopener noreferrer"&gt;https://github.com/jennifferweslowski-design/binquery&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>cli</category>
      <category>video</category>
    </item>
  </channel>
</rss>
