[mythtv-users] mythtranscode crashes on a .ts HD file

Stefan Davids mythtv at stefan.davids.uk.net
Mon Jan 14 12:03:45 UTC 2019


On 14-01-2019 10:43, UB40D wrote:
> On Sun, 13 Jan 2019 at 17:45, Stefan Davids 
> <mythtv at stefan.davids.uk.net>
> wrote:
> 
>> 
>> To use mythtranscode on h264 with a cutlist you need to use it in fifo
>> mode to output raw video which can then be transcoded by ffmpeg or
>> similar reading from the fifos.  Or generate the cutlist via mythutil
>> and just use ffmpeg directly to cut out those bits and concatenate it
>> together.
>> 
> 
> Groan.

It's not too hard when the script is written since it lends itself to
automation...

>> If you're familar with perl there's an example I use here at
>> http://git.netscum.org.uk/stefan/h264_fifo/src/master/transcode_perl 
>> or
>> there are many other examples in shell script or python around (at 
>> least
>> two on the mythtv website).
>> 
> 
> Thank you. I am not familiar with Perl and would understand more from a
> shell or Python script. Which ones do you mean? I've done a bit of
> searching of the website and there's a hodgepodge of scripts at
> https://www.mythtv.org/wiki/Transcode_Video, none of which says clearly
> whether it works for HD.

the ones I was thinking of are:

https://www.mythtv.org/wiki/H264_commercial_remover_and_remuxer

which uses a shell script to chop up the file via ffmpeg.  That
should be completely lossless but putting the bits back together
possibly isn't.  Also

https://www.mythtv.org/wiki/Example_Script_using_mythtranscode_in_fifodir_mode

shows mythtranscode working in fifo mode.  I remembered it as python
but it's ruby apparently....

I'm happier with perl so I reworked those as examples into something
I use.

>> It seems almost impossible to get the cutting exactly right though for
>> h264 though.
> 
> Pity. If it has to be such a faff I may give up on doing it on Linux 
> and
> may resort to Premiere, for the few things I really need to export for 
> work.

I think there has been Linux video editing software recommended for this
sort of thing before but I've never used it, can't remember what it's 
called
and don't know if it's any better. I think you need to potentially remux
to move keyframes around to get cutting perfect with h264 which I've 
never
worked out if ffmpeg will do.

Usually I end up doing the cut close to where it should be with my 
script
and then edit the new file again in mythtv to remove what remained.
I'm sure there are better workflows though!

Stefan




More information about the mythtv-users mailing list