Mailing List Archive

Transcode script that keeps show in Recordings
I'm messing around with a test server right now as I don't current;y have
access to my old MythTV box. I thought I had put a copy of the scripts I
used in Google Drive, but apparently I didn't.

The user job script I had would run mythtranscode, honour the cutlet, if
anny rebuild the seektable and run with the --mpeg2 option, so even if you
hadn't created a cutlist, you could save about 20% of the initial .ts file.

The one thing it did, was move the tmp file to the current recording name
and move the original file to a .old. Having the edited file accessible
through recording was helpful if you suddenly noticed you missed a
commercial/PBS pledge break, as you could easily re-edit the file.

Anyone know the name of that script or remember authoring it?

Thanks.
Re: Transcode script that keeps show in Recordings [ In reply to ]
On 04/06/2023 17:44, Ian Evans wrote:
> I'm messing around with a test server right now as I don't current;y
> have access to my old MythTV box. I thought I had put a copy of the
> scripts I used in Google Drive, but apparently I didn't.
>
> The user job script I had would run mythtranscode, honour the cutlet, if
> anny rebuild the seektable and run with the --mpeg2 option, so even if
> you hadn't created a cutlist, you could save about 20% of the initial
> .ts file.
>
> The one thing it did, was move the tmp file to the current recording
> name and move the original file to a .old. Having the edited file
> accessible through recording was helpful if you suddenly noticed you
> missed a commercial/PBS pledge break, as you could easily re-edit the file.
>
> Anyone know the name of that script or remember authoring it?
>
> Thanks.
>

What you describe sounds to me like mythtranscode --mpeg2 'as is' and
I had thought that that is working now in reasonably current versions,
if you are still getting mpeg2 content. I'm afraid I haven't used it
recently.

I'm still using a script based on ProjectX for most of my cutting, but
PX has been out of development for years and has problems with newer
mpeg2 encoders. I do have scripts to cut these and h264 as well, but
the cutting is often less perfect and the process doesn't fit easily
into the mythtranscode mould.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Transcode script that keeps show in Recordings [ In reply to ]
> On Jun 4, 2023, at 12:44 PM, Ian Evans <dheianevans@gmail.com> wrote:
>
> I'm messing around with a test server right now as I don't current;y have access to my old MythTV box. I thought I had put a copy of the scripts I used in Google Drive, but apparently I didn't.
>
> The user job script I had would run mythtranscode, honour the cutlet, if anny rebuild the seektable and run with the --mpeg2 option, so even if you hadn't created a cutlist, you could save about 20% of the initial .ts file.
>
> The one thing it did, was move the tmp file to the current recording name and move the original file to a .old. Having the edited file accessible through recording was helpful if you suddenly noticed you missed a commercial/PBS pledge break, as you could easily re-edit the file.
>
> Anyone know the name of that script or remember authoring it?

I use this shell script to cut using the recorded markup table.

It uses ffmpeg to copy the fragments from the original as defined by the recorded markup table, and concatenates them using the ffmpeg copy function. It does not remove the original, but renames it for safety sake.

https://pastebin.com/uuBHpauQ?

I defined it as one of the jobs in mythtv as follows:

It uses the db connection information in the /etc/mythtv/config.xml to make connections.

/usr/local/bin/ffcut.sh %DIR% %CHANID% %STARTTIMEUTC% >> /tmp/ffcut.log

Regards
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Sun, Jun 4, 2023, 1:52 p.m. John Pilkington <johnpilk222@gmail.com>
wrote:

> On 04/06/2023 17:44, Ian Evans wrote:
> > I'm messing around with a test server right now as I don't current;y
> > have access to my old MythTV box. I thought I had put a copy of the
> > scripts I used in Google Drive, but apparently I didn't.
> >
> > The user job script I had would run mythtranscode, honour the cutlet, if
> > anny rebuild the seektable and run with the --mpeg2 option, so even if
> > you hadn't created a cutlist, you could save about 20% of the initial
> > .ts file.
> >
> > The one thing it did, was move the tmp file to the current recording
> > name and move the original file to a .old. Having the edited file
> > accessible through recording was helpful if you suddenly noticed you
> > missed a commercial/PBS pledge break, as you could easily re-edit the
> file.
> >
> > Anyone know the name of that script or remember authoring it?
> >
> > Thanks.
> >
>
> What you describe sounds to me like mythtranscode --mpeg2 'as is' and
> I had thought that that is working now in reasonably current versions,
> if you are still getting mpeg2 content. I'm afraid I haven't used it
> recently.
>
> If I remember correctly, mythtranscode would create a tmp file next to the
original. If I recall, the script I would using would rename the original
file filename.old and rename the tmp to the original filename. My google
and list search has turned up empty. Maybe I need coffee.

