Postprocessing including comskip and compression

Share your ARGUS TV tips & tricks here
dA.oOZe
Posts: 33
Joined: Thu Sep 18, 2008 8:21 am

Postprocessing including comskip and compression

Post by dA.oOZe » Sat Oct 11, 2008 10:07 pm

This thread has been pulled from the archives, some editing has been done to reflect the new name. -Mod

Hi there.

I am looking for an easy, yet effective way to have my recordings automatically cut (commercials) and compressed (DivX/XviD/...).

The whole process has to be done automatically after the recording ends, without the need of manual interaction.

Any suggestions?

User avatar
hexagon
Posts: 175
Joined: Sun Jun 01, 2008 10:54 am

Re: Postprocessing including comskip and compression

Post by hexagon » Sun Oct 12, 2008 11:50 am

It's called Processing Commands and can be found in the Administration section. I'm using it for Comskip on my recordings. Set it to "Run when the recording ends" and apply it to the recordings you wish (I'm not using it on my movie channels since there's no commercials there).

dA.oOZe
Posts: 33
Joined: Thu Sep 18, 2008 8:21 am

Re: Postprocessing including comskip and compression

Post by dA.oOZe » Sun Oct 12, 2008 12:09 pm

Hi,

thanks for your answer. I am aware of the post- and pre-processing command feature. What I need is a ready-to-use script (or anything else) which does the whole processing automatically. The way I cut and compress my recordings atm is a bit of time-consuming. Comskip is already running automatically, thats not the problem. But to have the commercials removed, I have to do lots of manual steps which I want to be done without any manual interaction.

I am testing different open source tools which provide a command line interface, but maybe somebody got it all working already so I don't have to re-invent the wheel...

Regards

sunsetdk
Posts: 516
Joined: Thu May 29, 2008 4:19 am
Location: Denmark
Contact:

Re: Postprocessing including comskip and compression

Post by sunsetdk » Mon Oct 13, 2008 8:00 am

Have you had a look a the different comskip processores (cutters) avalible. I thinks there is a link to one on the comskip homepage.

Here is a link on transcoding the recording.
viewtopic.php?f=50&t=65&p=289#p289


Combine the comskip, the cutting and compressing in a .bat file and set that as your post command. This should solve your problem.

Hope that I was of any help. :)

dA.oOZe
Posts: 33
Joined: Thu Sep 18, 2008 8:21 am

Re: Postprocessing including comskip and compression

Post by dA.oOZe » Mon Oct 13, 2008 9:52 am

Hi sunsetdk,

thanks for the answer. I did look at the comskip processors, but wasn't able to get any of them to work. I'd like to use Mpeg2Schnitt for cutting, because, as of my tests, it gives me the best results. Sadly, Mpeg2Schnitt does nothing but display the cut-window when invoked via command line. The users manual is talking about switch /S to make it cut immediately without showing the GUI, sadly it doesn't work for me. Maybe someone got a hint on that?

Anyway, thanks for the transcoding link! I will give it a try.

Regards

dA.oOZe
Posts: 33
Joined: Thu Sep 18, 2008 8:21 am

Re: Postprocessing including comskip and compression

Post by dA.oOZe » Wed Oct 15, 2008 9:28 am

I got it running nearly perfect now. Comskipping and cutting does work fine after switching from Mpeg2Schnitt to MEncoder. Transcoding via FFMpeg also works, however the quality of the final MP4 file is not that good. As I have no idea about transcoding/settings/codecs and stuff, is there anybody out there who can guide me in tweaking the settings??

sunsetdk
Posts: 516
Joined: Thu May 29, 2008 4:19 am
Location: Denmark
Contact:

Re: Postprocessing including comskip and compression

Post by sunsetdk » Thu Oct 16, 2008 7:40 am

Can you try and post the script/command you have created. Others can then benefit from it and should also be easier for them to help getting a better output. :)

dA.oOZe
Posts: 33
Joined: Thu Sep 18, 2008 8:21 am

Re: Postprocessing including comskip and compression

Post by dA.oOZe » Thu Oct 16, 2008 9:15 am

I'm on it :D

But it will take a while as I don't have much sparetime atm.

dA.oOZe
Posts: 33
Joined: Thu Sep 18, 2008 8:21 am

