INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]   Go Down

Author Topic: [How-to] Hands-free commercial skipping for JRiver & Windows Media Center  (Read 38469 times)

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day

It really looks like the AVC is the problem.

It then seems that we need to either:

1. See if JRiver can record in MPEG2 or h.264 (as SageTV does,).

I agree, and would suggest/hope that mpeg2 be the preferred solution, since it doesn't require the paid Comskip.

Or

2. See if MC-TVConverter can convert from AVC to MPEG2.

I would certainly prefer 1 because it would avoid a big video conversion job for each recording that takes time and possibly could affect the video quality

I think this conversion is possible, but as you say, it would be another encode, which would ideally be avoided.  MC-TVConverter does have an option to use an alternative (ffmpeg) for conversion, in case you need this.

I don't have any files with AVC video, so I can't test; sorry :(

If you find/create any other recordings that are not AVC video, and have commercials, you can/should test them, just to make sure that the process is working for you, when given the "right" input files.  I'm sure it will :)

Sorry it doesn't work for you; yet :(
Logged
pretend this is something funny

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72541
  • Where did I put my teeth?

Justin,
You deserve a lot of credit for taking this on and sticking with it.  Thank you.

Jim
Logged

nwboater

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1346

Well earlier I almost said that I know just enough about formats and this terminology to be dangerous. So now I will. I am!

I just found out that AVC and h.264 are basically the same thing. Here's from Wikipedia:

"H.264/MPEG-4 Part 10 or AVC (Advanced Video Coding) is a standard for video compression, and is currently one of the most commonly used formats for the recording, compression, and distribution of high definition video. The final drafting work on the first version of the standard was completed in May 2003.

"H.264/MPEG-4 AVC is a block-oriented motion-compensation-based codec standard developed by the ITU-T Video Coding Experts Group (VCEG) together with the International Organization for Standardization (ISO)/International Electrotechnical Commission (IEC) joint working group, the Moving Picture Experts Group (MPEG). The product of this partnership effort is known as the Joint Video Team (JVT). The ITU-T H.264 standard and the ISO/IEC MPEG-4 AVC standard (formally, ISO/IEC 14496-10 – MPEG-4 Part 10, Advanced Video Coding) are jointly maintained so that they have identical technical content.

H.264 is perhaps best known as being one of the codec standards for Blu-ray Discs; all Blu-ray Disc players must be able to decode H.264. It is also widely used by streaming internet sources, such as videos from Vimeo, YouTube, and the iTunes Store, web software such as the Adobe Flash Player and Microsoft Silverlight, and also various HDTV broadcasts over terrestrial (ATSC, SBTVD, DVB-T or DVB-T2), cable (DVB-C) and satellite (DVB-S and DVB-S2)."


So the problem comes down to what I mentioned earlier: For Comskip to work with h.264/AVC the 'Donators Version' of Comskip has to be used. I'm pretty sure that is not what MC-TVConverter is using. And I don't know how he could include that for free with his program since the Comskip developer wants a 'Donation' for it.

But possibly he could make a 'Call' to an external Donators Version of Comskip that people like me would have installed on our PC after we make our Donation. That's basically how it presently works with SageTV.

Added on Edit:  I forgot to mention that I used Media Info to check SageTV Recordings. They show the exact same info as the ones recorded in MC17. And again, the edl files are being created in Sage because I have the Donators version on Comskip.

Thoughts?

Rod
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72541
  • Where did I put my teeth?

You could try renaming AVC to MPG or similar.  Something like that might work.
Logged

nwboater

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1346

You could try renaming AVC to MPG or similar.  Something like that might work.

Thanks for the idea Jim, but not sure how we could do it. The file name that MC, Comskip, etc sees has the extension .ts. I believe that ts (Transport Stream) is a 'Container' kind of like mkv is. So we could change that file extension (but don't want to) but I don't see how we could get access to change the name of the codec (AVC) which is inside the Container like AC3 for the audio is. Also I wonder if it wouldn't mess up something else that needs to know what actual codec is being used.

Rod
Logged

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day

Justin,
You deserve a lot of credit for taking this on and sticking with it.  Thank you.

Jim

Thanks Jim.  I'm just trying to pay back some of the help I've received over the years. :)

...For Comskip to work with h.264/AVC the 'Donators Version' of Comskip has to be used. I'm pretty sure that is not what MC-TVConverter is using. And I don't know how he could include that for free with his program since the Comskip developer wants a 'Donation' for it.

But possibly he could make a 'Call' to an external Donators Version of Comskip that people like me would have installed on our PC after we make our Donation. That's basically how it presently works with SageTV.

Added on Edit:  I forgot to mention that I used Media Info to check SageTV Recordings. They show the exact same info as the ones recorded in MC17. And again, the edl files are being created in Sage because I have the Donators version on Comskip.

Well, that's good news, I think.  The fact that it works with SageTV means that it should work for us too.

Now, I'm not sure how the Donators version works yet (I need to donate myself soon, so I'll find out), but I imagine you either get a special comskip.exe, or some kind of key.  Either way, I suspect that you could copy it/them to the location that MC-TVConverter calls to launch comskip, which is located at C:\Program Files (x86)\MC-TVConverter\tools\comskip, shown here...