>
>
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Mon, Jun 5, 2023 at 10:07?AM Ian Evans <dheianevans@gmail.com> wrote:

>
>
> On Sun, Jun 4, 2023, 1:52 p.m. John Pilkington <johnpilk222@gmail.com>
> wrote:
>
>> On 04/06/2023 17:44, Ian Evans wrote:
>> > I'm messing around with a test server right now as I don't current;y
>> > have access to my old MythTV box. I thought I had put a copy of the
>> > scripts I used in Google Drive, but apparently I didn't.
>> >
>> > The user job script I had would run mythtranscode, honour the cutlet,
>> if
>> > anny rebuild the seektable and run with the --mpeg2 option, so even if
>> > you hadn't created a cutlist, you could save about 20% of the initial
>> > .ts file.
>> >
>> > The one thing it did, was move the tmp file to the current recording
>> > name and move the original file to a .old. Having the edited file
>> > accessible through recording was helpful if you suddenly noticed you
>> > missed a commercial/PBS pledge break, as you could easily re-edit the
>> file.
>> >
>> > Anyone know the name of that script or remember authoring it?
>> >
>> > Thanks.
>> >
>>
>> What you describe sounds to me like mythtranscode --mpeg2 'as is' and
>> I had thought that that is working now in reasonably current versions,
>> if you are still getting mpeg2 content. I'm afraid I haven't used it
>> recently.
>>
>> If I remember correctly, mythtranscode would create a tmp file next to
> the original. If I recall, the script I would using would rename the
> original file filename.old and rename the tmp to the original filename. My
> google and list search has turned up empty. Maybe I need coffee.
>


The script I use is one from the mythtv forum call sendTVtoNAS which uses
mythutils and Handbrake to take the video clean out the commercials per the
cur list and transcode the .TS to a .m4v h.264 and put on a NAS or some
other folder. It leaves your original alone.

https://forum.mythtv.org/viewtopic.php?f=2&t=1261

Jim A
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Mon, Jun 5, 2023, 11:03 a.m. James Abernathy <jfabernathy@gmail.com>
wrote:

>
>
> On Mon, Jun 5, 2023 at 10:07?AM Ian Evans <dheianevans@gmail.com> wrote:
>
>>
>>
>> On Sun, Jun 4, 2023, 1:52 p.m. John Pilkington <johnpilk222@gmail.com>
>> wrote:
>>
>>> On 04/06/2023 17:44, Ian Evans wrote:
>>> > I'm messing around with a test server right now as I don't current;y
>>> > have access to my old MythTV box. I thought I had put a copy of the
>>> > scripts I used in Google Drive, but apparently I didn't.
>>> >
>>> > The user job script I had would run mythtranscode, honour the cutlet,
>>> if
>>> > anny rebuild the seektable and run with the --mpeg2 option, so even if
>>> > you hadn't created a cutlist, you could save about 20% of the initial
>>> > .ts file.
>>> >
>>> > The one thing it did, was move the tmp file to the current recording
>>> > name and move the original file to a .old. Having the edited file
>>> > accessible through recording was helpful if you suddenly noticed you
>>> > missed a commercial/PBS pledge break, as you could easily re-edit the
>>> file.
>>> >
>>> > Anyone know the name of that script or remember authoring it?
>>> >
>>> > Thanks.
>>> >
>>>
>>> What you describe sounds to me like mythtranscode --mpeg2 'as is' and
>>> I had thought that that is working now in reasonably current versions,
>>> if you are still getting mpeg2 content. I'm afraid I haven't used it
>>> recently.
>>>
>>> If I remember correctly, mythtranscode would create a tmp file next to
>> the original. If I recall, the script I would using would rename the
>> original file filename.old and rename the tmp to the original filename. My
>> google and list search has turned up empty. Maybe I need coffee.
>>
>
>
> The script I use is one from the mythtv forum call sendTVtoNAS which uses
> mythutils and Handbrake to take the video clean out the commercials per the
> cur list and transcode the .TS to a .m4v h.264 and put on a NAS or some
> other folder. It leaves your original alone.
>
> https://forum.mythtv.org/viewtopic.php?f=2&t=1261
>
> Jim A
>
>

Yes, I have that script too. But the one I had on my old backend left it in
records and updated the database. That way you could easily check from the
frontend if the edit was fine and then do a re-edit if necessary. Then you
could send it off to the Videos with another job.

