View Full Version : Program I created to cut commercials
hades
05-16-2004, 01:00 AM
After browsing the forum for a while, I read about SmartChapter and wanted to try it... It works great! But I wanted an automatic way of cutting the commercials out, not go through several other programs. So after a couple of hours of tinkering I have this.
My setup now records the shows, then at 5am, my HTPC machine (with the HD space) runs this program. It:
- creates a batch file to cut the commercials out
- calls the batch file created above and the cut files are placed into another directory
- The end result is automatic commercial removal!
This achieves my goal of having 0 user interaction.
------------
CutCommercials
commandline: CutCommercials
A CutCommercials.ini also must be in the same directory. It contains 4 directories (and one extra line) and has the following format:
asfcut Dir is the directory where the asfcut.exe file is
Source Directory is the source where the to-be-cut files are. The source files are [NAME]-[DATE].wmv (as named by BeyondTV, example: Simpsons-2004-05-16-0.wmv
Destination Directory is the dir where it will place the cut files. The cut files are named [NAME]_CUT_[DATE].wmv . Example: Simpsons_CUT_2004-05-16-0.wmv
Destination Directory for original files contains either DELETE (**all uppercase**) if you want the original files to be deleted or the path where you want the original files to be put
Optional Parameters for asfcut - The 5th line contains any custom switches you might need to pass to ASFCut.exe in order for it to work (usually can be left empty). Just make a list, ex: -fastscan -adelay 49
----------
All this program does is take the chapter XML file, reparse it and create a batch file. The batch file calls 'asfcut' as many times as there are files in your dir and then asfcut cuts the commercials out.
Disclaimer: There should not be any problems running it, and there should be no malicious activity. If something goes wrong, then I cannot take responsibility. To be safe, I recommend that you wait for some other people to verify that it works.
----------
Basic Setup Instructions
All that is required of the setup of the program is to extract the ZIP file into a directory of your choice, then edit the .INI file to point to the correct directories. Then run the EXE. It will do nothing but generate a CutCommercials.bat file (in the same directory) which contains instructions for asfcut. After a successful file-generation, it will run the batch file.
----------
Hope it's useful to someone.
hades
EDIT: 06/09/04 - Updated with Version 0.2! Put in error correction and the ability to automatically delete processed files.
EDIT: 07/21/04 - Reformatted this text to make it a bit clearer.
EDIT: 07/27/04 - Updated with Version 0.4! Small fixes, and a feature request that I could do immediately, so I did.
EDIT: 05/07/05 - Uploaded source file...
EDIT: 05/12/05 - Uploaded version 0.5, small change in accuracy of cut, should work for the odd case where commercial file does not have hundredth-second accuracy (see post on page 8).
________
volcano review (http://vaporizer.org/reviews/volcano)
________
how to love (http://www.love-help.org/)
hades
05-16-2004, 11:05 AM
Alright, it's back. I removed the thread yesterday night due to some bugs. Now it works the way I want it to... If there are problems, I will try to take care of them.
hades
________
GV700 (http://www.cyclechaos.com/wiki/Suzuki_GV700)
Cross673
05-17-2004, 11:15 PM
How does one use this new program/batch file. Do you have a installation guide for the code writing illiterate?
Any help would be appreciated, this sounds great.... :)
hades
05-18-2004, 01:02 AM
Thanx for your comment. I've added some basic instructions, but this is not a full-fledged program. All that is required of the setup of the program is to extract the ZIP file into a directory of your choice, then edit the .INI file to point to the correct directories. Then run the EXE. You do NOT need to recompile the source, it is only included if you wish to see it or edit it or improve it. The bare essentials required are the .EXE and the .INI which need to be in the same directory.
Let me know how it works out. :)
hades
________
Harley-Davidson FLH (http://www.cyclechaos.com/wiki/Harley-Davidson_FLH)
vogelap
05-18-2004, 04:42 AM
This looks interesting. I'll check it out and offer any suggestions!
Cross673
05-18-2004, 09:12 PM
When I tried to run the batch file windows told me that it was 'not a valid Win32 application'.
Does the bat file run automatically at a specific time?
I created new directories for the source and destination files (should I do this?). Your readme also talks about a "asfcut.exe file". I am unable to locate it?
Any more specific instructions would be greatly appreciated. Sorry to be illiterate in this matter...
hades
05-18-2004, 09:35 PM
When I tried to run the batch file windows told me that it was 'not a valid Win32 application'.
Does the bat file run automatically at a specific time?
I created new directories for the source and destination files (should I do this?). Your readme also talks about a "asfcut.exe file". I am unable to locate it?
Any more specific instructions would be greatly appreciated. Sorry to be illiterate in this matter...
Hi... I've updated the file to include 'asfcut.exe'. So please re-download it and try it again.
The BAT file that is created can be scheduled to run automatically, just schedule an event in Windows.
You can create source and destination directories, but they can be any directories, they can even be the same directory. The program will simply look at the WMV files in the source directory and then place the cut files in the destination directory. If they are the same then it's no big deal since the cut files have a slightly different filename.
As a last resort, try to install the Visual Basic runtime library: http://www.karenware.com/powertools/runtimes.asp
No problem with the explanations. I'm not a developer, just someone who like the way this setup works and likes to help out. I have not done any previous releases, so I'm doing my best to support it. When I have some more free time I will see whether I can improve on the program to make it easier to use.
Thanx!
hades
________
vaporizer pipe (http://vaporizers.net/vapor-genie)
troy16d
05-19-2004, 03:42 PM
When I tried to run the batch file windows told me that it was 'not a valid Win32 application'.
I was having the same problem and fond the the directory lines in the CutCommercial.ini where missing a back slash at the end
This is what the .ini file looked like when I had the not a valid Win32 application Problem
C:\CutCommercial Program
D:\SnapStream
D:\Temp
I added the back slash to the end and now it works fine
C:\CutCommercial Program\
D:\SnapStream\
D:\Temp\
(Just change the drive letters and folders to what yours are and put the back slash at the end)
Hope this fixes your promblem to
Tom Servo
05-19-2004, 05:49 PM
To get this to work do you have to have Windows task scheduler run the batch file? Cause I can't run it manually.
hades
05-19-2004, 09:02 PM
Can you please post the contents of the batch file that the program creates? Also, what error message do you get? Thanx,
hades
________
Yamaha XT550 (http://www.cyclechaos.com/wiki/Yamaha_XT550)
troy16d
05-20-2004, 02:21 AM
To get this to work do you have to have Windows task scheduler run the batch file? Cause I can't run it manually.
No I just clicked on the CutCommercials.bat file and it ran
Tom Servo
05-20-2004, 05:51 PM
Well at first I was getting a runtime error 53 when clicking on the cutcommercials.exe. But then that went away, but now it is back again. So I get this message when I click on the cutcommercials.exe:
Run Time Error 53
File Not Found
And when I click on the batch file it says this:
Not a valid Win32 application.
I've downloaded the VB runtimes. But I still get the error. I'm gonna try and restart and see what happens.
Tom Servo
05-20-2004, 05:57 PM
Well I restarted and same thing. Also there is nothing in the batch file so I can't post its contents. I hope I can get this to works sounds very cool.
noodleNT
05-20-2004, 09:37 PM
This is just making an empty batch file. Is there a command line call that needs to be done?
noodleNT
05-20-2004, 09:45 PM
Alright got the batch file working. I had renamed a file trying to get it to work on my palm so the chapter file and wmf had different names. I also added quotes in the INI settings file round my dirs since they contained spaces in the folder names. Not sure if it was needed but it works now. When is the created batch file called?
zhuei
05-20-2004, 11:16 PM
Is there some reason when i do this it makes my WMV files squished? I record in 720x480 5-9MBS VBR mpeg2, and transcode to 1-3mbs VBR WMV7... but then when i cut the commercials the wmv plays back tall vertically and squished from the sides. Any way to adjust ?
hades
05-21-2004, 11:35 AM
Alright got the batch file working. I had renamed a file trying to get it to work on my palm so the chapter file and wmf had different names. I also added quotes in the INI settings file round my dirs since they contained spaces in the folder names. Not sure if it was needed but it works now. When is the created batch file called?
Hmm... I thought the program took care of the quotes. The required code to do that is in the source and I have spaces in my path-names. But as long as it works... The batch file should be created in the same directory as the EXE file and should be called CutCommercials.BAT ...
The way the program works is it looks for any WMV files and then tries to process the chapter file, which is expected to have the same filename, but end in .chapters.xml . So if you renamed it, then it would definitely not work. :)
Well at first I was getting a runtime error 53 when clicking on the cutcommercials.exe. But then that went away, but now it is back again. So I get this message when I click on the cutcommercials.exe:
Run Time Error 53
File Not Found
And when I click on the batch file it says this:
Not a valid Win32 application.
I've downloaded the VB runtimes. But I still get the error. I'm gonna try and restart and see what happens.
This sounds like you're having the exact same problem as 'troy16d', sounds like you forgot to include the trailing back-slash in the INI file... The paths should be:
C:\My Path\
and not:
C:\My Path
Is there some reason when i do this it makes my WMV files squished? I record in 720x480 5-9MBS VBR mpeg2, and transcode to 1-3mbs VBR WMV7... but then when i cut the commercials the wmv plays back tall vertically and squished from the sides. Any way to adjust ?
Now this was something completely unexpected... My program only works with the .chapters.xml file and does not touch the original WMV. Only 'asfcut' does work with the WMV. You might want to check out the author's site: http://www.radioactivepages.com/index.html
I do not do any transcoding and have not encountered this before. Although I do not understand why transcoding would have this effect...
------------------------------------
I will do my best to run more tests on the program and program in some error checking (for example: if no trailing back-slash is included in the INI file then still include it in the BAT file so it runs)... I'm hoping some other people who DID get it to work post here so that I know it's running at least some of the computers. :)
hades
________
Harley-Davidson FL (http://www.cyclechaos.com/wiki/Harley-Davidson_FL)
Tom Servo
05-21-2004, 09:38 PM
Ok here is how I have it setup this is my INI file:
C:\RecordedShows\CutCommercialProgram
C:\RecordedShows
C:\RecordedShows\cp
If I put a trailing slash then when I click on cut commercials it gives me a run time error. If I don't put the trailing slash then when I click on cutcommercials.exe it will generate a batch file which it is supposed to do.
So I can get it to generate the batch file, but when I try to run it is says it is not a valid win32 application. What setting do I have wrong??
hades
05-22-2004, 12:25 AM
Ok here is how I have it setup this is my INI file:
C:\RecordedShows\CutCommercialProgram
C:\RecordedShows
C:\RecordedShows\cp
If I put a trailing slash then when I click on cut commercials it gives me a run time error. If I don't put the trailing slash then when I click on cutcommercials.exe it will generate a batch file which it is supposed to do.
So I can get it to generate the batch file, but when I try to run it is says it is not a valid win32 application. What setting do I have wrong??
Can you please post the batch file that it creates? Thanx...
hades
________
Yamaha YZ100 (http://www.cyclechaos.com/wiki/Yamaha_YZ100)
Tom Servo
05-22-2004, 10:39 AM
Can you please post the batch file that it creates? Thanx...
hades
Well I'll post it but there is nothing in it.
troy16d
05-23-2004, 07:22 PM
Tom
I may have pinned this one down it seems that when there are WMV files that do not have a cutlist in the same directory that CutCommercials is processing you get the runtime error. and when you remove the trailing back-slash you get the not a valid win32 application because nothing is written to the .bat file.
Try putting the trailing back-slash back on
C:\RecordedShows\CutCommercialProgram\
C:\RecordedShows\
C:\RecordedShows\cp\
and move all other files to a different directory just keep one WMV file with its cutlist in C:\RecordedShows
Let me know if it works or not.
D-be-me
05-23-2004, 08:26 PM
What an increadable value added feature to Beyond TV!!!! Since I archive a few shows on my hard drive, I was DELIGHTED to find this application that allows me to leave behind the days of using Windows Movie Maker to manually edit out commercials at about an hour of work for a 30 minute show.
Who ever you are.....I nominate you for a nobel peace prize! ;) Thank-you very much
c5guy
05-23-2004, 10:32 PM
Great idea.. just what i've been looking for.
Afew questions for ya....
1) Does the progam strip commercials for all format output types? I'm using a .wmv output because it is smaller files size. I do have smart chapters set on and it is creating the commercial breaks (.xml) file.
2) Do I have to make any special setting in Snapstream to make it work?
3) I wonder if Snapstream is going to just include this type of funtionality into thier product. Have you heard anything along these lines? It would seem it would be pretty easy for them to just have a check mark to include commercials or not.
Thanks this looks like something I was looking for to avoid all the manual hasle and time of cutting out commercials
Thx
Tom Servo
05-24-2004, 07:22 PM
Tom
I may have pinned this one down it seems that when there are WMV files that do not have a cutlist in the same directory that CutCommercials is processing you get the runtime error. and when you remove the trailing back-slash you get the not a valid win32 application because nothing is written to the .bat file.
Try putting the trailing back-slash back on
C:\RecordedShows\CutCommercialProgram\
C:\RecordedShows\
C:\RecordedShows\cp\
and move all other files to a different directory just keep one WMV file with its cutlist in C:\RecordedShows
Let me know if it works or not.
YOU DA MAN;) Thank you so much!! It is working now. And thanks Hades for the cool program!
MonsterMaxx
05-24-2004, 09:14 PM
Been watching and I have to agree, this app looks great.
I've got a little further to go understanding & configing before I try it, but have to say "well done"
hades
05-25-2004, 09:20 PM
Heya!
I'm glad you find the program interesting. It solved a slew of problems for me, I like to automate things. I will keep on working on the program to make it run more automatically, try to get rid of the intermediate batch file that it uses right now. It's still the first version. :)
1) It only does WMV. The reason is that 'asfcut.exe', which is not my program, only works with ASF files and WMV files (which are almost the same from what I understand). Anyway, there's an easy way to make it cut out the portions that you do not wish to see and that's why my program uses that. But it seems that you have everything set. All you basically need is a WMV file and the XML chapters file which is automatically generated.
2) The entire procedure would be: BeyondTV records your stuff. You run my program which creates another WMV file with a different file name, in the directory which you specify in the CutCommercials.INI. If you wish, you can specify the original directory, in which case BeyondTV should pick up the new file and treat it as if it created it.
3) Yes, it would be pretty easy for them to do this. Unfortunately I doubt it will happen since television networks do not like this. I am fairly sure it would be illegal as well.
Let me know if it works, and if you have any problems. Thanx,
hades
Hi,
I saw your program that you posted on Snapstream forum to cut commercials. I want to try it and have a few questions ;
1) Does it strip commercials for all format output types? I'm using a .wmv output because it is smaller files size. I do have smart chapters set on and it is creating the commercial breaks (.xml) file.
2) Do I have to make any special setting in Snapstream to make it work?
3) I wonder if Snapstream is going to just include this type of funtionality into thier product. Have you heard anything along these lines? It would seem it would be pretty easy for them to just have a check mark to include commercials or not.
Thanks this looks like something I was looking for to avoid all the manual hasle and time of cutting out commercials
Thx
Dave
________
lolol (http://lolol.net)
MonsterMaxx
05-25-2004, 09:27 PM
One comment I'd make is:
Is there any way to take the mpg (not wmv) and snip and compress it to Divx?
It takes a lot of CPU time to compress the mpg to wmv, you would eliminate this whole step.
If you can figure that you'll be killing two birds with one stone.
It would be a marketable product as far as I'm concerned.
I particularly like the part about taking it from a local, sending it to a network drive and removing the original. If you can compress it and snip the commercials on the way, you'd have have quite the product.
hades
05-25-2004, 09:35 PM
Heya All!
I am currently busy working on stuff I get paid for. But I've been thinking of several new things to add to the program, please let me know if there are others. I will do my best to get all the improvements implemented in the following week, but I will not be able to do a large test since I'm 5000kms from home at the moment and I only brought 3 test files with me. :)
List of improvements that I've been thinking about:
- The program MUST process files only when the WMV and XML files are both available. This should get rid of the majority of the problems that you are seeing. This shouldn't be too difficult.
- I would like to put in an offset number. Let's say there is a commercial at 10minutes and ends at 12minutes. An offset of 5 would make it so that the program would start cutting at 10:05minutes and finish at 11:55minutes. I found that sometimes the chapter files were a few seconds off, this is rare, but should be simple to implement and some of you might like it.
- I would like to automate it so that the BAT file is not created but perhaps the program runs ASFCUT directly. I don't mind the BAT file...
What an increadable value added feature to Beyond TV!!!! Since I archive a few shows on my hard drive, I was DELIGHTED to find this application that allows me to leave behind the days of using Windows Movie Maker to manually edit out commercials at about an hour of work for a 30 minute show.
Who ever you are.....I nominate you for a nobel peace prize! Thank-you very much
Thanx for the positive feedback! It's encouraging and I will keep on tinkering with it to make it more user friendly and to put in error checking... I would also like to thank everyone (especially Tom Servo for finding a serious flaw and troy16d for solving it, indirectly giving me the info necessary to fix it in code).
hades
________
storz & bickel volcano vaporizer (http://vaporizers.net/volcano-vaporizer)
hades
05-25-2004, 09:39 PM
One comment I'd make is:
Is there any way to take the mpg (not wmv) and snip and compress it to Divx?
It takes a lot of CPU time to compress the mpg to wmv, you would eliminate this whole step.
If you can figure that you'll be killing two birds with one stone.
It would be a marketable product as far as I'm concerned.
I particularly like the part about taking it from a local, sending it to a network drive and removing the original. If you can compress it and snip the commercials on the way, you'd have have quite the product.
Once I have finished all I can with cutting WMV files automatically, I will look into doing the same for MPG files, which I also think would be quite useful, for myself included. So far I was able to do cutting the WMV because there was an easy solution to it (using asfcut). I will see if there a solution for MPG files as well, there should be, I just didn't have the time to look into it. I will do this once WMVs are done but I rather not concentrate on too many things at a single time. Thanx for the suggestion,
hades
________
sell vaporizers (http://vaporizeraffiliateprogram.com)
hades
06-09-2004, 09:57 AM
Hello All,
I've updated the program to Version 0.2 now!
The changes include:
- error correction, the program now will work if you leave off the trailing '\' from the paths, it will also skip any files where there is a chapter file missing (or incorrectly named).
- added the ability to automatically delete the source files after processing, just edit the .INI file for instructions
- the program generates the BAT file and then immediately calls it, so it is not necessary to manually do this anymore.
Please let me know if there are any problems!
hades
________
YSR50 (http://www.cyclechaos.com/wiki/Yamaha_YSR50)
Soundman
06-11-2004, 11:00 PM
Hello.
For what it's worth. I wrote a program called CutAds that does the same thing. However, CutAds can also talk to a running BTV web server to copy the program description and other meta data to the cut file created by asfcut. It also launches asfcut directly rather than generating a batch file. It is written in Perl. It is posted in this thread:
http://forums.snapstream.com/vb/showthread.php?t=12421&highlight=cutads
Feel free to port the part that copies program attributes into your CutCommercials program, if you like.
Soundman
hades
06-11-2004, 11:40 PM
Hello..
This program was not really designed to be that complex. Before writing it, I did notice your program, but found that it required Perl and generated errors. After some debugging I found it easier to simply write a program that does only what I want. The intermediate batch file is there for debugging purposes, so that I know exactly what is going on, and so others can also be 100% sure of what the program does.
The way my setup is made, BTV is used only for recording purposes on a dedicated computer. My program moves the recorded files over to a 'Media Server' and in the process cuts the commercials. The attributes can be lost since myHTPC does not recognize those attributes anyway. I see where they might be useful, and then yes, your proggy would better suit the needs, but I was aiming for extreme simplicity.
hades
________
vapor genie vaporizer (http://vaporizers.net/vapor-genie)
Soundman
06-11-2004, 11:53 PM
Hades,
That is very good. I am all for simplicity.
Since I use BTV for playback, I need its meta-data, however.
Soundman
Blarney
06-14-2004, 12:22 PM
Since I use BTV for playback, I need its meta-data, however.
huh? What do you mean by meta-data for BTV playback?
Anyway, I have been playing around with this today it seems to work EXTREMELY well and fast! Great job!
I am curious though how some commercials slip through BTV's filters and others don't. Most of the files I used CutCommercials on were reduced about 25% on size. Due to it removing most commercials!
Soundman
06-16-2004, 10:46 PM
By "meta-data" I mean episode descriptions, original air dates, etc.
TroyGates
06-17-2004, 09:15 AM
Is there some reason when i do this it makes my WMV files squished? I record in 720x480 5-9MBS VBR mpeg2, and transcode to 1-3mbs VBR WMV7... but then when i cut the commercials the wmv plays back tall vertically and squished from the sides. Any way to adjust ?
I get this same problem also. Something with the way asfcut edits the file, it changes the video dimensions.
MonsterMaxx
06-17-2004, 10:42 AM
All I want is a program which will
Monitor a directory
Run on any machine (does not need BTV) at the lowest priority
Accept the raw BTV recording (mpg) and commercial/chapter info
Chop out the commercials
Encode it into Divx or XviD per saved and user defineable settings
Save it to another directory
Delete the original
Why do I want these things?
1. My PVR is fairly fast, but really struggles converting mpg to wmv
2. My PVR is in the living room, it's got all kinds of anti-noise stuff, but peg it out for hours and it's running all the fans at high speed - making a lot of noise & heat. It gets the jitters when I'm using it for playback and it's doing compression at the same time.
3. My PVR has 40gb of free space, this gets filled in 2 days and it's out of space. My server (where this stuff gets stored) has 1.75TB! It's has not run out of space - yet. Recording straight to the server just does not work (others have reported the same issues.)
4. My file server is a dual Xeon. It's in another room. It'll run 24/7 at max load w/ no problem.
I would be more than happy to pay for such a program.
slhmtb
06-30-2004, 10:35 PM
Great little program, thanks! I'm going to use it on compressed versions of the Tour De France each morning and post them to another server of mine so I can download them at work. I've got another program that I have written that will watch a folder and when a compressed video appears it will run the batch file. Thanks again.
T-Man
07-17-2004, 06:09 AM
For some reason I just can't get this thing to work, I keep getting the it's not a win 32 application.
I edited the .ini file to location of the app and folders etc. remove the trailing /, ran it from a command prompt etc.... but it will not run.
Here is the contents of the .ini
h:\apps\
h:\apps\uncut\
h:\apps\cut\
DELETE
Any help on this?
hades
07-17-2004, 09:13 AM
Hello...
You do have the 'latest' version and not still the one that was posted months ago (just checking). If you do have that version then can you just check a few things for me:
- The directories do exist
- The directories are not enclosed in quotations
- If you are at a command shell, then make sure you are in the same directory as the program (h:\apps\). If you are running it through a batch file, change to that directory first. If you are running it as a scheduled event, then make sure the working directory is h:\apps\.
- Are the filenames you are trying to process if the format (for example):
America's Funniest Videos_2004-07-16-0.wmv (as generated by BeyondTV)
The program does assume that the filename does have the date at the end and inserts the CUT into the filename 13 spaces from the end, so if you renamed the files to be 7, then there is not enough filename characters and the program will fail.
Try these... There are no other sources of possible errors in the program (I think). Let me know...
hades
________
ipad games (http://macgame.org)
T-Man
07-18-2004, 03:50 PM
Yes to all, the directories exist, I copied the file from the BTV and put them in the h:\apps\uncut folder.
I did get the latest version.
When I run the CutCommercials.exe, I do get the CutCommercials.bat file, but thats where it ends. If I run the CutCommercials.bat thats when I get the win32 error.
hades
07-19-2004, 08:33 AM
Ah, ok... Can you please post the contents (or at least the first 4-5 lines) of the batch file? Thanx...
hades
________
BMW R1100GS (http://www.cyclechaos.com/wiki/BMW_R1100GS)
T-Man
07-19-2004, 09:18 AM
There is nothing in the batch file.
hades
07-20-2004, 07:50 PM
I wonder why I didn't get notified that you answered to this post... Weird.
If the batch file is empty, then it could only mean that there were no suitable files found. You say that you copied *the file* from BTV to the uncut directory, did you by any chance only copy the WMV file? Are you generating the SmartSkip file? Please check... Goto:
Configure -> Recording Preferences -> SmartSkip -> set it to anything BUT disabled.
Once you record the show, the computer should start processing it. It should output an AudioStats.xml and VideoStats.xml file after which it will output another XML file which is similar to the WMV file.
Original recording file: Recording-Name-2004-07-20-0.wmv
Chapter file: Recording-Name-2004-07-20-0.wmv.Chapters.xml
You need to copy BOTH those files over into the uncut directory. You MUST have the chapters.xml file there in order for something useful to be generated into the batch file.
--------------
In case anyone is curious, the reason why it generates an intermediate batch file is so that, while there are still bugs in the system, we can troubleshoot the problem easier because we know what the command-line is.
hades
________
TTR50 (http://www.cyclechaos.com/wiki/Yamaha_TTR50)
xanderf
07-21-2004, 01:44 AM
Do you need to define which files to 'cut', or does it do every valid file in the 'source' directory it finds? If so, how do you define the file to cut? As a command-line parameter passed to the program?
hades
07-21-2004, 07:33 AM
It does cut all of the valid (pair of WMV and XML) files in the folder. The idea is that uncut and cut files are stored in a different folder (by specifying different folders in the INI) or by deleting the original files (also specified in the INI).
Do you have a need to cut only specific files? One workaround I could suggest is to temporarily move the files to a specific folder.
hades
________
herbalaire review (http://herbalairevaporizer.com)
xanderf
07-21-2004, 11:43 AM
No, actually, that works exactly as I'd need it to.
One more question - I've been recording for a number of weeks without using the smart skip feature, so *most* of the files I have in the recordings folder do not have a paired XML file. Of course, the program won't work on those.
My only concern is - if I set up your program to delete the source of the files it cuts - will it *try* to work on those files WITHOUT smart skip info, and end up deleting the source without generating any useful output? Or, if there isn't a paired .wmv + .xml combo, it'll just leave it alone altogether?
hades
07-21-2004, 11:48 AM
The program should not care about any other files in your directory other than paired WMV & XML files.
Until you convince yourself, I would suggest that you include a destination directory and not have the program remove the files, that way you have the originals (it should only move the files that it works on, the others should stay in the directory). Or make a copy of some test files and run the program on those. It should work. The code is specifically set up to check both the WMV and XML, if both exists then it processes. If both are not there then it will ignore it, it will not move it, it will not delete it, it should not even know that they are there.
Also, if you would like to process your other recordings using SmartSkip (so you can cut it later), you can do that by moving the files back into the original BTV recording folder and going into BTVs web-admin, goto 'ShowSqueeze', right click on one of the files and click on 'Generate SmartSkip'. It will do it and you'll have a matching XML file. Then cut the commercials just like if it was a new recording.
Let me know if you have any more questions.
hades
________
Yamaha DT100 (http://www.cyclechaos.com/wiki/Yamaha_DT100)
T-Man
07-21-2004, 05:15 PM
Sorry for the delay in answering you, yes I copied both files to my local system, the uncut directory, and smart skip is set for immediately.
T-Man
07-21-2004, 05:17 PM
Also I checked to ensure I got the .2 you created....
xanderf
07-23-2004, 10:56 PM
Also, if you would like to process your other recordings using SmartSkip (so you can cut it later), you can do that by moving the files back into the original BTV recording folder and going into BTVs web-admin, goto 'ShowSqueeze', right click on one of the files and click on 'Generate SmartSkip'. It will do it and you'll have a matching XML file. Then cut the commercials just like if it was a new recording.
That's pretty cool, and what I've done for some testing.
Only 1 problem - about 95% of the resulting 'cut' file comes out alright (no commercials!), but periodically, the sound and video just SLOWS DOWN - you know, everyone moving in slow motion, and the voices are suddenly really deep, then deeper and deeper and almost seem to cut out. Then, it just picks up again like nothing happened. Can't find any pattern for why or where it does this - always in the same spots in each recording (tested a couple a few times), but no reason for it.
For example, the batch files goes:
"C:\Program Files\SnapStream Media\Commercial Cut\asfcut" -i "E:\TV-Uncut\Star Trek Deep Space Nine-(... Nor the Battle to the Str)-2004-07-22-0.wmv" -o "E:\TV\Star Trek Deep Space Nine-(... Nor the Battle to the Str)_CUT_2004-07-22-0.wmv" -start 00:00:00.00 -stop 00:05:21.88 -start 00:08:49.32 -stop 00:15:04.56 -start 00:19:07.57 -stop 00:29:37.73 -start 00:33:00.06 -stop 00:37:15.62 -start 00:40:33.08 -stop 00:51:26.13 -start 00:53:58.80
echo y | Move "E:\TV-Uncut\Star Trek Deep Space Nine-(... Nor the Battle to the Str)-2004-07-22-0.wmv.chapters.xml" "E:\TV-Cut\"
echo y | move "E:\TV-Uncut\Star Trek Deep Space Nine-(... Nor the Battle to the Str)-2004-07-22-0.wmv" "E:\TV-Cut\"
And the slowdown seems to happen at the 28:40 mark each time. What's going on with that?
What WMV settings do you guys use for recording that does not have problems cutting?
hades
07-23-2004, 11:33 PM
T-Man -> I have no clue what is going on... Can you please let me know what the contents of the 'uncut' directory are? Can you goto the command/DOS prompt, goto the uncut directory and type:
dir > uncutdir.txt
open up the uncutdir.txt that was created in the uncut directory and paste the contents here... I would like to eliminate one possible source of error.
Thanx!
hades
________
honey oil (http://trichomes.org/hashish/honey-oil)
hades
07-23-2004, 11:45 PM
Only 1 problem - about 95% of the resulting 'cut' file comes out alright (no commercials!), but periodically, the sound and video just SLOWS DOWN - you know, everyone moving in slow motion, and the voices are suddenly really deep, then deeper and deeper and almost seem to cut out. Then, it just picks up again like nothing happened. Can't find any pattern for why or where it does this - always in the same spots in each recording (tested a couple a few times), but no reason for it.
Does this slowdown happen in the uncut version as well?
If it does then it could be that you are using VBR and at that point the bitrate goes to such a high number that your computer cannot handle it. I'm just guessing...
My proggy does not touch the contents of the WMV, just the XML file. ASFCut is the one that modifies the files, you might want to check out the support site for that...
And the slowdown seems to happen at the 28:40 mark each time. What's going on with that?
What WMV settings do you guys use for recording that does not have problems cutting?
I do my recordings in MPG and encode into WMV. My WMV settings are:
Windows Media Audio 9
64kbps, 48khz stereo CBR
Windows Media Video V8
30fps
400*300 (half the resolution of my projector)
1136000 bitrate for video
two-pass encoding disabled
quality scale 50
encoding window 5000ms
keyframe interval 4
Deinterlace Enabled
Inverse Telecine Disabled
Hope that helps... Try these settings, don't know how successful it'll be. Let us know!
hades
________
Suzuki TL1000S (http://www.cyclechaos.com/wiki/Suzuki_TL1000S)
xanderf
07-24-2004, 12:21 AM
Does this slowdown happen in the uncut version as well?
If it does then it could be that you are using VBR and at that point the bitrate goes to such a high number that your computer cannot handle it. I'm just guessing...
My proggy does not touch the contents of the WMV, just the XML file. ASFCut is the one that modifies the files, you might want to check out the support site for that...
No, it doesn't happen in the uncut version, just the 'cut' version. My guess was that the problem was the asfcut utility removing some keyframes or something that caused it to go out of sync. I see what your program is doing, and it's fairly obvious the problem is with asfcut, I was just wondering if you had seen anything like this before and solved it.
Your settings don't look too different from mine - except I'm using Windows Media Video V7, as V9 is WAY too slow on my computer. Never tried V8 - how does that compare quality/speed wise vs V7 and V9?
hades
07-24-2004, 08:20 AM
No, it doesn't happen in the uncut version, just the 'cut' version. My guess was that the problem was the asfcut utility removing some keyframes or something that caused it to go out of sync. I see what your program is doing, and it's fairly obvious the problem is with asfcut, I was just wondering if you had seen anything like this before and solved it.
A few other people have also been having the same problem, if you read some of the posts on page one of this thread. I don't see why it would happen, unless ASFCut did remove some important information (keyframes are the most likely source). Try decreasing your keyframe interval a bit, the more frequently keyframes occur, the less the slowdown is, at least according to my thinking. :)
Your settings don't look too different from mine - except I'm using Windows Media Video V7, as V9 is WAY too slow on my computer. Never tried V8 - how does that compare quality/speed wise vs V7 and V9?
I believe I gave up on V9 because of speed problems and I figured V8 is better than V7 simply because it's a newer version? I don't know. I'm getting very good results so I never really experimented with it. Actually, I think part of the reason was that I was reencoding from MPG and the speed of the reencode was faster than V7. I've never seen the problem you are describing and I've been auto-cutting all my recordings for the past 2 months or so... Give it a shot, if you still have the troublesome recording, re-encode it into V8 and try to cut that file, I realize you're loosing quality, but this is only a test...
hades
________
mexico hotels (http://mexicohoteles.org)
T-Man
07-24-2004, 08:33 PM
Here is the text file
hades
07-24-2004, 09:40 PM
Here is the text file
That cleared up some of the confusion. :) You are trying to cut an MPG file, the program only cuts WMV files at this point. I am in the process of finding a utility that will cut MPEG2 files. To solve this, you can either try to re-encode using ShowSqueeze or record directly into WMV format...
hades
________
TV Forum (http://www.tv-gossip.com/)
T-Man
07-25-2004, 03:50 PM
Well I'll be, that works like a champ http://forums.snapstream.com/public_html/ubb/smile.gifhttp://forums.snapstream.com/public_html/ubb/smile.gif - Thanks dude. I can't remember if anybody said that it only works for .wmv file or not or I am the only one that records in the highest format. But what ever, it works like a champ and it is fast too.
hades
07-25-2004, 08:34 PM
:) I'm glad it works now! I also record on a fairly high setting, but then it is compressed down to a smaller WMV, but I prefer to have the source as good a setting as reasonable.
hades
________
vaporizers (http://vaporizer.org/reviews)
AncientPC
07-26-2004, 08:58 PM
I got it to work, but now the big question is there any way you could keep the metadata (like when it was first aired, recording description, etc.) within the cut file?
I'm guessing you can't since it's asfcut.exe that's removing the metadata. :(
Soundman
07-26-2004, 10:04 PM
AncientPC, I have a perl script called cutads2.pl that will copy metadata from one show to another by communicating with BTV's web server. Just search the forums for cutads2.pl to find it. It can also run asfcut.exe to cut the smartchapters from the command line if you don't need to edit them first. It works with BTV 3.4.x only. It will have to be rewritten for BTV 3.5, and I am working on that.
hades
07-26-2004, 11:35 PM
AncientPC, feel free to check out his program. For me, and I'm assuming a lot of other people, playback of WMV files takes place outside of BeyondTV. I play them back on a completely different computer in ZoomPlayer using the myHTPC interface, so I do not care about the metadata. Glad my proggy works though!
hades
________
iphone jailbroken (http://jailbroken.org)
xanderf
07-27-2004, 07:10 PM
BTW, success with my problem!
All I had to do was increase the internal bucket size on ASFCut. IE., change the batch file to add the command '-bw 15000' to the end, and it compresses the files just fine now!
I also found that adding the command '-rmgaps' to the file (removes extra-long durations between frames) seems to make the resulting file a little smaller, with no quality or performance problems.
Errrr....is there any way your utility could be changed to make adding these command line parameters an option when it makes the batch file?
hades
07-27-2004, 08:25 PM
xanderf... I'm glad it finally works for you! In celebration of this, I've made the changes you requested. Please have a look on the main page for the 'new' version.
I believe I've skipped version 0.3, in that 'version' I believe I only made some small changes relating to the focus of the window that asfcut uses, it should be minimized by default. Version 0.4 has the parameter option that you requested.
It was fairly easy to make the changes. :) Please let me know if there are any problems (there shouldn't be).
hades
________
Kawasaki GA (http://www.cyclechaos.com/wiki/Kawasaki_GA)
is there anyway to make this work with AVI and MPG?
hades
07-28-2004, 11:40 AM
It currently does not work with AVI or MPG. I am looking into it without much success. If someone can find a command-line driven utility to cut (and possibly join) AVIs and MPEG2 files, that would be great. Since so far I have only found such a command-line driven util to work with WMV, I was only able to implement that into my program.
hades
________
hotels in mexico (http://mexicohoteles.org)
TrialUser
07-28-2004, 03:00 PM
For those that have tested this program, can you please tell me how accurate the SmartSkip is? Will there be any commercials left undetected/undeleted and/or any movie mistakenly cut?
hades
07-28-2004, 09:15 PM
The movie is usually not cut out, I mean about 98% of the time. In cases where it is, it is 1 or 2 seconds. Once in a while, about 25% of the time, there are commercials (or a single commercial) left in... That's sort of my experience of about a month of using it.
hades
Cross673
08-02-2004, 12:05 AM
Your program sounds great... I just can't wait until it supports MPGs.
presto
08-02-2004, 12:28 PM
I am impressed with the accuracy. Still it is a little scary because you can't ever really know if any of the show was cut out.
It would be nice if the portions cut were stitched togethor and copied into a folder so that you could scan throught that one file quickly and make sure there aren't any scenes from your show. I have womble mpg vcr and it would allow me to scan through a file like that very quickly and easily.
Soundman
08-02-2004, 11:17 PM
I am impressed with the accuracy. Still it is a little scary because you can't ever really know if any of the show was cut out.
It would be nice if the portions cut were stitched togethor and copied into a folder so that you could scan throught that one file quickly and make sure there aren't any scenes from your show. I have womble mpg vcr and it would allow me to scan through a file like that very quickly and easily.
presto,
that is a very good idea. I never thought of it. I think it would not be very hard to make it do that. I am focusing on getting show descriptions and other attributes to be preserved with 3.5 right now, though, and free time is very scarce.
vextor
11-07-2004, 04:15 PM
SWEET!!!
this will perfect my HTPC
any progress on the "getting show descriptions and other attributes to be preserved with 3.5" feature?
i use 3.5 and meedio (new myHTPC)
btw meedio now has a BTV importer that takes BTV attributes ( first aired, overview, genre) and shows you what each show is about.
also new to meedio is the ability to report BTV status.
almost perfect integration W.A.F. is almost off the scale ;-)
thx
Vex
vextor
11-28-2004, 08:12 AM
yo hades Deuce911 made an app that can use 3.5 and save the show information
check it out
http://forums.snapstream.com/vb/showthread.php?t=20445
hades
11-28-2004, 11:06 AM
I've been thinking about how to do this. The problem with this is that, for example on my setup, the recording and the playing are done on different computers. This means that I must move the descriptions over somehow to another machine. Give me a bit of time...
hades
vextor
11-28-2004, 12:09 PM
yeah man no problem,
im not trying to bug / rush you
it was more FYI
so when you do start to work on it you have leads or a short cut
Vex
reedmikel
12-22-2004, 09:46 PM
Can your utility be used on MPG files created by Beyond TV?
Why are you using WMV format - to stream to a PC? Or is it a more compact file format than MPG?
Thanks!
hades
12-23-2004, 06:05 PM
No, sorry, the util does not work with MPG files at the moment. I've tried to do it in the past without much success, I cannot find a util to cut/append MPG files like it's possible to do with WMV files.
Using WMV files, the filesize is a lot smaller, saving diskspace and it is 'cuttable' using the ASF utility, for certain purposes I would prefer to work with MPG files, but I am unable to figure out how to 'cut' it at predefined locations.
hades
med267
01-05-2005, 03:39 AM
hades,
I am wondering .... when I run the batch file asfcut runs & it looks like it sees the xml & starts copying & stitching the sections together & then suddenly the command prompt screen disappears quickly & I can't see the end result of asfcut.
The reason I ask is because I end up with a 0kb CUT file. I am using Windows Media Player 10 ( Maybe that is the problem) & (Windows Media Encoder 9)
I am wondering if you might have a suggestion to help me get it working.
I would appreciate any advice.
med267
01-05-2005, 03:54 AM
solved. I just created a separate folder for my cut files & it works as advertised (except for asfcut bug that leaves video thin & taller than normal.)
Thanks for the great utility.
hades
01-05-2005, 08:46 AM
Hello med267,
I am glad it works! :) I've encountered the thin video once and I think it was a problem with the way the thing was encoded resolution-wise. Try changing the resolution of the encoding and see if that fixes it...
hades
hades
01-05-2005, 09:02 AM
Hello Everyone!
There have been a few requests to get this util to work with AVI and MPG files. I would like to do this, but have not found a way to split MPEG2 files using a command-line software. ASFCUT does a wonderful job of cutting WMV files, but I am missing such programs for MPEG2 and AVIs...
If someone could find such a utility, then please do let me know and I will add that functionality to CutCommercial.
I've found a program, shareware but supports command-line, to cut AVI files.
http://members.cox.net/accusplit_support/
If someone would like to help me out by testing this program (through the command-line) on various BeyondTV generated AVI files, I would appreciate that. I do not encode to AVI so I have no files to test.
And please do let me know if you find an MPEG2 splitter! Thanx,
hades
kvaden
01-05-2005, 11:19 AM
I haven't tried it, but there's a program called mpgtx that might work for mpegs.
http://mpgtx.sourceforge.net/
not_Shorty
01-05-2005, 04:52 PM
I don't think it's got anything to do with cutting them, does the pre-cut version playback with the proper aspect ratio? I think it's got to do with using 720x480 instead of 640x480. I don't think you can dictate the shape of your pixels with WMV, but you can with mpeg. So, the mpeg files are dictating the proper pixel shape/size so that 720x480 appears in a 4:3 (1.33:1) aspect ratio. But with WMV the pixels are always 1:1, which means that your aspect ratio is determined by your resolution. 720x480 means an aspect ratio of 1.5:3 which is quite a ways off from 1.33:1. Try forcing a 4:3 aspect ratio during playback instead of using the default 'auto' and see if your picture looks correct at that point. If you want to avoid this altogether, just use 640x480 instead of 720x480.
Is there some reason when i do this it makes my WMV files squished? I record in 720x480 5-9MBS VBR mpeg2, and transcode to 1-3mbs VBR WMV7... but then when i cut the commercials the wmv plays back tall vertically and squished from the sides. Any way to adjust ?
med267
01-07-2005, 12:08 AM
hades,
Yes, that got rid of the thin tall video (experimenting with different recording resolutions)
Thank you for that tip.
med267
01-08-2005, 05:52 AM
Does anyone know if it is possible to generate the xml file for recordings made when I didn't have smartskip turned on ?
not_Shorty
01-08-2005, 05:35 PM
http://www.thinkgeek.com/tshirts/frustrations/3239/
http://www.thinkgeek.com/cubegoodies/mugs/299a/
Does anyone know if it is possible to generate the xml file for recordings made when I didn't have smartskip turned on ?
med267
01-08-2005, 11:01 PM
http://www.thinkgeek.com/tshirts/frustrations/3239/
http://www.thinkgeek.com/cubegoodies/mugs/299a/
In your deluded geekiness... to think there is a usable help file or manual for btv. f.u.bar w/ way too much time on their hands. :thumbsup:
not_Shorty
01-09-2005, 04:53 AM
Whatever you say. I found the information just fine. Since you're so lazy, just load up a show in the WebUI and hit the Options button. Lazy. :P
btvbuddy
01-11-2005, 11:49 AM
Commercial Break - this thread was about cutting out commercials right?
Anyways I dug up a old link on ASF/WMV editing - I hope it helps somebody.
http://www.geocities.com/myasftools/
Now back to our regular programming :-)
IGx89
01-11-2005, 12:06 PM
There's also my IGCutter (http://forums.snapstream.com/vb/showthread.php?t=14758), but I doubt Hades wants "competitors" to be listed in his thread ;).
Hades, that mpgtx program kvaden mentioned above actually is a good alternative to Asfcut, supporting all the necessary commandline parameters, but unfortunately it seems to be buggy with most MPEG-2 files I've recorded on my PVR-250 and wasn't updated for a long time, except for a recent minor bugfix release (just the linux source code). I'm going to try contacting the author and see if he can make a Windows version that works on BTV MPEG-2 files, but until then there's still no decent commandline MPEG-2 cutting program :(.
Rachus
03-06-2005, 06:39 PM
hades,
I'm planning on trying your proggy tonight. I just googled a search for keywords:
snapstream smartskip "zoom player" cut
...as I too am a devoted ZoomPlayer Pro WMV customer :).
The goal of my search was to find any trace of one of you wonderful programmers borrowing the .xml SS generates and translating that into a .CUT file for ZP to automatically skip/ (as opposed to cut/recode/press another file)?
Whew, long question sry....
Have you yourself considered this?
Or seen someone else doing this?
(note I plan to read this post in it's entirety in a few....) BTW thanks for your skill on your proggy.
Rachus
03-14-2005, 07:17 PM
bump plz
hades
04-22-2005, 06:05 PM
Could you post a sample of the .CUT file you are looking at? I might be able to do that...
hades
Rachus
04-24-2005, 12:49 AM
The filename is something like "Series Title-(Episode Title)-2005-04-23-0.cut"
...and the contents of the file:
// Zoom Player v4.03 Scene Cut file.
//
CutSegment("Start=433.0502","End=469.0101")
CutSegment("Start=1251.0391","End=1389.0226")
CutSegment("Start=1876.0179","End=1941.0829")
HomeyFour
04-24-2005, 01:16 PM
For those of you who record to MPEG-2, try this thread http://forums.snapstream.com/vb/showthread.php?t=23017&highlight=commercial+cut
I use it and it works GREAT!
not_Shorty
04-24-2005, 01:20 PM
never worked properly here
gsboriqua
04-24-2005, 02:32 PM
I have the problem where the video would go into slow motion, but the audio continues fine and it becomes out of sync.....Sucks because I let it delete the originals. I should have tested it first!!! But hey it did cut the comercials
not_Shorty
04-24-2005, 02:38 PM
I've just been using mpeg-vcr to do my editing, it's manual, but it works.
Shurato
04-24-2005, 06:54 PM
I purchased MPEG-VCR also because I found the "smart" chapters are not really very smart.
It has parts of my recorded shows that it thinks are "commericals" and parts of commericals that it thinks are part of the "show"!
Yes MPEG-VCR is manual but it works every time.
I clean up the shows I want to save, then I use BTV2DVD to archive multi episode shows to one DVD.
Shurato
gsboriqua
04-25-2005, 09:57 AM
Switching to WM 8 encoder fixed my problems (I was running WM 7, I guess thats default). Everything appears to be working fine now. :toast:
freak7782
04-26-2005, 02:44 AM
I had a similar issue with the sound going into "slow-mo". The fix was to add "-bw 5000000" as a parameter to asfcut. Once I did that--after figuring out how big the number needed to be--it worked great.
Your original posts mentions the source code. But it doesn't appear in the later versions. Do you have that somewhere? I'd love to look "under the hood" as it were...
freak7782
04-26-2005, 02:46 PM
I'm seeing the "squishing" effect someone mentioned earlier where, after editing a file with asfcut, it appears tall/thin instead of square. The original wmv plays correctly, and the original and the new cut file report the same dimensions. But the appearance is drastically different.
BTV will play it correctly if I change the aspect ratio from auto to 4:3. However, I was wondering if anyone else had seen this behavior and figured out why it happens or how to fix it. I also went ahead and submitted it as a bug for asfcut's site...
Edit:
Rad replied and said:I have made recently an investigation on Pixel Aspect Ratio and I am almost sure that the information on pixel aspect ratio that can be stored for each video sample isn't copied properly. It is possible that extension systems aren't copied, but... it doesn't matter anymore, because I have no control over MS stuff. Asfbin is the replacement for asfcut and it will do it porperly. Stay tuned, because asfcut will be released soon.
crush157
04-28-2005, 03:38 PM
Hmmm, I wonder if the asfbin program with the Aspect Ratio control fix will make my MediaMVP transcoder play the file correctly? I have been showsqueezing into 352x480 (1/2 D1) and then using the cut script with asfcut to fix the header and remove commercials.
not_Shorty
04-28-2005, 04:23 PM
I hex-edited some wmv files to add aspect ratio tags and they played back correctly afterwards, at least in PC players. Got a link for that asfbin you're talking about?
freak7782
04-28-2005, 11:17 PM
It's not released yet, but the site is http://www.radioactivepages.com
Can you post an example of what you added to the files? It'd be cool if I could just paste something into the files to fix this...
cjob68
05-01-2005, 09:20 PM
Hi,
I wanted to test this program out so I copied it along with 1 wmv file ( and chapter file ) to a directory on my c drive ( all my programs are on the d drive ) . I ran the program on the c drive and now all the wmv programs on the d drive are gone !!!!! Is there a way I can get them back ????
Update
******
I checked using a few undelete programs and because there were so many programs and they were very large it overwrote most of them. Thus I lost all my wmv programs. I think in error I must have clicked on the bat file that exists on the "d" drive but it still doesn't explain why it didn't create new commercial-less files and delete the old copies ? Instead it deleted all of the wmv files.
Help !!!!
Thanks
Jason
crush157
05-02-2005, 12:08 PM
Hmm, I have been battling an issue similar to this on my samba drives while running the program. I believe asfcut has some issues in the way it handles writing to a file that may not be completely cool in windows and/or samba file systems. I have not experienced the issue of files being deleted on the target drive when it is local to the machine. I have experienced having my fileservers disks get theri MBR/Partition table deleted on the linux box after experiencing a write to the samba drive (I have recovered my video files on 3 occasions now). I now do not use the samba drives as a target, it's always a directory on a local drive that is not my C drive.
skipinator@yaho
05-11-2005, 10:36 PM
I ran into a problem. Asfcut only cut the first segment of my program.
Here's my xml file:
- <cutlist>
- <Region>
<start comment="00:08:58.1991886">5381991886</start>
<end comment="00:11:00.8216878">6608216878</end>
</Region>
- <Region>
<start comment="00:14:03">8430000000</start>
<end comment="00:16:04.3200000">9643200000</end>
</Region>
- <Region>
<start comment="00:25:15.5088554">15155088554</start>
<end comment="00:27:36.9167880">16569167880</end>
</Region>
</cutlist>
Here's my bat file:
"C:\Documents and Settings\Owner\Desktop\commercials\asfcut" -i "C:\Documents and Settings\All Users\Documents\SnapStream\Beyond TV\shows\The Drew Carey Show-(Love, Sri Lankan Style)-2005-05-11-0.wmv" -o "C:\Documents and Settings\All Users\Documents\SnapStream\Beyond TV\shows\The Drew Carey Show-(Love, Sri Lankan Style)_CUT_2005-05-11-0.wmv" -start 00:00:00.00 -stop 00:08:58.19 -start 00:11:00.82 -stop 00:14:03">8 -start 00:16:04.32 -stop 00:25:15.50 -start 00:27:36.91 -y
echo y | Move "C:\Documents and Settings\All Users\Documents\SnapStream\Beyond TV\shows\The Drew Carey Show-(Love, Sri Lankan Style)-2005-05-11-0.wmv.chapters.xml" "C:\Documents and Settings\Owner\Desktop\temp\"
echo y | move "C:\Documents and Settings\All Users\Documents\SnapStream\Beyond TV\shows\The Drew Carey Show-(Love, Sri Lankan Style)-2005-05-11-0.wmv" "C:\Documents and Settings\Owner\Desktop\temp\"
Any ideas?
Skip
freak7782
05-11-2005, 10:42 PM
"C:\Documents and Settings\Owner\Desktop\commercials\asfcut" -i "C:\Documents and Settings\All Users\Documents\SnapStream\Beyond TV\shows\The Drew Carey Show-(Love, Sri Lankan Style)-2005-05-11-0.wmv" -o "C:\Documents and Settings\All Users\Documents\SnapStream\Beyond TV\shows\The Drew Carey Show-(Love, Sri Lankan Style)_CUT_2005-05-11-0.wmv" -start 00:00:00.00 -stop 00:08:58.19 -start 00:11:00.82 -stop 00:14:03">8 -start 00:16:04.32 -stop 00:25:15.50 -start 00:27:36.91 -y
See it?
skipinator@yaho
05-12-2005, 04:57 AM
I saw that, and I took it out, and it still only processed the first segment. I wonder why it put it in there in the first place.
skipinator@yaho
05-12-2005, 05:00 AM
Ok, I just ran the bat again without the ">8, and it encoded all segments. Why did the program put it in there to begin with?
Anyone?
Skip
hades
05-12-2005, 04:35 PM
Hello...
- <Region>
<start comment="00:14:03">8430000000</start>
<end comment="00:16:04.3200000">9643200000</end>
</Region>
The program put that in, because for some reason your smartchapter XML file was not as accurate as usual... I do not know why that would have happened, perhaps the commercial was detected at EXACTLY 00:14:03.00000. In any case, I've adjusted the program to not be so accurate. It now ignores any hundredth-second entries. Should work, please try it (please see original post for updated EXE)...
hades
skipinator@yaho
05-13-2005, 02:53 PM
Thank you very much, it works great! You da man.
hec1152
05-17-2005, 06:50 PM
Hi,
I've just tried the program and have the following sequence of results. Note error messages from ASFCUT, I guess. I scanned this forum to see if other reports similar but did not notice any at first glance. Sorry if this is a report of something I should know how to correct. Any advice as to what I'm doing wrong?
Thanks,
C:\Test>"c:\test\asfcut" -i "c:\test\pvs\Revelations (56)-2005-05-11-0.wmv" -o "
c:\test\pvs2\Revelations (56)_CUT_2005-05-11-0.wmv" -start 00:00:00 -stop 00:04:
17 -start 00:06:42 -stop 00:17:00 -start 00:20:41 -stop 00:27:27 -start 00:31:01
-stop 00:41:57 -start 00:45:59 -stop 00:55:04 -start 00:58:44 -y
ASFCUT - version 3.92.09. Copyright 2001-2003 by RadioActive.
Visit www.radioactivepages.com (http://www.radioactivepages.com) for help and updates.
Input file list:
File no. 01: c:\test\pvs\Revelations (56)-2005-05-11-0.wmv exists and is read
able,
Segments list:
Segment no. 01: start = 00:00:00.000, duration = 00:04:17.000,
Segment no. 02: start = 00:06:42.000, duration = 00:10:18.000,
Segment no. 03: start = 00:20:41.000, duration = 00:06:46.000,
Segment no. 04: start = 00:31:01.000, duration = 00:10:56.000,
Segment no. 05: start = 00:45:59.000, duration = 00:09:05.000,
Segment no. 06: start = 00:58:44.000, duration = to the end,
...opening input file c:\test\pvs\Revelations (56)-2005-05-11-0.wmv. Done.
...preparing to read file c:\test\pvs\Revelations (56)-2005-05-11-0.wmv. Done.
...preparing to write
ERROR: Could not set output file c:\test\pvs2\Revelations (56)_CUT_2005-05-11-0.
wmv on IWMWriter (hr=0x80070020).
ERROR: Could not prepare output file for writing (hr=0x80070020).
ERROR:
Copying process has failed. Exiting.
C:\Test>echo y | Move "c:\test\pvs\Revelations (56)-2005-05-11-0.wmv.chapters.
xml" "c:\test\processed\"
C:\Test>echo y | move "c:\test\pvs\Revelations (56)-2005-05-11-0.wmv" "c:\test
\processed\"
C:\Test>
hades
05-17-2005, 07:13 PM
Hello,
My only guess is that it does not like the parantheses... Do you get them on other recordings as well?
hades
hec1152
05-19-2005, 06:16 PM
It behaves same way with other files that don't have (. Still trying to find a file that will work with the error message. What does the error message "....IWMWriter (hr=0x80070020)..." mean? What's IWMWriter?
IGx89
05-19-2005, 09:36 PM
Install this, then try again; it might help: http://www.dptop.com/app/wmfdist9.exe
hades
06-02-2005, 10:33 PM
So I guess it worked. :) I'm happy the program seems to be working for everyone. Can't believe that it's been a year since I wrote the original. :)
hades
jheere
07-04-2005, 10:03 PM
I am still very new here so I apologize in advance if I am posting this in the wrong place. I am very interested in a program to skip/cut commercials.
After spending some time on this forum I have downloaded 2 files:
asfbin1.0.2.374.zip and
CutCommercial Program 0[1].5.zip
If I understand correctly the asfbin program supersedes another one that was called ascut.
Does anyone have any comments of comparison between the 2 programs.?
I am running a dedicated system using the Windows Media Center2005 , on a
P4 3GHz system with 2 Hauppage 150 capture cards.
not_Shorty
07-04-2005, 11:09 PM
won't do you any good without data indicating where the cuts are supposed to be. This is one of the main selling points of BTV, SmartChapters.
hades
07-04-2005, 11:27 PM
BeyondTV, if set to do so, generates SmartChapters information. It is basically an XML file which identifies the location of (or best guess of) commercials. At its simplest, it is a list:
0:05:00 - 0:07:00
0:15:00 - 0:16:30
etc
What my program does is, using asfcut, chops out those blocks. WMC2005 does not generate a file such as this, so it will not work. At the moment, I do not know of a dedicated 'chapter detector'. BTV does this wonderfully, my program simply takes it to the last step and actually does the cuts, without the detector, my program is useless...
hades
adx442
07-14-2005, 09:02 PM
(Edit: posted some ideas that didn't really pan out after I tried them).
What about scripting VDubMod? It has command-line features that will let you run a script from the commandline, and it's freeware.
not_Shorty
07-15-2005, 03:10 AM
indeed, splitting a file into arbitrary chunks and then reassembling those same chunks later to yield the original file is a little different than actually editing video files.
donjuan
07-28-2005, 01:51 PM
This utility is awsome. I set it up and it worked great the very first time.
My question is the .wmv's loose the file description in the process of coping them over. Is there a way to make it retain the the description of what the episode is about and cut the commercials?
Thanks again for your work.
John
freak7782
07-28-2005, 03:21 PM
That would be handled by asfcut or asfbin, not the cutcommercials program here. Check out asfbin's website and submit a bug report if your's isn't listed.
IGx89
07-28-2005, 08:03 PM
IGCutter v0.6 (http://igcutter.igx89.com) actually does that, both for WMV and MPEG-2 videos. Hades could modify his utility to do that too, using the Windows Media Format SDK.
tscales
08-28-2005, 04:17 AM
I'm trying this out and like the concept, but I get a buffer error message and the output files are out of order and the sound has lost sync.
It gave me an error that I needed a command line switch to increase the buffer above 3000. I tried 6000 and got the same error (except it said above 6000). I tried 10000 and get errors that the file is not 'seekable' AND
"Possible bucket overflow. File playback may be non-linear.
To avoid this specify bigger buffer window time (bigger than 9000).
Use -bw switch."
The seekable error seems to have happened on just one file. The next file just gets the overflow error.
Any suggestions?
Tom
not_Shorty
08-28-2005, 04:25 AM
try using the oldest asfcut.exe you can find. Seriously. I had problems with the latest and the newer versions, using the oldest one I could find did the trick. That *might* be the same version that ships with asftools.
tscales
08-28-2005, 05:22 AM
try using the oldest asfcut.exe you can find. Seriously. I had problems with the latest and the newer versions, using the oldest one I could find did the trick. That *might* be the same version that ships with asftools.
Tried 2.92.09, 3.92.07 -- didn't work. Tried 3.5 and it says invalid command line switch.
Tried installing the WMF Core 9 files. Didn't help.
Thought about it a lot. Read about the new asfbin program. Saw the command lines were compatible. Downloaded it, copied it to the CommercialCut directory and renamed it asfcut.exe. Tried that. Seemed to be working, but ended up with a 1 minute output file.
I'd really like this to work :). Suggestions appreciated.
freak7782
08-29-2005, 06:52 AM
Just keep making that -bw number bigger. I think I set mine to something like 50000000. Maybe even a few more zeros. Just keep adding them until you don't get that error anymore. Note that the longer the video will be, the bigger the number needs to be.
IGx89
08-29-2005, 08:00 AM
Yeah, that's what I've discovered too: keep adding a zero to that number until you don't have any problems :)
I'm not exactly sure why that number doesn't default to a bigger number in the first place; maybe it needs more RAM or something? Anyway, I haven't run into any problems with making it bigger yet.
pdaughe
08-30-2005, 07:43 AM
IGCutter v0.6 (http://igcutter.igx89.com/) actually does that, both for WMV and MPEG-2 videos. Hades could modify his utility to do that too, using the Windows Media Format SDK.
I understand that BTV writes a data block that contains the show information at the end of the MPEG. I would really like to see this utility provide the option of using IGCUTTER so the show information could be retained.
This utility provides exactly the function I've been looking for (thank you!). I want to give my brothers and sister the entire Star Trek Next Generation series on DVD for Christmas. The show descriptions are not important for them, but I would like to retain the show descriptions for my collection in BTV.
Another question: it appears this utility does NOT have to run on the HTPC on which Beyond TV is installed. Is that correct?
hades
08-30-2005, 04:05 PM
I understand that BTV writes a data block that contains the show information at the end of the MPEG. I would really like to see this utility provide the option of using IGCUTTER so the show information could be retained.
Unfortunately between my full-time job and school, I don't have time to modify this any further. The utility is working perfectly for me and I love the entire setup I have. I honestly don't need the descriptions since I use myHTPC or XBMC to view the shows. I understand your need but I don't think I will be able to do it in the near future. If anyone wants to continue the code, go for it.
This utility provides exactly the function I've been looking for (thank you!).
You're welcome. :)
I want to give my brothers and sister the entire Star Trek Next Generation series on DVD for Christmas. The show descriptions are not important for them, but I would like to retain the show descriptions for my collection in BTV.
The show description is stores inside the file? I really don't know... Someone else would have to take care of this.
Another question: it appears this utility does NOT have to run on the HTPC on which Beyond TV is installed. Is that correct?
Yes, as long as the files are in the folder specified, it doesn't care what machine it is on. I regularly recorded on one machine, and using a 2nd machine pulled the WMV files onto a 3rd and during the process cut the commercials. Now that I have my MediaServer built, all the tuners, all the HDs, all the processing is done on one machine, but it doesn't have to be.
hades
gudmundsonsc
11-08-2006, 09:09 AM
hades, would you please post the source code to this application. It may be very benefecial for others to improve and continue the maintaince of.
hades
11-08-2006, 05:14 PM
Source is, and has been since Aug 2005, posted in the original thread. The changes between 0.4 to 0.5 and 0.6 are very minimal.
hades
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.