That image highlights the comskip.ini, but they are all in the same folder.  I would try replacing those versions with your Donator version(s) and try again.  I'm guessing that will work.  If not, let me know and I'll look into it.

I'm going to donate now, so I should know more about how it works soon, and will report back if I see an obvious error/change to what I just wrote.

FYI, I believe the donate version of comskip also reads wtv files directly now; for anyone interested it that.
Logged
pretend this is something funny

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day

Yep, it looks like it's just a newer/updated comskip.exe, based on his site...

Quote
Comskip Early Access

After donating 10$ or more you will receive a personalized access code to the Comskip Early Access download area where bugfixes and improvements will be first available. The Comskip version available in the Early Access download area is able to process HD MPEG2 recordings at double speed, Decode h.264 and WTV. Sending the access code for the early access area is a manual process,be patient.

I'm currently using version 80.042, which I believe is the most recent "public" version.  I expect I'll get my access code in the next few days, but I don't have any files with AVC/h.264 to test with, so let me know if you still have problems.

I'll probably write up the new procedure tomorrow, and now I know to make notes about all this for others :)
Logged
pretend this is something funny

tls62dk

  • Galactic Citizen
  • ****
  • Posts: 406

Hi Justin

I had the same thought as you, so I will also sign up for the paid version and try it on my wtv files with tha AVC stream.

I will report back here when I have done some testing.

TLS
Logged

nwboater

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1346

Thanks Justin for your suggestion of trying to use the donators version within MC-TVConverter. I'll try it out later and post the results. Hopefully everything of Comskip is within the Comskip folder and that it doesn't have stuff in the Registry or anywhere else that may be different in the two versions. Will be great if it works.

Rod
Logged

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day

I just got my link to the donators version, and it's basically the same as the public release, just newer/updated.  Another benefit is that it's supposed to run twice as fast, which will be very nice!

I'm now pretty sure that just copying everything in that zip file to the location I mentioned above will work fine.
Logged
pretend this is something funny

nwboater

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1346

Justin- Hate to rain on our parade, but.......

I installed the donators version of comskip in place of the regular one. Ran a half hour show that has commercials and no edl file generated.

I think the problem now is that MC-TVConverter says in it's log file "streamInfo: stream has no MPEG2 video". So without that I don' think it's running comskip. I believe it's looking for a format that it thinks is acceptable to comskip and doesn't know that I have the Donators Version installed.

If my take on it it valid I think there could be two fixes, both requiring program mods by the developer.

1. He adds AVC as acceptable to start Comskip. We replace his version of Comskip with the Donators Version as I just did for the test. A lot more people could use it and way less chance of messing up his program.

OR

2. We purchase the donators version and install it in a separate Comskip Folder. (This is what we do for Sage) He has a setup checkbox that allows for an entry stating that we have the Comskip Donators Version. When the program starts it sends a call to the donators version of comskip.

I like #2 because the techie level required to implement is much less. Also no messing with his program files.

Rod
Logged

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day

That stinks!  I didn't think of that :(

I have posted a new reqeust to their forum, at the link above.  I'm copying it here, in case you wish to add anything to it there...

Quote
I was able to do some more testing, and can confirm that it is working, as long as there are commercials in the file. I still think it might be better to create/keep the edl file even if blank, just so a user knows that it ran comskip, but it's not a big deal, so I'm not too worried about it, if you don't want to bother making the change

