Posts about Programs and Scripts (old posts, page 3)                 

✏

BATS - Scene detect

From raw footage to finished scenes

Got a long clip full of mixed shots? Scene Detect analyzes the clip optically, finds the scene changes, and creates one clip per scene – so your montages, highlight reels, and social clips start with ready-made building blocks that you just drag onto the timeline.

✂ TEASER END

How it works

Scene Detect is registered in the context menu of video clips in the BIN as a Scene Detect submenu with two system presets:

  • Easy – fully automatic: after the analysis, BAT Server applies the detected scene changes automatically with the default threshold. The Scene detect tab in EDIUS (which also shows the progress) then closes itself.
  • Advanced... – interactive: the Scene detect tab stays open after the analysis. Every detected scene change appears as a bar with thumbnails (frames right before/after the cut) and timecodes. You can adjust the threshold with a slider (presets: low / medium / high) or, in Refine mode, with one checkbox per cut. You confirm the result with the clips to BIN button.

The BIN then receives a folder Scenes: <file name> containing one clip per scene (named "Scene 1 - …", "Scene 2 - …", etc.), each with in/out points on the original file and a poster frame. N detected cuts produce N+1 scene clips. The original clip is left untouched; running Scene Detect again on the same clip refreshes the existing folder and its clips.

Options

  • Threshold (default: 50, i.e. 0.5 internally) – Controls which scene changes are applied: a higher value produces fewer, more distinct cuts; a lower value also picks up subtler transitions. In the Advanced tab you can adjust the threshold per file – the last used value is remembered per file and pre-selected on the next run.
  • Preview & navigation – In the Advanced tab you can inspect individual changes: hovering over a bar shows preview frames right before and after the cut, and the buttons let you jump straight to the position in EDIUS or play the new scene briefly in the player.
  • Caching – Analyzed files are cached. Re-runs on the same clip pick up the existing result cache and finish much faster instead of re-analyzing the video.

Note: Only one scene-detect job can run at a time. If the server is already busy with another clip, it reports "job is running" – in that case, just wait a moment.

How to use it

  1. Select the video clip in a BIN (Scene Detect is registered for video clips in the BIN).
  2. Right-click the clip → Scene Detect → Easy (automatic) or Advanced... (with preview).
  3. The Scene detect tab in EDIUS shows the analysis progress. With Easy it closes itself when finished; with Advanced, adjust the threshold if needed, fine-tune individual cuts with Refine, and confirm with clips to BIN.
  4. The BIN now contains the Scenes: <file name> folder with one clip per scene. Drag the scenes you want onto the timeline – scenes you don't need can simply be deleted in the BIN.

Managing the presets

Both are system presets: they appear in the EDIUS context menu, where you can temporarily disable or delete them. System presets are meant to stay unedited — for your own defaults (e.g. a threshold other than 50), create a personal preset with the BAT Server preset assistant, where you can change the threshold= value in the preset URL. A personal preset appears in the clip context menu under its own name.

✏

BATS - SmartMask

Cut a person or object out of the frame with AI – as a luma mask for the EDIUS Track Matte

SmartMask isolates the person or the object in the frame automatically using AI (model BiRefNet, Nvidia GPU accelerated) and saves the result as a luma mask (a black-and-white mask video). This mask can be used directly with EDIUS’s “Track Matte” – for example to place titles or graphics behind a person, to swap the person, or to retouch contours. No more manual masking clip by clip.

✂ TEASER END

Adding the menu entry

“SmartMask” is added through the “Add function...” assistant (right-click in the BIN → Add function... → pick SmartMask - foreground extract). The assistant’s questions:

  1. What should be isolated? (“Please select the preference what you like to isolate”): Person (model BiRefNet-portrait, optimized for portraits/main subject) or Object and Person (model BiRefNet, general purpose).
  2. Computation resolution (percent, 10–100, default 100): for accelerated mask calculation, a reduced resolution is used internally (e.g. 1080p → 540p at a factor of 50 %); the result is then extrapolated back to the source resolution. The smaller the factor, the faster – at the cost of precision. The internal size is limited to a maximum of 1024 px in any case.
  3. Add the result to the BIN?: Yes → the mask is registered in the BIN under __BAT Server\Mask (MP4, file stamp -mask); No → file only.
  4. Placement (BIN or timeline) and name (suggestion: “SmartMask <selection> <%>”), then [Preview '.bat0' file] / [Add menu entry].

