Excel2xspf: Turn a Spreadsheet Into a Video Edit List

A tiny Python script that converts Excel rows into VLC playlists with start and stop times, so you can build non-destructive highlight reels without opening a video editor.

6 min read • View on GitHub • More from fsanchez83

A wide editorial scene shows a spreadsheet projected like a control panel above a desk. Rows feed a film strip into a media player, while sealed video reels sit untouched beside it. The image explains the core idea that Excel can act as a non-destructive timeline for clip playback.
The spreadsheet is not storing the video. It is storing the decision about which parts VLC should play.
Key Takeaways

The spreadsheet is the timeline

The surprise in fsanchez83/Excel2xspf is not that it writes a playlist. It is that it lets a spreadsheet behave like a lightweight editing surface. Each row can describe a clip: which source file to open, where to start, where to stop.

That changes the job. You are no longer trimming footage in a timeline app. You are curating segments from existing media, often the way people already work when they log archive footage, lectures, or event recordings in Excel.

The source video stays intact. The script just turns rows into playback instructions, which makes the whole workflow feel like non-destructive editing without the editor.

Why XSPF, not a video editor

XSPF is a playlist format, not a media editor format. That is exactly why it works here. Excel2xspf is not cutting files. It is generating instructions that VLC can interpret as clip boundaries.

A single row moves through parsing, URI conversion, and XSPF generation before VLC turns it into a playable clip.

ApproachWhat it optimizes forWhat it asks of youWhere it breaks down
Full video editorFine-grained timeline controlLearn a heavy interface and manipulate media directlyToo much machinery for simple highlight reels
Manual VLC playlistFast playbackHand-build paths and timestamps every timeGets brittle as the number of clips grows
Excel2xspfSpreadsheet-driven clip playbackMaintain clean rows in Excel and run a scriptNarrow, script-shaped, and not a general editing tool

That niche is the point. The tool does not try to replace Premiere or DaVinci Resolve. It replaces a much smaller annoyance: the friction between media notes in a spreadsheet and actual segmented playback.

How one Excel row becomes a playable clip

The code path is short enough to read in one sitting. It loads the spreadsheet, loops over rows, converts timestamps to seconds, normalizes each source path into a file URI, and writes XSPF with VLC-specific options.

from pathlib import Path
import pandas as pd


def time_to_seconds(t):
    parts = list(map(int, t.split(':')))
    if len(parts) == 2:
        minutes, seconds = parts
        return minutes * 60 + seconds
    hours, minutes, seconds = parts
    return hours * 3600 + minutes * 60 + seconds


df = pd.read_excel("RUTA_AL_ARCHIVO_EXCEL")

for _, row in df.iterrows():
    uri = Path(row["video_fuente"]).absolute().as_uri()
    start = time_to_seconds(row["inicio"])
    stop = time_to_seconds(row["fin"])
    # write XSPF entry with VLC options for start-time and stop-time

That `Path(...).absolute().as_uri()` line is the quietest important choice in the repo. Excel users often think in Windows paths or local filesystem paths. VLC wants a URI. The conversion makes the playlist portable and keeps the output valid for a player that expects a web-style address, even when the source is a local file.

A close-up shows a spreadsheet cell containing a Windows file path on one side and a clean URI inside an XML tag on the other. The image focuses on the translation from local path syntax to playlist-safe address syntax, which is the key portability step in the script.
The crucial move is not the playlist itself. It is converting a local path into something VLC can reliably consume.

The other trick is VLC itself. The playlist carries options like start-time and stop-time, so the player can jump directly to the clip boundaries instead of opening the file from zero and making you scrub manually.

The clever part: file paths become URIs

This repo is small, but it pays attention to format boundaries. Plain file paths are convenient for humans and fragile for interchange. URIs are the safer contract when the output is XML and the consumer is a media player.

That is why the script feels more polished than its size suggests. It does not just dump text into a file. It translates one domain’s habit, a spreadsheet path, into another domain’s expectation, a playlist URI.

<track>
  <location>file:///C:/Videos/clip.mp4</location>
  <extension application="http://www.videolan.org/vlc/playlist/0">
    <vlc:option>start-time=120</vlc:option>
    <vlc:option>stop-time=145</vlc:option>
  </extension>
</track>

What the script trades away to stay simple

Simpler choice in Excel2xspfWhat it buysWhat it costs
Manual XML writingEasy to read and editLess protection from malformed structure
Hardcoded input placeholderFewer moving partsNo friendly command-line interface
Minimal validationFast path from sheet to playlistYou must keep spreadsheet columns consistent
Single-purpose designLow cognitive overheadNot suited to broader media workflow automation

That tradeoff is intentional. This is not trying to be a general-purpose media platform. It is a personal utility that stays legible precisely because it refuses to grow a GUI, a plugin system, or a deep validation layer.

For the right user, that is a feature. The barrier to entry is low enough that the spreadsheet can remain the source of truth, and the script can remain a thin adapter between notes and playback.

Where this fits in the tool landscape

Tool classBest atLeast suited for
Nonlinear video editorCreative trimming, effects, and fine controlQuick playback from structured metadata
Spreadsheet workflowLogging, sorting, and human-readable planningTimeline manipulation
Excel2xspfTurning rows into playable clip sequencesGeneral editing, compositing, and post-production

The real competition is not another repository. It is the habit of doing media planning in spreadsheets and then manually recreating that structure in a player. Excel2xspf collapses that gap.

It is a small script, but the idea is bigger than the codebase. A spreadsheet can act like an editing interface when the output is a playlist format and the player understands clip boundaries.