Re: Postprocessing including comskip and compression

Post by dA.oOZe » Fri Oct 17, 2008 11:10 am

I could not resist playing with some encoding options, so here is my first approach on comskipping + encoding a recording to XviD. This is for postprocessing or manual processing only. Everything here is to be considered "testing", use at out own risk. I am not responsible for any dataloss taken to your recordings, however the current script does NOT delete anything, except the commercials detected by comskip ;)

I did read a lot of different postings in several forums over the last days, and tried to find out what tools and encoder-settings fit best for me. The resulting video quality or filesize might not be what you prefer, so please feel free to play around with the settings and post your prefered ones. Maybe we can figure out some sort of "works best for ... recordings" here.

Ok, here we go:

Programs I use:
ComSkip : OpenSource : Responsible for detecting commercials in your recording. Make sure you set output_edl=1 in comskip.ini!
MEncoder : OpenSource : part of the MPlayer package. A pre-compiled binary for windows can be found at http://oss.netfarm.it/mplayer-win32.php - thanks to Sherpya. I used SVN version 27770 for testing, older once should also do.

The simple script:

Code: Select all

setlocal

:: Filename and path of MEncoder.exe
set _MENCODER=%~dp0MPlayer-p4-svn-27770\mencoder.exe
:: Filename and path of comskip.exe
set _COMSKIP=%~dp0comskip\comskip.exe
:: Target bitrate for XviD encoding. This is the first place for tuning quality and size
:: of the encoded file. Higher values will result in better quality but greater filesize,
:: lower values vice versa
set _TARGET_VBITRATE=1100
:: CPU priority for MEncoder: idle, belownormal, normal, abovenormal, high, realtime
set _STEP1_PRIO=normal
set _STEP2_PRIO=normal
set _EDL_OPT=

:: Run comskip (if no .EDL file with the same name of the input file exists)
if not exist "%~dpn1.edl" "%_COMSKIP%" "%~1"

:: Encode! Include .EDL file if one exists
if exist "%~dpn1.edl" set _EDL_OPT= -edl "%~dpn1.edl"
"%_MENCODER%" %_EDL_OPT% -priority %_STEP1_PRIO% -nosound -ovc xvid -of avi -xvidencopts pass=1:turbo:profile=asp5:quant_type=mpeg:nolumi_mask:noqpel:nogmc:packed:me_quality=6:vhq=1:trellis -passlogfile "%~dpn1.pass" -ofps 25 -o nul "%~1"
"%_MENCODER%" %_EDL_OPT% -priority %_STEP2_PRIO% -oac mp3lame -ovc xvid -of avi -xvidencopts pass=2:bitrate=%_TARGET_VBITRATE%:profile=asp5:quant_type=mpeg:nolumi_mask:noqpel:nogmc:packed:me_quality=6:vhq=1:bvhq=1:trellis:chroma_me:chroma_opt -passlogfile "%~dpn1.pass" -srate 48000 -ofps 25 -o "%~dpn1.avi" "%~1"

endlocal
What to do:

- Create a new file "encode.bat" somewhere on you computer and insert the above code
- Download the necessary software (comskip + MEncoder) and extract it into some directory on your computer
- change line 4 of the script to "set _MENCODER=<the path and filename of MEncoder.exe>"
- change line 6 of the script to "set _COMSKIP=<the path and filename of comskip.exe>"

You are done. Now drag and drop one of your recordings on the newly created encode.bat file and get yourself a cup of coffee - it will take some time for the programs to finish. You can also set encode.bat as your postprocessing command, however, I would not recomment that atm.
After the script is finished you get a bunch of new files in the same directory of your original recording. The one of interest is the .AVI file. Please play it with your preferred media player and give some feedback on quality and filesize.

Thats all for now...

atreyu
Posts: 69
Joined: Thu May 29, 2008 5:01 pm

Re: Postprocessing including comskip and compression

Post by atreyu » Wed Oct 22, 2008 8:13 pm

I've modified this batch file to generate commercial-cleaned, iPod-compatible H.264 video files. I use my iPod to follow a few series during my daily train commute, and had before now been using, umm, "unsanctioned" channels to get XVID files I then converted to iPod format.

I'll start a new thread with this tip.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest