Tighten the trailer to 1:30 and fix its two audio faults
Cut 3 of LIFETIME MEMBERS: the intro music no longer runs into Reg's first line, Ambrose finishes "...still waiting for a result" (line ends are now measured off each take instead of the QA transcript), every shot is tighter, and the black title cards are set larger. Cut 2 stays on disk beside it as the reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d388004eac
commit
5fba837ead
5 files changed
+65
-36
No files matched your search
@@ -3,6 +3,7 @@
|
||||
the soundtrack (an audio model hears it so the cut does not rest on guesswork).
|
||||
|
||||
uv run --with requests python tools/trailer/qa.py <clip.mp4> [frames=6]
|
||||
uv run --with requests python tools/trailer/qa.py --ask <media> "<question>" # any file, any question
|
||||
"""
|
||||
import base64, json, os, subprocess, sys, tempfile
|
||||
|
||||
@@ -11,6 +12,18 @@ import requests
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
from gen import API, H, OUT
|
||||
|
||||
def ask(media, question, model=os.environ.get('QA_LISTENER', 'google/gemini-2.5-pro')):
|
||||
wav = tempfile.mktemp(suffix='.wav')
|
||||
subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', media, '-ac', '1', '-ar', '16000', wav], check=True)
|
||||
r = requests.post(f'{API}/chat/completions', headers=H(), json={'model': model, 'messages': [{'role': 'user', 'content': [
|
||||
{'type': 'text', 'text': question},
|
||||
{'type': 'input_audio', 'input_audio': {'data': base64.b64encode(open(wav, 'rb').read()).decode(), 'format': 'wav'}}]}]},
|
||||
timeout=600)
|
||||
return r.json()['choices'][0]['message']['content'] if r.ok else r.text[:500]
|
||||
|
||||
|
||||
if sys.argv[1] == '--ask':
|
||||
sys.exit(print(ask(sys.argv[2], sys.argv[3])))
|
||||
clip = sys.argv[1]
|
||||
n = int(sys.argv[2]) if len(sys.argv) > 2 else 6
|
||||
name = os.path.splitext(os.path.basename(clip))[0]
|
||||
|
||||
Reference in new issue
Block a user