<br><br><div class="gmail_quote">On 4 July 2013 23:33, John Pilkington <span dir="ltr"><<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 04/07/13 13:43, Anthony Giggins wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On 4 July 2013 22:11, Anthony Giggins <<a href="mailto:seven@seven.dorksville.net" target="_blank">seven@seven.dorksville.net</a><br></div><div class="im">
<mailto:<a href="mailto:seven@seven.dorksville.net" target="_blank">seven@seven.<u></u>dorksville.net</a>>> wrote:<br>
<br>
<br>
<br>
On 4 July 2013 21:27, John Pilkington <<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a><br></div><div><div class="h5">
<mailto:<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a>>> wrote:<br>
<br>
On 04/07/13 00:20, Michael Stucky wrote:<br>
<br>
<br>
OK, thanks for that. I have a first shot at a<br>
switchable script and<br>
my first .mkv file. It plays in the frontend but I<br>
can't step or<br>
use the editor on it. I think I saw something recently<br>
about that,<br>
but it's bedtime now. I suppose MythArchive will choke<br>
on it, too.<br>
<br>
Running: mythffmpeg -i 1002_20130703195800.mkv 2>&1 |<br>
grep -C 4 Video<br>
<br>
Input #0, matroska,webm, from '1002_20130703195800.mkv':<br>
Metadata:<br>
ENCODER : Lavf54.6.101<br>
Duration: 00:59:11.60, start: 0.000000, bitrate:<br>
3008 kb/s<br>
Stream #0:0: Video: mpeg2video (Main), yuv420p,<br>
720x576 [SAR<br>
64:45 DAR 16:9], 8153 kb/s, 25 fps, 25 tbr, 1k tbn, 50<br>
tbc (default)<br>
Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16,<br>
256 kb/s (default)<br>
<br>
At least one output file must be specified<br>
<br>
John<br>
<br>
<br>
<br>
I should have mentioned above, once the file is in an MKV<br>
container it<br>
is no longer in a format that MythTV considers a<br>
"recording". In other<br>
words, it is not editable or seekable as a recording. You<br>
need to use<br>
"mythexport" or some other script like that to move it to<br>
your MythTV<br>
Video library where you can play, fastforward, rewind, etc.<br>
as you would<br>
any imported video.<br>
<br>
Mike<br>
<br>
<br>
Thanks for that, too.<br>
<br>
I've posted the new version, mythDVBcut_20130704.sh, above the<br>
old one here, and added a small covering note. I hope it's useful.<br>
<br></div></div>
<a href="http://www.mythtv.org/wiki/__MythDVBcut" target="_blank">http://www.mythtv.org/wiki/__<u></u>MythDVBcut</a><div><div class="h5"><br>
<<a href="http://www.mythtv.org/wiki/MythDVBcut" target="_blank">http://www.mythtv.org/wiki/<u></u>MythDVBcut</a>><br>
<br>
The other part of the package, pycut_20130305.py, for use with<br>
eg h264 recordings, is unchanged at the bottom of the page.<br>
<br>
<br>
John<br>
<br>
<br>
I've been Playing with this also I've added this section as provided<br>
by Michael as I'd much rather only make the HD recordings into mkv<br>
only instead of the non-HD recordings which work as mpeg2<br>
<br>
VRES=`grep Video temp$$.txt | head -n1 | cut -f 11,11 -d' '`<br>
if [ "${VRES}" = "1440x1080" ] ; then<br>
echo "HD recording Remuxing to mkv" >> log$$<br>
<br>
<br>
filename=`mediainfo '--Inform=General;%FileName%' "$1"`<br>
<br>
OUTFILE="$filename".mkv<br>
<br>
CMD="ionice -c3 mythffmpeg -fflags +genpts -i $TEMPHEAD.m2v<br>
-i $TEMPAUDIO -vcodec copy -acodec copy $OUTFILE "<br>
<br>
# tell mythDB about new filename<br>
<br>
echo "update recorded set basename='${OUTFILE}' where<br>
chanid=$chanid and starttime='$starttime';" | mysql -N<br>
-u${DBUserName} -p${DBPassword} -h${DBLocalHostName} ${DBName}<br>
else<br>
<br>
CMD="ionice -c3 mplex -o "$1" -V -f 9 $TEMPHEAD.m2v $TEMPAUDIO"<br>
OUTFILE="$1"<br>
fi<br>
<br>
Only Problem is mediainfo '--Inform=General;%FileName%' "$1"`<br>
returns nothing so the intial run was as file called .mkv So I've<br>
since removed the filename variable and made OUTFILE="$1".mkv instead<br>
<br>
$ mediainfo '--Full' /storage2/recordings/4032_<u></u>20130702074000.mpg.old<br>
<br>
$<br>
<br>
Cheers,<br>
<br>
Anthony<br>
<br>
<br>
Ignore me, wrong video file used :(<br>
<br>
anyway at this stage of the script this should be<br>
<br>
filename=`mediainfo '--Inform=General;%FileName%' "$1".old`<br>
<br>
however this still give the same value as $1 so no value here<br>
<br>
but seems to work perfectly<br>
<br>
<br>
Cheers,<br>
<br>
Anthony<br>
<br>
</div></div></blockquote>
<br>
Yes, it makes sense to make the choice depend on resolution, and I had wondered before about marking as transcoded - but I don't think the mythcenter-wide theme makes that flag available. There should probably be a check to prevent the script working on an mkv file, too - although input of the filename ought to give that automatically.<br>
<br>
I've occasionally found that a programme recorded shortly after the startup of a part-time channel can be edited but will then take the pycut route. A second pass with no cutlist will usually fix that.<br>
<br>
Also, very rarely, ProjectX will find a backward jump in a timestamp and lose the rest of the recording. Once or twice I've taken steps to fit things back together but it's very rare here and not often worth the effort.<br>
<br>
I haven't tested all possibilities, obviously, but it worked on my SD recordings. Now I think I'll set it back to non-mkv working.<br>
<br>
Cheers,<div class="HOEnZb"><div class="h5"><br>
<br>
John<br>
<br>
<br>
<br></div></div></blockquote><div>Hi John,<br><br>I've been running this manually for some time however should I be able to run this as a userjob?<br><br>each time I try it fails <br><br> Jul 11 22:05:19 mythtv mythlogserver: mythbackend[2678]: E UserJob_18837 jobqueue.cpp:2444 (DoUserJobThread) JobQueue: User Job 'mythDVBcut.sh 4003_20130710192500.mpg' failed.<br>
<br>however if I run the command manually as the same user ie. mythtv is runs without any errors?<br><br>Cheers,<br><br>Anthony<br></div></div><br>