From MythTV Official Wiki
Revision as of 10:26, 1 August 2013 by NigelPearson (talk | contribs) (Needed to import from /dev/hdd, so added drive arg)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Important.png Note: The correct title of this article is It appears incorrectly here due to technical restrictions.

Author Nigel Pearson
Description Adds previously MythArchived tracks to new recordings, for creating new DVDs
Supports Version21.png  

This tacky shell script was created as an extra menu item in MythArchive. It sort of does the opposite of Archiving TV recordings. My wife uses it to create new DVD compilations from previously created DVDs. e.g. a new science TV programme on earthworms is recorded, so she imports old clips about green waste processing or composting, and MythArchives them all out onto a new disc.

This was for an old KnoppMyth machine that had been upgraded to 0.21. Current probably behaves very differently.



if [ $# -ne 0 ]

cd /myth/tv

dvdunauthor $DRIVE
eject       $DRIVE

# We now have files like:
# dvdauthor.xml    vob_01m_004.vob  vob_01m_009.vob  vob_01t_005.vob
# vob_00m_001.vob  vob_01m_005.vob  vob_01t_001.vob  vob_01t_006.vob
# vob_01m_001.vob  vob_01m_006.vob  vob_01t_002.vob  vob_01t_007.vob
# vob_01m_002.vob  vob_01m_007.vob  vob_01t_003.vob
# vob_01m_003.vob  vob_01m_008.vob  vob_01t_004.vob
# We only care about the titles.

rm -f dvdauthor.xml vob_*m_*.vob
sleep 10

# Script to drive the prompts in
echo 'y

DVD import

' > /tmp/importDVD.txt

# Insert as recordings:
for i in *.vob
do mv $i $i.mpeg2 -f $i.mpeg2 --dir /myth/tv < /tmp/importDVD.txt

rm /tmp/importDVD.txt
sleep 5

# Fix the seektable.
# The 'mythcommflag  --rebuild' in doesn't
# seem to work on these files, so we have to do it differently.
# Filename prefix has now changed, so to fix seektable,
# we dumbly process all recent files with the suffix.

#for i in *.mpeg2
#do mythtranscode -m -b -i $i

find . -name \*.mpeg2 -cmin -90 -print -exec mythtranscode -m -b -i {} \;

rm -f /myth/tv/*.mpeg2.tmp