Author Topic: Removing commercials from recorded TV programs  (Read 13166 times)

Mike Snyder

  • Guest
Removing commercials from recorded TV programs
« on: September 04, 2020, 01:08:15 am »
I play golf, sort of.  I also like to watch golf instructional videos on the Golf Channel, and record them for future viewing.  I have used a WinTV PVR card and EmperoarTV for this purpose for years, and it still works fine.  I don't want to see the commercials more than once, so for years I have used ProjectX to cut them out, mplex to put the audio and video back together, and ffmpeg to convert the resulting .mpg file to a small .avi file for storage.  The latter two things have stopped working correctly.  They worked under ArcaOS 5.0, but at some point they stopped.  I'm at 5.0.5 now.

If I run ProjectX under Golden Code java, it appears to work, but the .mp2 and .m2v files cannot be reassembled by mplex.  The audio seems to be OK, because the file that mplex produces has audio, but no video, but I've no way to check either of them except that they either mplex or not.  If I use the jave in 5.0.5, the program loads, but when I try to add a file, it crashes with no error message at all.

I recently copied the .mpg file produced by EmperoarTV to my OpenSUSE system and ran ProjectX under whatever java it has.  The resulting files were able to be multiplexed with mplex after I cut out the commerials.  The file will play in VLC, but cannot be converted to .avi with ffmpeg in Linux or in ArcaOS.  It will convert to an .mkv file with Handbrake, but at about twice the size of the former .avi files.

Is anyone else using ProjectX in ArcaOS for this sort of activity?  What java are you using?  Is there an easier way to do what I am doing in ArcaOS?

Thanks,
Mike

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Removing commercials from recorded TV programs
« Reply #1 on: September 04, 2020, 02:43:15 am »
I don't know the programs and searching for mplex doesn't help. Can you bypass the mplex step and just use FFmpeg to mux the audio and video in an AVI? What formats does ProjectX spit out?
FFprobe is a useful program included with FFmpeg to find out what format a file is.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Removing commercials from recorded TV programs
« Reply #2 on: September 04, 2020, 02:47:50 am »
Hi Michael.

I have no experience with those programs, but just to inform the rest, can you confirm the version that you are using under ArcaOS:
- projectx_v0.90.4.00-2006-03-31-rel2.zip
- mplex-1.6.2.zip
Are those?

Regards
« Last Edit: September 04, 2020, 03:12:26 am by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Removing commercials from recorded TV programs
« Reply #3 on: September 04, 2020, 03:08:47 am »
Hi

I just made a quick test with Project-X 0.91 and OpenJDK on ArcaOS, and it runs. I don't know if it will work correctly since I don't know how to use it.
I only changed the path of the "startos2.cmd" file.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Removing commercials from recorded TV programs
« Reply #4 on: September 04, 2020, 03:25:13 am »
Hi

I can not run mplex 1.6.2 on ArcaOS. It says it was compiled with innotek gcc, so it is an old port.
I get:
Code: [Select]
[C:\HOME\DOWNLOADS\MPLEX-1.6.2]mplex
SYS1804: The system cannot find the file LIBC06B4.
Maybe someone with compiling experience can recompile it (there is a build.cmd file on it), or maybe port some newer version.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Removing commercials from recorded TV programs
« Reply #5 on: September 04, 2020, 03:59:59 am »
Hi

I can not run mplex 1.6.2 on ArcaOS. It says it was compiled with innotek gcc, so it is an old port.
I get:
Code: [Select]
[C:\HOME\DOWNLOADS\MPLEX-1.6.2]mplex
SYS1804: The system cannot find the file LIBC06B4.
Maybe someone with compiling experience can recompile it (there is a build.cmd file on it), or maybe port some newer version.

Regards

Seems to be missing the actual source. Best would be to try building the more up to date source from  http://sourceforge.net/projects/mjpeg, which I don't have time for right now but probably wouldn't be hard.
Here's the dll.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Removing commercials from recorded TV programs
« Reply #6 on: September 04, 2020, 05:33:43 am »
Hi

I can not run mplex 1.6.2 on ArcaOS. It says it was compiled with innotek gcc, so it is an old port.
I get:
Code: [Select]
[C:\HOME\DOWNLOADS\MPLEX-1.6.2]mplex
SYS1804: The system cannot find the file LIBC06B4.
Maybe someone with compiling experience can recompile it (there is a build.cmd file on it), or maybe port some newer version.

Regards

Seems to be missing the actual source. Best would be to try building the more up to date source from  http://sourceforge.net/projects/mjpeg, which I don't have time for right now but probably wouldn't be hard.
Here's the dll.