How to use it

  1. Right-click the clip (BIN or timeline) → Mask submenu → your entry (e.g. “SmartMask Person 100%”).
  2. BAT Server lets BiRefNet compute the foreground mask – a finished mask video (white = foreground, black = background) as an MP4, optionally registered in the BIN under __BAT Server\Mask.
  3. In EDIUS: put the original clip in the track matte level and the generated mask below it (or vice versa, depending on the desired logic) – with “Track Matte” the object is cut out cleanly, e.g. to run text behind it.

Good to know

  • Person vs. object: the BiRefNet-portrait model (the “Person” option) is specialized for humans and delivers the cleanest results for portrait shots; choose “Object and Person” for products, vehicles or other items.
  • Use the computation resolution wisely: 100 % (default) is the most precise but takes longest – and with source material above 1024 px, BiRefNet downscales to a maximum of 1024 px internally anyway. For material with a clearly delimited foreground (plain background, few fine hairs/edges), 50–75 % is is often a good speed/quality compromise.
  • The result is a luma mask: the mask video is a normal video that EDIUS can ingest (MP4) – the information lives in the luminance channel. Fine-tuning (blur, re-touching) is possible directly in EDIUS.
  • Interlaced sources: the field order is passed to the plugin; for clean masks, progressive material (or deinterlacing beforehand, see Deinterlace) is the best route.
  • Nvidia GPU: BiRefNet runs on the Nvidia GPU – without a suitable GPU the entry is not really usable.

Managing the preset

Entries created via the assistant are user presets: the .bat0 file lives under C:\ProgramData\EdiusPowerTools\BAT-server\bat_files\BIN\ or …\bat_files\timeline\ depending on your choice, and can be freely edited, renamed or deleted (deleting removes the context-menu entry). Model, computation resolution and BIN registration are baked into the .bat0 – changes (e.g. a different percentage) take effect from the next run; for a different combination, simply create a second entry.

✏

BATS - Speech2Speech

Speech in any language? No – in English: transcribe, translate, re-voice

Speech2Speech turns spoken audio in any Whisper-supported language into an English voice-over: the assistant-created entry transcribes the audio with Whisper (model large-v2) and translates the text to English on the way – then the AI voice engine Kokoro (Nvidia GPU) speaks the text in a choice of US or UK English voices. A foreign-language interview or voice-over becomes an English-language audio clip with the same timing.

✂ TEASER END

Adding the menu entry

“Speech2Speech” is added through the “Add function...” assistant (right-click in the BIN → Add function... → pick Speech2Speech - Create English Voice). The assistant’s questions:

  1. Voice (“Please select the voice. English only.”): Heart (American, female), Michael (American, male), Lily (British, female) or George (British, male).
  2. Max. stretch (0–50 %, default 10 %): speech-rate adjustment to fit the sentences into the original time slots; recommended below 15 %, 0 % = off.
  3. Add result to the BIN? (“this preset will use the trimmed version of the selected file”) – Yes → additionally registered under __BAT Server\Speech.
  4. Placement (BIN or timeline) and name (suggestion: “Translate by <voice>”), then [Preview '.bat0' file] / [Add menu entry].

How to use it

  1. Right-click an audio clip (or a clip with audio) → Generate Speech submenu → your Speech2Speech entry (e.g. “Translate by Heart”).
  2. BAT Server extracts the audio of the IN/OUT range (16 kHz mono), transcribes + translates it with Whisper-Faster (large-v2) into an English SRT …
  3. … and lets Kokoro speak the SRT in the chosen voice. The WAV file is registered as an audio clip in the BIN (additionally under __BAT Server\Speech if you chose so in the assistant) – time stamps included, matching the clip’s frame rate.

Good to know

  • The result is always English: the source may be in any Whisper-supported language (the language is auto-detected) – the output voice is US or UK English.
  • Timing as in the original: the transcribed sentences inherit the time slots of the original speech; the stretch limit controls how far the speech rate is adapted.
  • Preconfigured on board: BAT Server additionally ships the system preset “Translate to English” (Whisper → Kokoro, voice Heart) for audio clips in the BIN – the assistant is for your own voices, names and placements.
  • Nvidia GPU: Kokoro runs on the Nvidia GPU; without a suitable GPU the entry is not really usable.

