[mythtv] Update recording file name from command line?
John Pilkington
johnpilk222 at gmail.com
Tue Dec 18 09:18:27 UTC 2018
On 18/12/2018 00:09, Richard Shaw wrote:
> On Mon, Dec 17, 2018 at 3:53 PM Peter Bennett <pb.mythtv at gmail.com
> <mailto:pb.mythtv at gmail.com>> wrote:
>
>
>
> On 12/17/18 11:49 AM, Richard Shaw wrote:
>> I still use a combined FE/BE in the living room but everywhere
>> else I use either a Roku, Roku TV, and stream via Plex.
>>
>> Some channels work find but others have issues with audio sync. It
>> seems like the video freezes right at the beginning but the audio
>> does not so it stays out of sync.
>>
>> I've played around, especially on Plex and forcing it to transcode
>> on the fly usually works but reduced video quality and the audio
>> is changed from multi-channel to stereo so it's not an ideal solution.
>>
>> I noticed that recordings I've saved to videos via Avidemux to MKV
>> container (video and audio are copied) don't have this problem so
>> I was thinking of using mkvmerge in a transcode user job to move
>> all my recordings from TS to MKV container formats.
>>
>> I plan to write a bash script around this but how do I go about
>> updating the name of the recording in the database? Mythutil seems
>> an obvious candidate to have this functionality but it doesn't as
>> far as I can tell.
>>
>> Ideas?
>>
>> Thanks,
>> Richard
>>
>>
>
> Here is a script that runs as a user job to convert the files to mkv
> format without transcoding, which works better with kodi and maybe
> with other players. It does not change the file name, that was not
> necessary for kodi to recognize that it is an mkv file.
>
> https://github.com/bennettpeter/mythscripts/blob/master/install/opt/mythtv/bin/userjob_mkv.sh
>
>
> Hmm... I'll have to see if MythTV or Plex care about the file extension
> but seems a dirty hack :)
>
> It would really be nice if mythtranscode could do lossless H264 but I'll
> have to ask Santa about that!
>
> Thanks,
> Richard
I misunderstood your wish to rename your recording. I use this in
mythDVBcut to rename after conversion from .ts to .mpg
{{{
# tell mythDB about new filename and set the 'transcoded' flag
echo "update recorded set basename='${OUTFILE}', transcoded = 1
where recordedid = '$recordedid' ; " |
mysql -N -u${DBUserName} -p${DBPassword} -h${DBLocalHostName} ${DBName}
# Update the container type, needed for uPnP playback. Empty will
work too, if the transcoded flag is set.
# This is a HACK pending 0.28 release, when mythutil should do it.
See Ticket #12388
echo "update recordedfile set basename = '${OUTFILE}', container =
'MPEG2-PS' where recordedid = '$recordedid' ;" |
mysql -N -u${DBUserName} -p${DBPassword} -h${DBLocalHostName} ${DBName}
}}}
More information about the mythtv-dev
mailing list