Updated mplex at http://smedley.id.au/tmp/mplex.zip

or a full build of mjpegtools 2.1.0 - http://smedley.id.au/tmp/mjpegtools-2.1.0-os2-20200904.zip
« Last Edit: September 04, 2020, 11:46:17 am by Paul Smedley »

Mike Snyder

  • Guest
Re: Removing commercials from recorded TV programs
« Reply #7 on: September 04, 2020, 02:09:47 pm »
I'm using projectx_v0.90.4.00-2006-03-31.zip.  I was using mplex from the 1.8.0 version of mjpegtools, but thanks to Paul, I'll now be using the 2.1 version. ;D  Is that quick service!  Martin, the program starts with the JDK from 5.0.5, too.  Can you load an .mpg file of about 1Gb size into it?  Mine crashes when I load the file that I need to edit, even if it's the only program running.

I've never tried to use ffmpeg to multiplex the files, but will see whether I can figure out how to do that.

Thanks for the input, and for the new build, Paul.

Mike Snyder

  • Guest
Re: Removing commercials from recorded TV programs
« Reply #8 on: September 04, 2020, 02:31:48 pm »
I decided to try this with ProjectX_.0.91, so I downloaded the files from sourceforge.  Extracted the files from the zip file and discovered that the readme says to build the jar from the sources.  I tried that, setting the java_home directory to g:\programs\openjdk.  I get the following error:

SYS1041: The name "G:\Programs\OpenJDK\bin\jar.exe" is not recognized as an internal or external command, operable program or batch file.

I don't usually build anything, so I've no idea what this means or how to fix it.

Ideas?

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Re: Removing commercials from recorded TV programs
« Reply #9 on: September 04, 2020, 02:52:39 pm »
As I understand it the openjdk6 is the runtime and for building things you need the openjdk6-sdk.

Mike Snyder

  • Guest
Re: Removing commercials from recorded TV programs
« Reply #10 on: September 04, 2020, 03:24:18 pm »
Are those files on the ArcaOS install disk?  If so, how can I extract just the java sdk files so that I can build the jar?  Can that be done without installing the update?

Olafur Gunnlaugsson

  • Full Member
  • ***
  • Posts: 244
  • Karma: +5/-0
    • View Profile
Re: Removing commercials from recorded TV programs
« Reply #11 on: September 04, 2020, 03:37:56 pm »
Are those files on the ArcaOS install disk?  If so, how can I extract just the java sdk files so that I can build the jar?  Can that be done without installing the update?

Should be, if not then: ftp://ftp.netlabs.org/pub/java/openjdk6_b27_ga5/openjdk6_b27_sdk_os2_ga5-20130217.zip

or

ftp://ftp.netlabs.org/pub/java/openjdk6_b27_ga5/

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Removing commercials from recorded TV programs
« Reply #12 on: September 04, 2020, 04:12:04 pm »
Can you load an .mpg file of about 1Gb size into it?  Mine crashes when I load the file that I need to edit, even if it's the only program running.

Try increasing VIRTUALADDRESSLIMIT to 2560 or even 3072

Mike Snyder

  • Guest
Re: Removing commercials from recorded TV programs
« Reply #13 on: September 04, 2020, 05:59:53 pm »
Man, have I learned a lot today.  My virtual address limit is already set to 3072.

Thanks for the link.  I downloaded the java 6 SDK and installed it.  After a couple of hickups, like not understanding that it needed both the jre and the sdk to compile anything, the new ProjectX.jar version 0.91 compiled, loaded, and edited a video file.  I nearly fell out of my chair!

The 2.1 version of mplex multiplexed the files from ProjectX, and ffmpeg converted the .mpg to an .avi less than half of the original size.  The .avi file plays just fine in KMP version 0.7.1.

However, it will not play in VLC 3.11, the latest version, or the previous one that I was using, 3.10.  The file loads and starts to play, but does not show the video and the audio and the whole window of VLC stutter.  I don't know how better to describe what it is doing, but I obviously can't use it.  Apparently VLC was part of the problem, though not all of it.  Has anyone else had this trouble with VLC?

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Removing commercials from recorded TV programs
« Reply #14 on: September 04, 2020, 11:05:46 pm »
Thanks Paul for the port.

Michael, I don't know the reason of why you compiled ProjectX 0.91 under OS/2, since the ProjectX 0.91 jarwas already there and runs , but it is awesome that you were able to do that on ArcaOS.

I was not able to test on the "site compiled" ProjectX 0.91 jar if it works with a 1GB video or if it crash. But if you notice any difference between the "site jar" and "your compiled jar", please post the file.

Regards
« Last Edit: September 06, 2020, 03:54:45 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.