# Python - Merge Offline

**URL:** <https://forum.logik.tv/t/python-merge-offline/14725>\
**Category:** Python\
**Tags:** python, conform, automation\
**Created:** [July 30, 2026, 8:07pm UTC](https://forum.logik.tv/t/python-merge-offline/14725 "2026-07-30T20:07:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryanb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/bryanb/32/136_2.png) [@bryanb](https://forum.logik.tv/u/bryanb)\
**Post date:** [July 30, 2026, 8:07pm UTC](https://forum.logik.tv/t/python-merge-offline/14725/1 "2026-07-30T20:07:50Z")

</div>

Hey Friends - New on [logik-portal.com](http://logik-portal.com) is my “Merge Offline” script.

You have many xml and reference videos that need to get merged. This script will:

- put the offline reference on a new bottom track of the XML
- cut off any lead-in, 2-pop, etc before 1:00:00:00
- Lock the reference video and audio
- Add 1 second black to the beginning and end
- Set the reference video as Secondary Track (ready for context viewing)

The XML and Reference need to be similarly named and the reference needs to have “Ref” “Reference” or “Offline” in the name.

Let me know if there are other steps you would like to automate.

[![](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/5/59a1c3efdbe3dafc965510ec548171713d1d017e.jpeg "Flame Python - Merge Offline") ](https://www.youtube.com/watch?v=JTbhIP_4qf8)

---

<div class="post-metadata">

**Author:** ![TimC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/timc/32/11881_2.png) [@TimC](https://forum.logik.tv/u/TimC)\
**Post date:** [August 1, 2026, 5:46pm UTC](https://forum.logik.tv/t/python-merge-offline/14725/2 "2026-08-01T17:46:19Z")

</div>

im gonna get years of my life back with this. thanks @bryanb