I'll keep digging. Thanks.

>
>
Re: Transcode script that keeps show in Recordings [ In reply to ]
> On Jun 5, 2023, at 11:10 AM, Ian Evans <dheianevans@gmail.com> wrote:
>>
>>
>
>
> Yes, I have that script too. But the one I had on my old backend left it in records and updated the database. That way you could easily check from the frontend if the edit was fine and then do a re-edit if necessary. Then you could send it off to the Videos with another job.
>

This script I posted would do as you indicate, keeping the video as a ts file, just removing the parts defined in the cultist.

For reference it is ffcut.sh and does not remove the original file.

It is still live for 2 hours on pastebin. As below:

https://pastebin.com/uuBHpauQ?


> I'll keep digging. Thanks.
>>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org <mailto:mythtv-users@mythtv.org>
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org <https://forum.mythtv.org/>
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Mon, Jun 5, 2023 at 11:34?AM Jay Harbeston <jharbestonus@gmail.com>
wrote:

>
>
> On Jun 5, 2023, at 11:10 AM, Ian Evans <dheianevans@gmail.com> wrote:
>
>>
>>
>>
>
> Yes, I have that script too. But the one I had on my old backend left it
> in records and updated the database. That way you could easily check from
> the frontend if the edit was fine and then do a re-edit if necessary. Then
> you could send it off to the Videos with another job.
>
>
> This script I posted would do as you indicate, keeping the video as a ts
> file, just removing the parts defined in the cultist.
>
> For reference it is ffcut.sh and does not remove the original file.
>
> It is still live for 2 hours on pastebin. As below:
>
> ffcut.sh <https://pastebin.com/uuBHpauQ>
> pastebin.com <https://pastebin.com/uuBHpauQ>
> [image: favicon.ico] <https://pastebin.com/uuBHpauQ>
> <https://pastebin.com/uuBHpauQ> <https://pastebin.com/uuBHpauQ>
>


Jay, I tried ffcut.sh on my v34 master version of mythtv on a test system
and it keeps failing. I have not had a chance to find out why

Jim A
Re: Transcode script that keeps show in Recordings [ In reply to ]
> On Jun 5, 2023, at 11:54 AM, James Abernathy <jfabernathy@gmail.com> wrote:
>
>
>
>
> Jay, I tried ffcut.sh on my v34 master version of mythtv on a test system and it keeps failing. I have not had a chance to find out why

Probably because the mysql cmd is not authenticating. I use mysql mysql and not MariaDB, and mysql no longer allows the login/paswd to be passed on the cmd line. I had to modify the codlin to use a .mylogin.cnf file to keep from having to use the cmd line -u and -p options.

You can modify the mysql cmd to put those back in if you are using MariaDB.

Jay
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Mon, Jun 5, 2023 at 1:11?PM Jay Harbeston <jharbestonus@gmail.com> wrote:

>
>
> On Jun 5, 2023, at 11:54 AM, James Abernathy <jfabernathy@gmail.com>
> wrote:
>
>
>
>
> Jay, I tried ffcut.sh on my v34 master version of mythtv on a test system
> and it keeps failing. I have not had a chance to find out why
>
>
> Probably because the mysql cmd is not authenticating. I use mysql mysql
> and not MariaDB, and mysql no longer allows the login/paswd to be passed on
> the cmd line. I had to modify the codlin to use a .mylogin.cnf file to keep
> from having to use the cmd line -u and -p options.
>
> You can modify the mysql cmd to put those back in if you are using MariaDB.
>
> Jay
>
> Yes I'm using mariadb. I'm going to need some help fixing this.
Obviously I need to fix the statements like:
mysql --login-path=local -N "${dbname}"

Normal to work on the database I do:

sudo mysql -u root -p [return]
then I'm asked for my sudo password. Sometimes I get another password
request and I enter the same sudo password.

Not sure how I replace the --login-path=local with mysql -u root -p.

I tried just putting in mysql -u root -p but that didn't work. When I
tried putting in
mysql -u root -p 1234
assuming 1234 was my sudo password. They failed filling up the ffcut.log
with mysql --help stuff,

JIm A
Re: Transcode script that keeps show in Recordings [ In reply to ]
> On Jun 5, 2023, at 3:08 PM, James Abernathy <jfabernathy@gmail.com> wrote:
>
>
> sudo mysql -u root -p [return]
> then I'm asked for my sudo password. Sometimes I get another password request and I enter the same sudo password.
>
> Not sure how I replace the --login-path=local with mysql -u root -p.
>
> I tried just putting in mysql -u root -p but that didn't work. When I tried putting in
> mysql -u root -p 1234
> assuming 1234 was my sudo password. They failed filling up the ffcut.log with mysql --help stuff,

