Render completion notifications
Rendering a scene in Blender, exporting a timeline in DaVinci, stitching in
ffmpeg, a big make build — all of these run for tens of minutes, sometimes
hours. Instead of watching a progress bar, hook a push to completion: how long
it took and how it ended.
Universal &&/|| trick
Section titled “Universal &&/|| trick”The simplest approach — append with && (success) and || (failure):
blender -b scene.blend -o //out/ -f 1 && \ notifly-send "✅ Рендер готов" "scene.blend" 5 || \ notifly-send "❌ Рендер упал" "См. терминал" 8The same trick with ; when the status doesn’t matter, only the fact of finishing:
make -j$(nproc) ; notifly-send "🏁 Сборка завершена" "rc=$?" 5The notifly-render wrapper
Section titled “The notifly-render wrapper”To get the duration and exit code into the push, run the command inside a wrapper:
#!/usr/bin/env bash# ~/bin/notifly-render — `notifly-render ffmpeg -i in.mkv ... out.mp4`set -uset -a; source ~/.notifly.env; set +a
START=$(date +%s)LABEL="$*"LABEL="${LABEL:0:60}" # trim the long command line
"$@" # run the long process itselfRC=$?
END=$(date +%s)ELAPSED=$(printf '%02d:%02d:%02d' $(( (END-START)/3600 )) $(( (END-START)%3600/60 )) $(( (END-START)%60 )))
if (( RC == 0 )); then notifly-send "✅ Готово: $LABEL" "Время: $ELAPSED" 5else notifly-send "❌ Ошибка (rc=$RC): $LABEL" "Время: $ELAPSED" 8fiexit $RCUsage:
notifly-render blender -b scene.blend -o //out/ -anotifly-render ffmpeg -i input.mov -c:v libx265 -crf 24 out.mp4notifly-render make -j$(nproc)Success arrives at priority 5, failure at 8 (louder, gets through DND per the OS rules; see priorities).
DaVinci Resolve: exporting from the queue
Section titled “DaVinci Resolve: exporting from the queue”Resolve can run a script after a render through Deliver → “Render” with an external command, but it’s simpler to wrap the headless render:
notifly-render /opt/resolve/bin/resolve -nogui -render project.drpBatch render: a push after each and a summary
Section titled “Batch render: a push after each and a summary”for f in shots/*.blend; do if notifly-render blender -b "$f" -o "//render/$(basename "$f" .blend)_" -a; then : fidonenotifly-send "🎬 Все шоты готовы" "Рендеров: $(ls render/*.png | wc -l)" 6Windows: PowerShell Notifly-Render
Section titled “Windows: PowerShell Notifly-Render”An equivalent wrapper for Windows. Assumes a configured
function Send-Notifly.
param([Parameter(Mandatory, ValueFromRemainingArguments)] [string[]]$Cmd). $env:USERPROFILE\Documents\WindowsPowerShell\Notifly.ps1
$start = Get-Date$label = ($Cmd -join ' ')$label = $label.Substring(0, [Math]::Min(60, $label.Length))
& $Cmd[0] $Cmd[1..($Cmd.Count-1)] # run the long process$rc = $LASTEXITCODE$dur = ((Get-Date) - $start).ToString('hh\:mm\:ss')
if ($rc -eq 0) { Send-Notifly -Title "✅ Готово: $label" -Message "Время: $dur" -Priority 5} else { Send-Notifly -Title "❌ Ошибка (rc=$rc): $label" -Message "Время: $dur" -Priority 8}exit $rcUsage and an alias in your PowerShell profile:
Set-Alias nrender C:\scripts\Notifly-Render.ps1nrender blender -b scene.blend -o //out/ -anrender ffmpeg -i input.mov -c:v libx265 -crf 24 out.mp4A one-off variant via PowerShell’s && equivalent:
blender -b scene.blend -o //out/ -aif ($LASTEXITCODE -eq 0) { Send-Notifly -Title "✅ Рендер готов" -Priority 5 }else { Send-Notifly -Title "❌ Рендер упал" -Priority 8 }Benefits
Section titled “Benefits”- No babysitting the progress bar. Go grab a coffee — the push brings you back at the right moment.
- Result at a glance. Duration and exit code: success quietly, failure loudly.
- Metrics to reason with. Over time you learn how long a scene render really takes.
Further improvements
Section titled “Further improvements”- Add the size of the output file to the message (
du -h out.mp4). - Attach the tail of the render log via
extras— see extra fields. - Queue up renders and send a single summary push for the whole batch.