2026-05-30, 07:18 PM
I don't know about TVHeadEnd, but you can do this in jellyfin with a post processing script. An example from mine, though I'm just copying the content from the original TS container to MP4. Adjust the ffmpeg command appropriately.
![[Image: attachment.php?aid=9733]](https://forum.jellyfin.org/attachment.php?aid=9733)
Code:
#!/bin/bash
INPUTFILE=$1 # This is the path variable in the Jellyfin screenshot above
NEWFILE=$(echo "$INPUTFILE" | sed 's/\.ts/\.mp4/g')
/usr/lib/jellyfin-ffmpeg/ffmpeg -nostdin -y -fflags +genpts+igndts -i "$INPUTFILE" -map 0 -codec copy -max_muxing_queue_size 2048 -avoid_negative_ts disabled -max_interleave_delta 0 "$NEWFILE"
rm -f "$INPUTFILE"