If the mythtv user is set up to login using the standard auth, you may not need the -u and -p arguments as it relies on the login already authenticating the mythtv user. You would want to just remove that info and run the ffcut as the mythtv user.

Jay
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Transcode script that keeps show in Recordings [ In reply to ]
> On Jun 5, 2023, at 3:08 PM, James Abernathy <jfabernathy@gmail.com> wrote:
>
>
> sudo mysql -u root -p [return]
> then I'm asked for my sudo password. Sometimes I get another password request and I enter the same sudo password.
>
> Not sure how I replace the --login-path=local with mysql -u root -p.
>
> I tried just putting in mysql -u root -p but that didn't work. When I tried putting in
> mysql -u root -p 1234
> assuming 1234 was my sudo password. They failed filling up the ffcut.log with mysql --help stuff,

If the mythtv user is set up to login using the standard auth, you may not need the -u and -p arguments as it relies on the login already authenticating the mythtv user. You would want to just remove that info and run the ffcut as the mythtv user.

Jay
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Mon, Jun 5, 2023 at 3:58?PM Jay Harbeston <jharbestonus@gmail.com> wrote:

>
>
> > On Jun 5, 2023, at 3:08 PM, James Abernathy <jfabernathy@gmail.com>
> wrote:
> >
> >
> > sudo mysql -u root -p [return]
> > then I'm asked for my sudo password. Sometimes I get another password
> request and I enter the same sudo password.
> >
> > Not sure how I replace the --login-path=local with mysql -u root -p.
> >
> > I tried just putting in mysql -u root -p but that didn't work. When I
> tried putting in
> > mysql -u root -p 1234
> > assuming 1234 was my sudo password. They failed filling up the ffcut.log
> with mysql --help stuff,
>
> If the mythtv user is set up to login using the standard auth, you may not
> need the -u and -p arguments as it relies on the login already
> authenticating the mythtv user. You would want to just remove that info
> and run the ffcut as the mythtv user.
>
> Jay
>
>
I removed all the -u root -p stuff and still fails. in the fftotal.log
the last line is
/tmp/myth6544/filelist.txt: No such file or directory

The ffcut.log shows

Mon Jun 5 04:14:34 PM EDT 2023
mythdir=/srv/mythtv/recordings chanid=10501 starttimeutc=20230604223000
query = select basename from recorded where chanid = 10501 and starttime =
'20230604223000';
Basename =
process the file for infile: /srv/mythtv/recordings/: 10501 20230604223000