Unfortunately, that was only one of the issues the user has run into. He lives in a country that broadcasts TV with the AVC/h.264 video codec, which the "regular" version of Comskip cannot process. However, the Donator version of Comskip is able to process these files. I suggested they put the donator version in the tools\comskip folder that you use, but it still didn't work. I see from the log that you are checking for mpeg video, and apparently not running comskip if there is no mpeg video. This certainly makes sense, but is causing the videos to not be processed.

Is there any way you can allow the user to use the Donator version if they have it? Either by allowing a custom path to Comskip, or by you not making this check for mpeg video, and just letting Comskip fail if it's unable to process the file? Or maybe with some other solution I'm not thinking of?

Thanks again for all your prompt help with issues, I really appreciate it!
Logged
pretend this is something funny

nwboater

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1346

That stinks!  I didn't think of that :(

I have posted a new reqeust to their forum, at the link above.  I'm copying it here, in case you wish to add anything to it there...


I just registered for their Forum and made this post:

Hi,

I'm the "User" that JustinChase was talking about in his last post. I would like to clarify the issue a bit.

I live in Canada, but I don't believe that the Cable broadcast we receive are AVC files. The issue arises because we use an Hauppauge HDPVR 'Tuner'. It is the one that puts out the files in AVC/h.264 for the video. I believe the Hauppauge Collosus would do the same. Both are popular tuners.

I have been using SageTV for several years and am now trying to switch to JRiver Media Center 17. Comskip has been working fine in SageTV but to use it with the HDPVR one has to have the Donators Version of comskip. It is installed in a separate Comskip folder in Program files. The Comskip 'Detector' plugin for Sage uses that version of Comskip.

So if there would be a way to use the Donators Version of Comskip with your program we could then be commerical free in JRiver MC. That would be wonderful!

And speaking of wonderful your program is. Thanks very much for creating it and sharing it.

Best Regards,
Rod


I'll look forward to his response.

Rod
Logged

nwboater

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1346

Not good news. Here is the response from the developer of MC-TVConverter:

"Hi and welcome!
I'm glad the GUI is of help for you!

Unfortunately I currently don't have plans to include the possibility to use the donation version of comskip. It would mean to much changes in the code - indeed I would have to change all profiles which is the most time consuming part in development.
Anyhow, I collect all user requests and if I feel the app is stable enough and has all basic features working fine (currently I rework audio processing), I will concentrate on these additional features. So, don't expect it too soon, but not all hope ist lost... ;)

PS: the next version will also process h264 encoded streams with comskip but will convert it to mpeg2 first - so, it will work, but it will have disadvantages.
"


So looks like those of us that have 'Tuners' that output high quality AVC/h.264 are out of luck for now trying to use Comskip with MC17.

I have no idea how difficult the process might be to do some kind of script that would start Comskip (donators version) and tell it where to put it's edl file. Off the top of my uninformed head it wouldn't  seem that difficult for someone who knows scripting. Or is this perhaps something that Babgvant could do with his DVRMSToolbox?

Rod
Logged

nwboater

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1346

I may have found a solution for running Comskip on AVC/h.264 files as well as regular MPEG2 files. There is a small program called Comskip Monitor. It was written by a person on the SageTV Forum and it was intended to work with Sage. However it's completely separate from Sage. It monitors a folder for the appropriate video file and when one is found it starts Comskip.

The Donators Version of Comskip is required to work with the AVC/h.264 files. I just installed it over the Comskip program files that come with Comskip Monitor.

I just had it create an edl file for a program recorded in Media Center. Hurah!!!

The program is available on the SageTV Forum at  http://forums.sagetv.com/forums/showthread.php?t=20358&highlight=comskip+monitor   The Download link is at the bottom of the first post. On the Download page are also the installation instructions.

I had to do a bit of stuff to get it going and am not finished. For some reason it wouldn't start Comskip when I told it the folder the files are in. But when I pointed it to the file it worked.

I plan on spending more time on this in the next day or two and hope to be able to do a write-up on it. I'm just posting this now to let people know there is some hope, and for those so inclined to go ahead and experiment with it.

Rod
Logged

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day