Managing the preset

Entries created via the assistant are user presets: the .bat0 file lives under C:\ProgramData\EdiusPowerTools\BAT-server\bat_files\BIN\ or …\bat_files\timeline\ depending on your choice, and can be freely edited, renamed or deleted (deleting removes the context-menu entry). Voice and stretch value are baked into the .bat0 – changes take effect from the next run.

✏

BATS - Speech2Subtitle

Subtitles from spoken speech – Whisper with word-exact timing, in three hardware variants

Speech2Subtitle turns an audio file (or the audio of a clip) into an SRT file with exact word timing – using Whisper, the proven AI transcription model. The “Add function...” assistant offers three variants, one per hardware: Intel-optimized (OpenVINO: NPU/GPU/CPU), Nvidia-optimized (Whisper-Faster) or iNPU-optimized (Whisper-NPU for Intel NPUs). All three transcribe in ~90 languages, can optionally translate the result to English, and file the finished SRT directly in the BIN.

✂ TEASER END

Adding the menu entry

In the assistant (right-click in the BIN → Add function...) pick the fitting variant – Speech2Subtitle - Intel optimized, … Nvidia optimized or … iNPU optimized. The shared questions:

  1. Language: “Auto-Detect The Language” or one of ~90 languages (Afrikaans … Yoruba).
  2. Translate? “Do you want to translate the result to English?” – Yes makes Whisper transcribe directly into English text (e.g. for foreign-language interviews).
  3. Scope: the entire video or the clip’s IN/OUT part.
  4. Placement (BIN or timeline) and name of the menu entry – the assistants pre-fill it sensibly (e.g. “German, standard, Model Medium, NPU”).

Variant-specific questions on top:

  • Intel (OpenVINO): device (Intel NPU / Intel GPU / CPU – AMD included), subtitle format (standard: max. 42 characters per line, max. two lines · standard asia: max. 16 characters per line · one sentence per line – great for TTS · one word per line) and model size (Tiny, Base, Small, Medium – recommended, Large V2, Large V3; bigger = more precise, but slower).
  • Nvidia (Whisper-Faster): the same subtitle format, plus high precision (float16) – mandatory from the RTX 5000 series up, simply “No” without an Nvidia GPU – and model size (Tiny … Large V3, Turbo; Medium recommended).
  • iNPU (Whisper-NPU): choose the hardware (NPU / GPU / CPU – must be Intel hardware) and the subtitle format. The model is fixed at medium here, and a VAD phase detection (silence detection) is permanently active. Note from the assistant: keep the Intel NPU driver current (version 32.0.100.3053 or newer).

How to use it

  1. Right-click an audio clip in the BIN → Generate Subtitle submenu → your entry (e.g. “German, standard, Model Medium, NPU”).
  2. BAT Server first extracts the audio (16 kHz mono, optionally the IN/OUT part) and lets Whisper transcribe it – progress in the job display.
  3. The finished SRT is registered in the BIN under __BAT Server\Subtitle automatically (file stamp _stt, with a format suffix for the Intel variant). From there it can be taken into an MKV via SubtitleMerge, or used as a speech source for Text2Speech/Convert2Speech.

Good to know

  • Variant = hardware: Nvidia GPU → Nvidia variant (fastest on RTX); Intel system with NPU → iNPU variant (and a current NPU driver); everything else (Intel/AMD without NPU) → Intel OpenVINO variant (GPU or CPU).
  • Weigh the model size: Medium is the sensible default; Large/Turbo are more precise (esp. filler words, technical terms) but take considerably longer – with the Nvidia variant, float16 is mandatory from RTX 5000 up.
  • Line formats: “standard”/“standard asia” are meant for display as subtitles; “one sentence per line” optimizes the SRT for downstream Text2Speech presets, “one word per line” for maximum granularity (e.g. marker/tag workflows).
  • New file, original kept: only the SRT file is created; the audio original remains untouched.

Managing the preset

Entries created via the assistant are user presets: the .bat0 file lives under C:\ProgramData\EdiusPowerTools\BAT-server\bat_files\BIN\ or …\bat_files\timeline\ depending on your choice, and can be freely edited, renamed or deleted (deleting removes the context-menu entry). Language, translation, format, model and device are baked into the .bat0 – changes take effect from the next run.