query1 = select data , type from recordedmarkup where chanid = '10501'
and starttime = '202306
04223000' and ( type = 34 or type = 32 ) into outfile
'/tmp/myth6544/queryres' FIELDS TERM
INATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
/tmp/myth6544/queryres contents for framerate/framecount:
------------------------------
------------------------------
framerate = /srv/mythtv/recordings
maxframes = 10501
select mark , type from recordedmarkup where chanid = '10501' and starttime
= '20230604223000' and (
type = 0 or type = 1 ) order by mark asc into outfile
'/tmp/myth6544/queryres' FIELDS TERMINATED BY
'\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
/tmp/myth6544/queryres contents for cutlist:
------------------------------
------------------------------
There are /srv/mythtv/recordings records for infile
counter=3
counter=3
mark = /srv/mythtv/recordings ; type = 10501
counter=1
mark = 20230604223000 ; type =
ffmpeg -f concat -safe 0 -i /tmp/myth6544/filelist.txt -c copy
/tmp/myth6544/tmpfile.ts
Conversion did not occur correctly
Re: Transcode script that keeps show in Recordings [ In reply to ]
> On Jun 5, 2023, at 4:23 PM, James Abernathy <jfabernathy@gmail.com> wrote:
>
>
>
> On Mon, Jun 5, 2023 at 3:58?PM Jay Harbeston <jharbestonus@gmail.com <mailto:jharbestonus@gmail.com>> wrote:
>>
>>
>> > On Jun 5, 2023, at 3:08 PM, James Abernathy <jfabernathy@gmail.com <mailto:jfabernathy@gmail.com>> wrote:
>> >
>> >
>> > sudo mysql -u root -p [return]
>> > then I'm asked for my sudo password. Sometimes I get another password request and I enter the same sudo password.
>> >
>> > Not sure how I replace the --login-path=local with mysql -u root -p.
>> >
>> > I tried just putting in mysql -u root -p but that didn't work. When I tried putting in
>> > mysql -u root -p 1234
>> > assuming 1234 was my sudo password. They failed filling up the ffcut.log with mysql --help stuff,
>>
>> If the mythtv user is set up to login using the standard auth, you may not need the -u and -p arguments as it relies on the login already authenticating the mythtv user. You would want to just remove that info and run the ffcut as the mythtv user.
>>
>> Jay
>>
>
> I removed all the -u root -p stuff and still fails. in the fftotal.log the last line is
> /tmp/myth6544/filelist.txt: No such file or directory
>
> The ffcut.log shows
>
> Mon Jun 5 04:14:34 PM EDT 2023
> mythdir=/srv/mythtv/recordings chanid=10501 starttimeutc=20230604223000
> query = select basename from recorded where chanid = 10501 and starttime = '20230604223000';
> Basename =
> process the file for infile: /srv/mythtv/recordings/: 10501 20230604223000
>
> query1 = select data , type from recordedmarkup where chanid = '10501' and starttime = '202306
> 04223000' and ( type = 34 or type = 32 ) into outfile '/tmp/myth6544/queryres' FIELDS TERM
> INATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
> /tmp/myth6544/queryres contents for framerate/framecount:
> ------------------------------
> ------------------------------
> framerate = /srv/mythtv/recordings
> maxframes = 10501
> select mark , type from recordedmarkup where chanid = '10501' and starttime = '20230604223000' and (
> type = 0 or type = 1 ) order by mark asc into outfile '/tmp/myth6544/queryres' FIELDS TERMINATED BY
> '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
> /tmp/myth6544/queryres contents for cutlist:
> ------------------------------
> ------------------------------
> There are /srv/mythtv/recordings records for infile
> counter=3
> counter=3
> mark = /srv/mythtv/recordings ; type = 10501
> counter=1
> mark = 20230604223000 ; type =

There’s something wrong in the line above, the type should not be blank. Look at the record involved using phpmyadmin.. there may be a problem with that cut.


> ffmpeg -f concat -safe 0 -i /tmp/myth6544/filelist.txt -c copy /tmp/myth6544/tmpfile.ts
> Conversion did not occur correctly
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Mon, Jun 5, 2023 at 6:38?PM Jay Harbeston <jharbestonus@gmail.com> wrote:

>
>
> On Jun 5, 2023, at 4:23 PM, James Abernathy <jfabernathy@gmail.com> wrote:
>
>
>
> On Mon, Jun 5, 2023 at 3:58?PM Jay Harbeston <jharbestonus@gmail.com>
> wrote:
>
>>
>>
>> > On Jun 5, 2023, at 3:08 PM, James Abernathy <jfabernathy@gmail.com>
>> wrote:
>> >
>> >
>> > sudo mysql -u root -p [return]
>> > then I'm asked for my sudo password. Sometimes I get another password
>> request and I enter the same sudo password.
>> >
>> > Not sure how I replace the --login-path=local with mysql -u root -p.
>> >
>> > I tried just putting in mysql -u root -p but that didn't work. When I
>> tried putting in
>> > mysql -u root -p 1234
>> > assuming 1234 was my sudo password. They failed filling up the
>> ffcut.log with mysql --help stuff,
>>
>> If the mythtv user is set up to login using the standard auth, you may
>> not need the -u and -p arguments as it relies on the login already
>> authenticating the mythtv user. You would want to just remove that info
>> and run the ffcut as the mythtv user.
>>
>> Jay
>>
>>
> I removed all the -u root -p stuff and still fails. in the fftotal.log
> the last line is
> /tmp/myth6544/filelist.txt: No such file or directory
>
> The ffcut.log shows
>
> Mon Jun 5 04:14:34 PM EDT 2023
> mythdir=/srv/mythtv/recordings chanid=10501 starttimeutc=20230604223000
> query = select basename from recorded where chanid = 10501 and starttime =
> '20230604223000';
> Basename =
> process the file for infile: /srv/mythtv/recordings/: 10501
> 20230604223000
>
> query1 = select data , type from recordedmarkup where chanid = '10501'
> and starttime = '202306
> 04223000' and ( type = 34 or type = 32 ) into outfile
> '/tmp/myth6544/queryres' FIELDS TERM
> INATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY
> '\n';
> /tmp/myth6544/queryres contents for framerate/framecount:
> ------------------------------
> ------------------------------
> framerate = /srv/mythtv/recordings
> maxframes = 10501
> select mark , type from recordedmarkup where chanid = '10501' and
> starttime = '20230604223000' and (
> type = 0 or type = 1 ) order by mark asc into outfile
> '/tmp/myth6544/queryres' FIELDS TERMINATED BY
> '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
> /tmp/myth6544/queryres contents for cutlist:
> ------------------------------
> ------------------------------
> There are /srv/mythtv/recordings records for infile
> counter=3
> counter=3
> mark = /srv/mythtv/recordings ; type = 10501
> counter=1
> mark = 20230604223000 ; type =
>
>
> There’s something wrong in the line above, the type should not be blank.
> Look at the record involved using phpmyadmin.. there may be a problem with
> that cut.
>
>
> ffmpeg -f concat -safe 0 -i /tmp/myth6544/filelist.txt -c copy
> /tmp/myth6544/tmpfile.ts
> Conversion did not occur correctly
>
>
I have 3 recordings on this test system and I used mythfrontend to correct
the cutlist after commercial flagging was completed. I 2 with the same
basic errors you saw with the type = [blank] on the last mark statement.
Not sure on what to look for in the database, but I have phpmyadmin up and
running on mythconverg.

