[mythtv-users] transcode

John Pilkington johnpilk222 at gmail.com
Mon Mar 11 10:12:53 UTC 2019


On 11/03/2019 03:53, James Linder wrote:
> 
> 
>> On 10 Mar 2019, at 10:18 pm, mythtv-users-request at mythtv.org wrote:
>>
>>> Hi
>>>
>>> since mythtranscode does not handle h264 I?ve been trying to use mythffmpeg.
>>> The best I can gather via google is
>>>
>>> ffmpeg -i "test.avi" -c:v libx264 -crf 20 -c:a aac -strict -2 ?test.mp4?
>>>
>>
>> I use the following shell to cut mp4 ts files using the cutlist generated from editing in mythfrontend:
>>
>> https://pastebin.com/SkMT2BRe <https://pastebin.com/SkMT2BRe>
>>
>> It uses the passwd info from /etc/mythtv/config.xml. there is a temp directory used that can be changed as well as the directory where the recordings live.
>>
>> I then create a user job using the following for the execute field:
>>
>> /usr/local/bin/ffcut.sh %DIR% %CHANID% %STARTTIMEUTC% >> /tmp/ffcut.log
>>
>> You will need to tweak the next line(line29 of the shell) depending on how you use mysql or mariadb:
>>
>> basename=`mysql --login-path=local -N "${dbname}" <<-EOF
> 
> Jay very interesting
> 
> Instead of diving into the DB this is an easy way to get the cutlist
> 
>      cutlist=`mythutil --getcutlist -q -q --video $srcname | sed -s s/Cutlist://`
> 
> Likewise
> 
>      mythutil --setcutlist $cutlist --video $TMPNAME
> 
> but I often have sub-second glitches (eg a flash of the last commercial
> 
> Do your tools have artifacts (1 good run does not prove that all runs are good)
> Once I have cutlist’d the tmp file I mythtranscode.
> 
> Part of my hastle is massaging video for a Samsung uPnP. Eg the TV will play mpg files. It will not play a container called x.mpg but renaming it .avi and it will play. It also accepts mp4, but I've yet to try re-naminhq
> 
> James

IIRC the cutlist works in frame numbers and ffmpeg needs milliseconds. 
Seektables store frame number, byte offset and time offset for every 
keyframe.  Much recent dev activity has been aimed at rationalising the 
way that playback uses this sort of info.

Last year I spent some effort on an h264 cutting script, mythTScut, 
which is on the wiki.  I haven't made recordings in that format 
recently, but the ones I still have that I processed with it play quite 
well.  ISTR that you tried it and wanted something different, but it 
might have some wrinkles that would help.

Cheers,

John P





More information about the mythtv-users mailing list