Not good news. Here is the response from the developer of MC-TVConverter:

So looks like those of us that have 'Tuners' that output high quality AVC/h.264 are out of luck for now trying to use Comskip with MC17.

I have no idea how difficult the process might be to do some kind of script that would start Comskip (donators version) and tell it where to put it's edl file. Off the top of my uninformed head it wouldn't  seem that difficult for someone who knows scripting. Or is this perhaps something that Babgvant could do with his DVRMSToolbox?

I believe he started the thread about top 20 scripting ideas here on the main board.  Yep, here it is...

http://yabb.jriver.com/interact/index.php?topic=71482.0

For what you're wanting to do, I have to imagine it would be pretty easy for a script to just call comskip.exe.  I just don't have any knowledge of how to do it.  I believe all the settings you need can be set in the comskip.ini. 

In fact, MC-TVConverter is probably not the right tool to use anyway.  It was designed to convert from wtv to something else, and call other programs to do other types of conversion; none of which you need.  You ONLY need to start comskip when TV is done recording.  I'm sure there are other/better/easier ways to do just that 1 action.

I see a file called PostProcessing.bat, which one can use to call different profiles for different channels (which I need to set up one day!), and i remember seeing something about how to use it, but don't remember the details.

One thing I did find while looking I wanted to being to your attention though...

Quote
WARNING: When processing h.264 you may have to set volume_slip=150 if no or little commercials are found

I may have found a solution for running Comskip on AVC/h.264 files as well as regular MPEG2 files. There is a small program called Comskip Monitor.

I had to do a bit of stuff to get it going and am not finished. For some reason it wouldn't start Comskip when I told it the folder the files are in. But when I pointed it to the file it worked.

Sounds promising!  I know the time it takes to get it working just right ;)

I plan on spending more time on this in the next day or two and hope to be able to do a write-up on it. I'm just posting this now to let people know there is some hope, and for those so inclined to go ahead and experiment with it.

good luck  :D
Logged
pretend this is something funny

nwboater

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1346

I believe he started the thread about top 20 scripting ideas here on the main board.  Yep, here it is...

http://yabb.jriver.com/interact/index.php?topic=71482.0

For what you're wanting to do, I have to imagine it would be pretty easy for a script to just call comskip.exe.  I just don't have any knowledge of how to do it.  I believe all the settings you need can be set in the comskip.ini. 

I made a post early in that thread about Comskip and was hoping he might bite - but........


One thing I did find while looking I wanted to being to your attention though...

WARNING: When processing h.264 you may have to set volume_slip=150 if no or little commercials are found

good luck  :D

Thanks for that setting. I'll experiment with it later.

Well I finally have Comskip generating the .edl files for my HDPVR files recorded in MC17. I was about to make a post here explaining how to do it but thought I best run one or two of the programs in MC to confirm they actually skip. They don't! No idea what's wrong at this point since I'm using the same Donators Version of Comskip that is working so well in Sage. I will check into the volume_slip=150 setting.

I'll keep working on this - just wanted to post that I hadn't forgotten about it.

Rod
Logged

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day

Well I finally have Comskip generating the .edl files for my HDPVR files recorded in MC17. I was about to make a post here explaining how to do it but thought I best run one or two of the programs in MC to confirm they actually skip. They don't! No idea what's wrong at this point since I'm using the same Donators Version of Comskip that is working so well in Sage. I will check into the volume_slip=150 setting.

You can open the .edl file with Notepad++ and it will be a simple list of time codes.  You should be able to tell if they look like they would skip commercials, or if they are short skips, or none.

I suspect the setting above might help, but that's a guess.

Also, the edl files must have the EXACT name as the show, other than .edl, or it wont work.

good luck :)
Logged
pretend this is something funny

nwboater

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1346

JustinChase,

Thanks for the tips. It was actually skipping commercials, just not all of them. I finally compared a program recorded in MC17 that used my new procedure to generate the edl file to one that SageTV had recorded. The results were very similar.

I have started a new thread  for those that may want to try using Comskip on AVC/h.264 MPEG4 recordings. It is located here  http://yabb.jriver.com/interact/index.php?topic=71634.0

Thanks again for all your good help JustinChase.

Rod
Logged
Pages: 1 [2]   Go Up