Postprocessing including comskip and compression

Share your ARGUS TV tips & tricks here
pewpewrawr
Posts: 1
Joined: Wed May 05, 2010 2:01 pm

Re: Postprocessing including comskip and compression

Post by pewpewrawr » Fri May 07, 2010 4:41 am

I'd like to re-encode my recordings to decent quality (say... 720p) h264 MKVs, and I'm having trouble. I tried modifying the script in this thread and couldn't get it to work, and a Google search only turned up information on MKV -> AVI. So does anyone know of a good way to do this?

Thanks in advance.

Fluffkin
Posts: 21
Joined: Mon May 09, 2011 6:04 pm

Re: Postprocessing including comskip and compression

Post by Fluffkin » Sun Jun 05, 2011 7:12 pm

For what it's worth, here's my current commands for cutting the ads out and re-encoding to mpeg4.
You'll have to set the <inputname> bits according to whatever batch system / call you use, these are just the raw commands.

To cut the ads out:
mencoder "<inputname>.ts" -edl "<inputname>.edl" -oac copy -ovc copy -of mpeg -o "<inputname>_CUT.ts"

Uses the edl file generated by a comskip run. Spits the ts file back out to a copy in mpeg container format with _CUT at the end.

To re-encode:
HandBrakeCLI.exe -i "<inputname>_CUT.ts" -o "<outputname>.mp4" -E faac -6 stereo -B 128 -q 5 --decomb --detelecine --loose-anamorphic

I use handbrake because it seems to do a decent reliable job of maintaining aspect ratio, minimal auto-cropping and the decomb and detelecine features work a treat for me. I don't use h264 encoding because it takes hours of processing time. The way I call it, it uses ffmpeg mpeg4 one pass with a quality setting of 5 which gives acceptable results to watch *in my opinion, but still gives you a significant reduction in file size. It also manages to do this at roughly 1 to 1 speed. An hour of video = slightly less than an hour of encode on my machine anyway.

I don't have a quad speaker set up or anything, so the "-E faac -6 stereo -B 128" bit ensures mp4 compliant stereo at 128kbs, which again is good enough for me. I think most broadcast data comes in at 160kbs, so it's up to you if you want to play with audio settings.

To increase quality with a bigger file size, try -q 4 or 3. I wouldn't recommend going to -q 6 for the smaller files. If you care about size that much you probably should prepare for hours of h264 encoding instead.

AFAIK the -q switch for ffmpeg encoding isn't documented in the Handbrake info. So hope this helps!

[EDIT: If you want an mkv file, just switch the .mp4 to .mkv in the output filename.]

pauld
Posts: 94
Joined: Sun Jan 04, 2009 5:38 pm

Re: Postprocessing including comskip and compression

Post by pauld » Sun Sep 04, 2011 1:26 pm

I am trying to get the script posted by dA.oOZe working. It does work but my completed .avi files do not have any sound.

I am not even sure where to start with this is there anything that needs to be changed to get sound working?

Thanks

jb2uk
Posts: 23
Joined: Tue Oct 19, 2010 7:42 pm

Re: Postprocessing including comskip and compression

Post by jb2uk » Thu Jan 19, 2012 6:18 pm

I can't seem to get ARGUS TV to run post processing comannds automatically or manually, ive written a short batch script to move recorded programs over to my nas box, and set certain schedules to use it, they arn't doing when the recording finishes nothing happens, also tried using the manual option from recorded programs again nothing happens i've tried compiling the script to an exe using that instead but no joy, the script works when a file is dropped on it as does the executable, logs are empty also.

What am i missing?

keneo
Posts: 54
Joined: Mon Oct 19, 2009 8:58 pm

Re: Postprocessing including comskip and compression

Post by keneo » Wed Mar 07, 2012 11:58 pm

I am also having trouble getting post processing to work when I run it manually.
unless I am mistaken when you manually run a post processing command it adds to the Scheduled Task folder.
But nothing is getting added.

User avatar
dot-i
Site Admin
Posts: 5848
Joined: Mon Oct 01, 2012 3:40 pm

Re: Postprocessing including comskip and compression

Post by dot-i » Thu Mar 08, 2012 11:05 am

keneo wrote:I am also having trouble getting post processing to work when I run it manually.
unless I am mistaken when you manually run a post processing command it adds to the Scheduled Task folder.
But nothing is getting added.
The post processing commands are handled by the ARGUS TV core services, so you won't find them in Scheduled Tasks actually.

Would it be a nice enhancement to use the Scheduled Tasks perhaps? The benefit could be that you could more easily monitor what's going on, but it could be trickier to make sure the command runs under the right account...
I have the heart of a child. I keep it in a jar on my shelf. -- Robert Bloch
Image

User avatar
Hominidae
Posts: 361
Joined: Wed Feb 01, 2012 10:45 pm

Re: Postprocessing including comskip and compression

Post by Hominidae » Tue Mar 27, 2012 10:46 pm

I didn't have much luck in searching, so I'd better ask...

What is in the data that is passed by ForTheRecord in the %%FILE%% parameter to the post-command?
Is it the recording file in UNC or local-path format ?

I just came across this: http://www.kaashoek.com/comskip/viewtop ... f=3&t=1052
So, if %%FILE%% is in UNC path, comskip will not work correctly. :shock:

...what options do I have?

Steph
Posts: 2202
Joined: Fri Apr 11, 2008 11:04 am

Re: Postprocessing including comskip and compression

Post by Steph » Tue Mar 27, 2012 11:47 pm

Hominidae wrote: What is in the data that is passed by ForTheRecord in the %%FILE%% parameter to the post-command?
Is it the recording file in UNC or local-path format ?
UNC, it wouldn't make much sense it were a local path, recordings are not always stored on the machine running the core services.

User avatar
Hominidae
Posts: 361
Joined: Wed Feb 01, 2012 10:45 pm

Re: Postprocessing including comskip and compression

Post by Hominidae » Wed Mar 28, 2012 12:15 am

Steph wrote:
Hominidae wrote: What is in the data that is passed by ForTheRecord in the %%FILE%% parameter to the post-command?
Is it the recording file in UNC or local-path format ?
UNC, it wouldn't make much sense it were a local path, recordings are not always stored on the machine running the core services.
Well, I understand that in most cases, UNC is what one would want, but in case of tuning comskip successfully, I'd rather opt for local_path :)
I know it is actually a comskip bug, but that application is quite famous among ForTheRecord Users, I'd assume.
I'd also assume, that most users have mounted/mapped the recordings share to a local drive-letter on the core-service platform.

What are chances of a request - for adding the possibility to pass %%FILE_LOCAL%% to the post-command - to be
granted, when asked in the improvement section of the forum :?: :)

regards,
Homindae

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

Re: Postprocessing including comskip and compression

Post by hexagon » Wed Mar 28, 2012 6:06 pm

What's the problem with running comskip by UNC paths? I'm using it every day with no trouble :)

I'm passing the arguments %%FILE%% %%CHANNEL%% to PostProcessing.bat which I modified to only process the video file if the recording was made on specified channels. The batch file is also using UNC paths to launch comskip.exe.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests