Modify

Ticket #6236 (assigned Patch - Feature)

Opened 4 years ago

Last modified 14 months ago

Improve subtitle support in mytharchive

Reported by: brandons@… Owned by:
Priority: minor Milestone: unknown
Component: Plugin - MythArchive Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The patch attached does the following things;

Before running ffmpeg on mpeg files...

  • Creates a symbolic link to the source file because projectx does not like spaces in filenames.
  • Uses projectx to conduct a preliminary search for teletext based subtitles.
  • Selects a subtitle that matches the language preferences.
  • Creates a projectx ini file.
  • Runs projectx to cut commercials, demux audio, video, and subtitles using the created ini file.
  • Runs ffmpeg to reencode the mv2 file only.

Attachments

mythburn.py.diff (24.6 KB) - added by brandons@… 4 years ago.
patch for mytharchive to improve subtitle support
mythburn.py.2.diff (24.6 KB) - added by brandons@… 4 years ago.
Updated version of previous attachment
mythburn.py.3.diff (24.4 KB) - added by brandons@… 4 years ago.
Updated version.
mythburn.py.4.diff (25.3 KB) - added by brandons@… 4 years ago.
Updated patch
mythburn_patch6236.log (3.9 KB) - added by wavebits@… 4 years ago.
progress_patch6236.log (1.9 KB) - added by anonymous 4 years ago.

Change History

Changed 4 years ago by brandons@…

patch for mytharchive to improve subtitle support

Changed 4 years ago by brandons@…

Updated version of previous attachment

Changed 4 years ago by brandons@…

Updated version.

comment:1 Changed 4 years ago by brandons@…

After further testing, i need to change how renameProjectXFiles finds subtitle streams.

Changed 4 years ago by brandons@…

Updated patch

comment:2 Changed 4 years ago by brandons@…

The patch i just uploaded Fixes the ordering of streamids compared with the actual files that are detected in the projectx log file. The video stream is always processed first irrespective of its actual order in the ID list. The remaining streams are processed in the same order as the appear in the ID list.

NOTE: this patch applies directly to the trunk version, none of the previous patches are required.

All tests on input files that are MPEG have given quite good results.

comment:3 Changed 4 years ago by anonymous

Great idea to run projectx first to clean up the stream and decrease encode time. Patch applied to trunk version 1.0726/fixes mythburn.py. Script always fails with this error .. failed while running mytharchivehelper to get stream info. ICEAuthority error. The unpatched script usually completes with no errors but 720p recordings (59.94 frame rate) cause cuts to be made in the wrong places and glitches in the stream generate chapter count errors.

Some security problem with database query by mytharchivehelper??

comment:4 Changed 4 years ago by brandons@…

Can you attach the mythburn.log and progress.log files that are created. Can be found in the logs directory of the working directory of mytharchive.

PS. If you put your email address as the autor you will get notifications when the ticket has changed. Email addresses are not truncated for your privacy. I understand if you prefer not.

comment:5 Changed 4 years ago by wavebits@…

I started again with a fresh trunk file (0.1.20080726-1-fixes) and applied the patch. My first attempt used a mythburn.py that had been patched to test for the LIBA52 audio variant around line 2675 in the script.I don't know if this change is still needed now with your patch. A 720p (1280x720) network recording was used as a test that had plenty of commercial breaks. The script terminated early at the mytharchivehelper command. The "ICE default IO error handler doing an exit()" immediately proceeded termination. I am attaching a copy of the log file. All permissions seem correct. The unpatched script runs with the mentioned limitations without the mytharchivehelper error.

Thanks for working on this patch.

Dave

Changed 4 years ago by wavebits@…

Changed 4 years ago by anonymous

comment:6 Changed 4 years ago by brandons@…

The "ICE default IO error" has been explored and fixed, yet to attach a patch. The issue with AV sync when cut points are used is still being explored. PERHAPS this is why ffmpeg was run before projectx in the original script.

The problem appears to be that ffmpeg drops several frames around the point of a cut, the end result is that video is shorter than audio.

comment:7 Changed 3 years ago by robertm

  • Status changed from new to assigned

comment:8 Changed 15 months ago by stuartm

  • Version changed from head to Master Head
  • Type changed from patch to Patch - Feature

This ticket hasn't shown any activity in 3 years, close as Won't Fix?

comment:9 Changed 15 months ago by brandon.d.shields@…

As the original ticket submitter, i would agree with that. Think minimal effort should be applied to making projectx mesh more with mytharchive and instead believe that mythtv should have it own utilities to extract subtitles etc. I can see this already happening.

I won't be commenting on this ticket any more.

comment:10 Changed 14 months ago by paulh

  • Owner paulh deleted
View

Add a comment

Modify Ticket

Action
as assigned
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.