I did try to do a lossless copy using mythtranscode with --honorcutlist and
it fails with a fair number of bad file descriptors. Not sure what that is
all about. The recordings look perfect in mythfronted when you watch
them. No visual errors. All this is the latest Master that I updated to
today.

Jim A
Re: Transcode script that keeps show in Recordings [ In reply to ]
> On Jun 5, 2023, at 9:35 PM, James Abernathy <jfabernathy@gmail.com> wrote:
>
>
>
> On Mon, Jun 5, 2023 at 6:38?PM Jay Harbeston <jharbestonus@gmail.com <mailto:jharbestonus@gmail.com>> wrote:
>>
>>
>>> On Jun 5, 2023, at 4:23 PM, James Abernathy <jfabernathy@gmail.com <mailto:jfabernathy@gmail.com>> wrote:
>>>
>>>
>>>
>>> On Mon, Jun 5, 2023 at 3:58?PM Jay Harbeston <jharbestonus@gmail.com <mailto:jharbestonus@gmail.com>> wrote:
>>>>
>>>>
>>>> > On Jun 5, 2023, at 3:08 PM, James Abernathy <jfabernathy@gmail.com <mailto:jfabernathy@gmail.com>> wrote:
>>>> >
>>>> >
>>>> > sudo mysql -u root -p [return]
>>>> > then I'm asked for my sudo password. Sometimes I get another password request and I enter the same sudo password.
>>>> >
>>>> > Not sure how I replace the --login-path=local with mysql -u root -p.
>>>> >
>>>> > I tried just putting in mysql -u root -p but that didn't work. When I tried putting in
>>>> > mysql -u root -p 1234
>>>> > assuming 1234 was my sudo password. They failed filling up the ffcut.log with mysql --help stuff,
>>>>
>>>> If the mythtv user is set up to login using the standard auth, you may not need the -u and -p arguments as it relies on the login already authenticating the mythtv user. You would want to just remove that info and run the ffcut as the mythtv user.
>>>>
>>>> Jay
>>>>
>>>
>>> I removed all the -u root -p stuff and still fails. in the fftotal.log the last line is
>>> /tmp/myth6544/filelist.txt: No such file or directory
>>>
>>> The ffcut.log shows
>>>
>>> Mon Jun 5 04:14:34 PM EDT 2023
>>> mythdir=/srv/mythtv/recordings chanid=10501 starttimeutc=20230604223000
>>> query = select basename from recorded where chanid = 10501 and starttime = '20230604223000';
>>> Basename =
>>> process the file for infile: /srv/mythtv/recordings/: 10501 20230604223000
>>>
>>> query1 = select data , type from recordedmarkup where chanid = '10501' and starttime = '202306
>>> 04223000' and ( type = 34 or type = 32 ) into outfile '/tmp/myth6544/queryres' FIELDS TERM
>>> INATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
>>> /tmp/myth6544/queryres contents for framerate/framecount:
>>> ------------------------------
>>> ------------------------------
>>> framerate = /srv/mythtv/recordings
>>> maxframes = 10501
>>> select mark , type from recordedmarkup where chanid = '10501' and starttime = '20230604223000' and (
>>> type = 0 or type = 1 ) order by mark asc into outfile '/tmp/myth6544/queryres' FIELDS TERMINATED BY
>>> '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
>>> /tmp/myth6544/queryres contents for cutlist:
>>> ------------------------------
>>> ------------------------------
>>> There are /srv/mythtv/recordings records for infile
>>> counter=3
>>> counter=3
>>> mark = /srv/mythtv/recordings ; type = 10501
>>> counter=1
>>> mark = 20230604223000 ; type =
>>
>> There’s something wrong in the line above, the type should not be blank. Look at the record involved using phpmyadmin.. there may be a problem with that cut.
>>
>>
>>> ffmpeg -f concat -safe 0 -i /tmp/myth6544/filelist.txt -c copy /tmp/myth6544/tmpfile.ts
>>> Conversion did not occur correctly
>
> I have 3 recordings on this test system and I used mythfrontend to correct the cutlist after commercial flagging was completed. I 2 with the same basic errors you saw with the type = [blank] on the last mark statement. Not sure on what to look for in the database, but I have phpmyadmin up and running on mythconverg.
>
> I did try to do a lossless copy using mythtranscode with --honorcutlist and it fails with a fair number of bad file descriptors. Not sure what that is all about. The recordings look perfect in mythfronted when you watch them. No visual errors. All this is the latest Master that I updated to today.
>
> Jim A
>
> ____


