Moving recordings

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
racelife
Newcomer
Posts: 1
Joined: Tue Dec 22, 2015 12:20 am
United States of America

Moving recordings

Post by racelife »

Hello all!

background info: I have mythbuntu setup as a backend server only to record tv from an HDHomerun Prime cable card tuner. For front end units I have Raspberrypi's running openelec (XBMC) they aren't super fast but they are cheap and quiet...

Now for the question: My mythbuntu box doesn't have a very big hard drive and I have a network hard drive that serves all of my other media to my RaspberryPi. Is there an easy way to automatically transfer the recordings to the network hd with the meta data intact? maybe even transcode them so they take up less space?

One more thing. My mithfilldatabase isn't automatically running so I have to remember to run it manually often to keep my epg populated. I haven't done any settings other than the basic first time setup so I can't imagine that I've messed anything up. Is this a common bug or is there somewhere I can check to see what's going wrong?

Thanks for your time,
Stephen
User avatar
diyhouse
Senior
Posts: 223
Joined: Mon Mar 31, 2014 9:42 am
Great Britain

Re: Moving recordings

Post by diyhouse »

Hi,.. you ask many interesting questions,.. and I will not pertain to know all the answers.... but in my limited knowledge here are some options you can play with.

You can create many storage locations,.. and just let Myth manage then,... nice an' easy!! Yes you can upgrade you hardware and move files to a larger disk,... Moving the folder/directory contents to a new location, registering this location in myth storage,.. setting privs/ownership etc accordingly,. job done ( if you keep the same directory structure then nothing to change just more space to use ). The clever thing here is that at powerup/initialisation Myth reads all the files in its defined storage areas and matches the filenames to references stored in its database,.. where all the other clever stuff is stored,...
So as long as you maintain backups of your database the recording can be stored in any named storage areas, and moved if required, with all relevant meta data preserved.

Moving and transcoding,.. can be all scheduled,.. cannot say I know too much here, but this is all possible,.. check out storage groups,... and user tasks I would suggest,.. there is a mountain of stuff to read here... ( just remember Rome was not built in a day,.. as is a Mythtv Media centre, it evolves )

Now Mythfilldatabase (mfdb) not running automatically,.. goto myth-setup,.. go into general setting and go to page 12 or something,.. "Program Schedule Download options",... 1st make sure Auto update is ticked,..

The second thing, is make sure myth can run mfdb,.. sounds daft yes,.. but running mfdb as logged-in user is NOT the same as user-Mythtv running mfdb...

To verify:- login as user,.. then

Code: Select all

sudo su - mythtv
then run mfdb,.. and verify if everything runs without a hitch.... There are log files in /var/log/mythtv to look at which can give clues to problems... ( when you've finished with mythtv user,.. Crtl-D to log-out from that user )

trust that gives you some ideas,... enjoy
User avatar
dekarl
Developer
Posts: 228
Joined: Thu Feb 06, 2014 11:01 pm
Germany

Re: Moving recordings

Post by dekarl »

racelife wrote:Now for the question: My mythbuntu box doesn't have a very big hard drive and I have a network hard drive that serves all of my other media to my RaspberryPi. Is there an easy way to automatically transfer the recordings to the network hd with the meta data intact? maybe even transcode them so they take up less space?
There are lots of things that can be done to achieve such a result. Please note that transcoding to save space is frowned upon. (It has it uses to make recordings compatible with some playback devices, though.) In my usage scenario I get space savings of between 25% and 50% by just using lossless cut, throwing out unwanted (audio) streams and switching to a more efficient container. But without re-encoding the video stream.
skinah
Junior
Posts: 53
Joined: Sat Oct 17, 2015 11:56 pm

Re: Moving recordings

Post by skinah »

I run the script found at this thread..
viewtopic.php?f=2&t=1261
I then use a program called 'Media Companion' to fetch the metadata and create NFO files. It will also rename the files and folders to put the year of a movie in the correct format for Kodi.
I also use a program called Infuse to transfer them from my NAS to my iphone to watch on the road. Both Kodi and Infuse still go and get their own metadata despite the NFO file being in place on the NAS for some reason but as media companion has created the year in the naming structure they detect correctly.
trilbytim
Newcomer
Posts: 11
Joined: Sun Dec 25, 2022 8:18 pm
Great Britain

Re: Moving recordings

Post by trilbytim »

I'm also trying to move my recordings onto a different harddrive. I've copied the entire mythtv directory in /var/lib/ onto the new drive and changed the group and owner of the folder on the new drive to mythtv. I then went into backend setup and changed the Storage Directories location from /var/lib/mythtv to /media/newdrive/mythtv but when I then went back in the frontend I can't watch any of the recordings (it says recording not found). I also tried (after pointing the Storage directory location in backend back to normal and temporarily renaming the /var/lib/mythtv directory) creating a sym link from /var/lib/mythtv to /media/newdrive/mythtv, but that also didn't work, it again says recording not found whenever I try to play anything. Why don't either of these approaches work?
trilbytim
Newcomer
Posts: 11
Joined: Sun Dec 25, 2022 8:18 pm
Great Britain

Re: Moving recordings

Post by trilbytim »

I've come up with a solution which works for my situation. I created an empty folder at /var/lib/mythtv, mounted my newdrive to that point and then simply arranged the files in the new drive in the same way the original folder was laid out. Ideally I wanted them inside a subfolder on the new drive, but that's not too important and this does now work this way. I'm still interested why the previous attempts (either sym linking or changing the Default Storage group to point to the moved folder) didn't work.
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: Moving recordings

Post by jfabernathy »

skinah wrote:
Mon Feb 01, 2016 4:20 am
I run the script found at this thread..
viewtopic.php?f=2&t=1261
I then use a program called 'Media Companion' to fetch the metadata and create NFO files. It will also rename the files and folders to put the year of a movie in the correct format for Kodi.
I also use a program called Infuse to transfer them from my NAS to my iphone to watch on the road. Both Kodi and Infuse still go and get their own metadata despite the NFO file being in place on the NAS for some reason but as media companion has created the year in the naming structure they detect correctly.
I use this script also. I set it up as a User Job "sendTVtoNAS". I attach the NAS at boot time via CIFS/SMB. I use this mainly for TV series I want to keep a while. I generally check the recordings the next day and edit any commercial flags to be at the correct points in the recordings. Then I run the User Job.

I have the NAS locations setup as one of the directory entries in my Storage Directories for Video. I have a nightly systemd timer that runs

Code: Select all

ExecStart=/usr/bin/mythutil --scanvideos
to update the video list and metadata.
Post Reply