Mailing List Archive

1 2 3  View All
Re: Transcode script that keeps show in Recordings [ In reply to ]
> Thanks John,
>
> Your mythffmpeg command line seems to do the trick - I can now cut the adverts form my recordings and rebuild the seektable after the transcode.
>
> I've been modifying Jay Harbeston's ffcut.sh script, since when I first tried it, it didn't work at all with my h264 recordings - I also had to modify his sql commands, since they didn't work for me (as the user I ran the script as, in testing, does not have a mysql account), then I had to modify the ffmpeg commands for h264. My final task, since someone suggested that it isn't a good idea to directly modify the sql database from these scripts will be to use mythutil and mythcommflag in place of the sql commands.
>


I have since created a python version of the script that no longer has to deal with all the user /password problems as well as file permissions problems.

https://pastebin.com/UhW637Wv?


In addition , it will perform cuts based on what has been defined when editing on any transport stream files no matter what type.
mythffmpeg does is copy from the original files to the new file made up of the cut segments from editing. You shouldn’t need to do anything to them unless you are converting the video at the same time.

.
> I'll be happy to share my version of the script, so long as Jay has no objections (I'll make sure I'll credit him in the script for the 99% of the work he did)

I don’t mind if you share you versions.

I do want to keep my version separate since it does not alter the video stream in any way except for removing the defined cuts, no matter what type of video is in the TS file.

Regards!

Jay
Re: Transcode script that keeps show in Recordings [ In reply to ]
>
> It's certainly interesting to see how this job might be done in python, but I'm a little concerned about its direct modification of the DB.
>
> There are four mysqlupd instances and although they may well work as intended I think I would be careful about using it on a system with a 'valuable' database.
>
> Just saying :-)


John, et al.,

If I were to want to do it the ‘mythtv’ way, I know I would need to call the api’s within mythtv.

Not sure how to do both 1 and 2 below yet..

1. I need to get the recordings directory
2. Frame rate and framecount for the video

3. I would need to get a list of cutpoints that need to be processed.. Using GetRecordedCutList api.

Updates/inserts/deletes.

1. Update the recorded table. I suspect I can create a new job rebuilding the seek table that also sets the file size?
2. Clear the recorded markup table . Not sure what does this? Rebuilding seek table??
3. Clear the recorded seek table. I’m guessing this happens in rebuilding the seek table?
4. Add job entries for the rebuildseektable from API ?or run the following command?


Thanks!

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 ]
-----Original message-----
From: Jay Harbeston <jharbestonus@gmail.com>
Sent: Friday 9th June 2023 14:45
To: Discussion about MythTV <mythtv-users@mythtv.org>
Subject: Re: [mythtv-users] Transcode script that keeps show in Recordings


>
> It's certainly interesting to see how this job might be done in python, but I'm a little concerned about its direct modification of the DB.
>
> There are four mysqlupd instances and although they may well work as intended I think I would be careful about using it on a system with a 'valuable' database.
>
> Just saying :-)


John, et al.,

If I were to want to do it the 'mythtv' way, I know I would need to call the api's within mythtv.

Not sure how to do both 1 and 2 below yet..

1. I need to get the recordings directory
2. Frame rate and framecount for the video

3. I would need to get a list of cutpoints that need to be processed.. Using GetRecordedCutList api.

Updates/inserts/deletes.

1. Update the recorded table. I suspect I can create a new job rebuilding the seek table that also sets the file size?
2. Clear the recorded markup table . Not sure what does this? Rebuilding seek table??
3. Clear the recorded seek table. I'm guessing this happens in rebuilding the seek table?
4. Add job entries for the rebuildseektable from API ?or run the following command?


Thanks!

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

Hi Jay,



I don't think reading the database is a problem, but if there is an API to get the information for the cutlists etc, then that saves any problems with mysql accounts



For the updates, I've used these commands:


# Clear bookmarks, cutlist, seektable, and setmarkup

echo "Clearing bookmarks, cutlist and the seektable"

/usr/bin/mythutil --chanid $chanid --starttime $starttimeutc --clearbookmarks

/usr/bin/mythutil --chanid $chanid --starttime $starttimeutc --clearcutlist

/usr/bin/mythutil --chanid $chanid --starttime $starttimeutc --clearseektable



# Rebuild the seektable with mythcommflag --rebuild

echo "/usr/bin/mythcommflag --rebuild --chanid $chanid --starttime $starttimeutc"

/usr/bin/mythcommflag --rebuild --chanid $chanid --starttime $starttimeutc



I haven't been able to find a way, yet, to update the file size and clear the recordedmarkup table for the recording without updating with sql commands



Regards,

Dave.
Re: Transcode script that keeps show in Recordings [ In reply to ]
On Thu, Jun 8, 2023 at 12:59?PM Jay Harbeston <jharbestonus@gmail.com>
wrote:

> Jim,
>


> That is correct. In the python version that I am finishing up, there will
> be a remove option on the command line in mythtv settings.
>
> It will be the final parameter, and if the 4th parameter is YES, the orig
> backup file WILL NOT be created. If it is NO, then the orig file WILL be
> created.
>
>
> As per another comment, I am replacing ffmpeg with mythffmpeg as well.
>
> The file that you processed, did it have 5.1 audio? If so, I am guessing
> that it came through correctly after ffcut?
>
>
> Jay
>

I got a 5.1 show recorded last night and corrected the commercials it found
in mythfrontend edit and saved the cut list. Then I ran fftcut.py as a
UserJob within mythfrontend. ffprobe shows that the original has 2 audio
streams: English 5.1 and Spanish stereo. The file outputted by ffcut.py
shows: only English 5.1

Jim A
Re: Transcode script that keeps show in Recordings [ In reply to ]
>
>
> I got a 5.1 show recorded last night and corrected the commercials it found in mythfrontend edit and saved the cut list. Then I ran fftcut.py as a UserJob within mythfrontend. ffprobe shows that the original has 2 audio streams: English 5.1 and Spanish stereo. The file outputted by ffcut.py shows: only English 5.1

That’s good news. Sounds like it is getting getting just the ‘default’ or stream 0 audio track when using copy option for audio.

If for some reason you wanted the other audio track, you would want to mod the ffmpeg line to copy the other audio stream.

****************

As a side note, I have done some ’sleuthing’ on the ‘-c copy’ option for ffmpeg/mythffmpeg and it copies audio, video, subtitles, and data by default.

If there were subtitles or extra data on the original, then they would also be copied straight thru when processing.

Jay

1 2 3  View All