I am looking at it now. Looks like mysql cmd line output has changed on me since I last used this shell script. Of note, make sure you also have ffmpeg installed as well as that is what is used to cut/copy the segments as well as ‘glue’ them back together.

Jay
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Tue, Jun 6, 2023 at 8:27?AM Jay Harbeston <jharbestonus@gmail.com> wrote:

>
> I am looking at it now. Looks like mysql cmd line output has changed on
> me since I last used this shell script. Of note, make sure you also have
> ffmpeg installed as well as that is what is used to cut/copy the segments
> as well as ‘glue’ them back together.
>
> Jay
>
>
I'll keep playing with this. I find it interesting and I might learn
something interesting. I'll be interested in seeing what you find. I'm also
troubled by what I see as failing on mythtranscode on the same file.
Either there are problems with the file or v34 Master and transcode have
issues.

JIm A
Re: Transcode script that keeps show in Recordings [ In reply to ]
> On Jun 6, 2023, at 8:40 AM, James Abernathy <jfabernathy@gmail.com> wrote:
>
>
>
> On Tue, Jun 6, 2023 at 8:27?AM Jay Harbeston <jharbestonus@gmail.com <mailto:jharbestonus@gmail.com>> wrote:
>>
>> I am looking at it now. Looks like mysql cmd line output has changed on me since I last used this shell script. Of note, make sure you also have ffmpeg installed as well as that is what is used to cut/copy the segments as well as ‘glue’ them back together.
>>
>> Jay
>>
>
> I'll keep playing with this. I find it interesting and I might learn something interesting. I'll be interested in seeing what you find. I'm also troubled by what I see as failing on mythtranscode on the same file. Either there are problems with the file or v34 Master and transcode have issues.

Do you have a queryres file in the /tmp/mythNNNNNNN directory? Mysql has tightened their permissions such that I have abandoned them in my other shell scripts that I have since converted to python. I think I am going to have to convert this shell to python as well. The shell version just became too cumbersome with regard to getting data to use out of the database .


Mariadb may not be so ‘tight’ with permissions as mysql is.

Jay
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Tue, Jun 6, 2023, 8:46 AM Jay Harbeston <jharbestonus@gmail.com> wrote:

>
>
> On Jun 6, 2023, at 8:40 AM, James Abernathy <jfabernathy@gmail.com> wrote:
>
>
>
> On Tue, Jun 6, 2023 at 8:27?AM Jay Harbeston <jharbestonus@gmail.com>
> wrote:
>
>>
>> I am looking at it now. Looks like mysql cmd line output has changed on
>> me since I last used this shell script. Of note, make sure you also have
>> ffmpeg installed as well as that is what is used to cut/copy the segments
>> as well as ‘glue’ them back together.
>>
>> Jay
>>
>>
> I'll keep playing with this. I find it interesting and I might learn
> something interesting. I'll be interested in seeing what you find. I'm also
> troubled by what I see as failing on mythtranscode on the same file.
> Either there are problems with the file or v34 Master and transcode have
> issues.
>
>
> Do you have a queryres file in the /tmp/mythNNNNNNN directory? Mysql has
> tightened their permissions such that I have abandoned them in my other
> shell scripts that I have since converted to python. I think I am going to
> have to convert this shell to python as well. The shell version just became
> too cumbersome with regard to getting data to use out of the database .
>
>
> Mariadb may not be so ‘tight’ with permissions as mysql is.
>
> Jay
> _________________________
>

No gueryres file.

Jim A
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Mon, 5 Jun 2023 15:08:31 -0400, you wrote:


>I tried just putting in mysql -u root -p but that didn't work. When I
>tried putting in
>mysql -u root -p 1234
>assuming 1234 was my sudo password. They failed filling up the ffcut.log
>with mysql --help stuff,

The password must be directly after the -p option with no space in
between. A space is ok after the -u option.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Tue, Jun 6, 2023 at 9:59?AM Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

> On Mon, 5 Jun 2023 15:08:31 -0400, you wrote:
>
>
> >I tried just putting in mysql -u root -p but that didn't work. When I
> >tried putting in
> >mysql -u root -p 1234
> >assuming 1234 was my sudo password. They failed filling up the ffcut.log
> >with mysql --help stuff,
>
> The password must be directly after the -p option with no space in
> between. A space is ok after the -u option.
>
>
Thanks, If in the ffcut.sh script I have the cmds use

mysql -uroot
or
mysql -uroot -p1234

The results are the same for mariadb. The database query stuff seems to be
working, it's something related to the filelist.txt getting created
correctly.

JIm A
Re: Transcode script that keeps show in Recordings [ In reply to ]
>
> The results are the same for mariadb. The database query stuff seems to be working, it's something related to the filelist.txt getting created correctly.
>


The underlying problem is that evidently MariaDB doesn’t allow an external file to be created the same as mysql. Since the queryres file is no longer created, nothing else happens.


I am converting to python so that the returned data from the query is in a data array and then parsing the data array instead of from a input file.

Jay
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Tue, 6 Jun 2023 10:47:45 -0400, you wrote:

>
>>
>> The results are the same for mariadb. The database query stuff seems to be working, it's something related to the filelist.txt getting created correctly.
>>
>
>
>The underlying problem is that evidently MariaDB doesn?t allow an external file to be created the same as mysql. Since the queryres file is no longer created, nothing else happens.
>
>
>I am converting to python so that the returned data from the query is in a data array and then parsing the data array instead of from a input file.
>
> Jay


In MariaDB if you are exporting data to a file the secure_file_priv
variable (if set) limits the location you can save to. So check to
see if it is set:

SHOW VARIABLES LIKE "secure_file_priv";

Only if it is an empty string can you store the file anywhere you
like.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Tue, Jun 6, 2023 at 11:32?AM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Tue, 6 Jun 2023 10:47:45 -0400, you wrote:
>
> >
> >>
> >> The results are the same for mariadb. The database query stuff seems
> to be working, it's something related to the filelist.txt getting created
> correctly.
> >>
> >
> >
> >The underlying problem is that evidently MariaDB doesn’t allow an
> external file to be created the same as mysql. Since the queryres file is
> no longer created, nothing else happens.
> >
> >
> >I am converting to python so that the returned data from the query is in
> a data array and then parsing the data array instead of from a input file.
> >
> > Jay
>
>
> In MariaDB if you are exporting data to a file the secure_file_priv
> variable (if set) limits the location you can save to. So check to
> see if it is set:
>
> SHOW VARIABLES LIKE "secure_file_priv";
>
> Only if it is an empty string can you store the file anywhere you
> like.
>
>
Interesting! I did:
mythtv@ubuntu-mythtv:~$ sudo mysql -uroot -p
[sudo] password for mythtv:
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 152
Server version: 10.11.2-MariaDB-1 Ubuntu 23.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

MariaDB [(none)]> use mythconverg;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [mythconverg]> SHOW VARIABLES LIKE "secure_file_priv";
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| secure_file_priv | |
+------------------+-------+
1 row in set (0.001 sec)

Looks empty to me.

Jim A
Re: Transcode script that keeps show in Recordings [ In reply to ]
> On Jun 6, 2023, at 12:22 PM, James Abernathy <jfabernathy@gmail.com> wrote:
>
>
> Database changed
> MariaDB [mythconverg]> SHOW VARIABLES LIKE "secure_file_priv";
> +------------------+-------+
> | Variable_name | Value |
> +------------------+-------+
> | secure_file_priv | |
> +------------------+-------+
> 1 row in set (0.001 sec)
>
> Looks empty to me.


I was afraid of that. My attempts to find a solution in mysql failed to find a solution. So much security so little time! :-)

Jay

1 2 3  View All