IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Calling VirtualDubMod as a Post Capture Task
Guest_oscillatory_*
post Jan 16 2005, 11:04 AM
Post #1





Guests






Hi,

This may not belong in the development forum, so I apologise if that's the case.

Yesterday I spent some time working on a perl script which can take an MPEG/TS file, fix/demux it with ProjectX, mux it with mplex 1, and convert to AVI (XviD) using VirtualDubMod.

The script is working fine on its own, however when I try to call it as a post capture task, it hangs at point when VirtualDubMod is called. The VirtualDubMod process is created, but its gui does not appear. So I'm, wondering if there is some limitation in terms of being able to call an application with a gui from WS as a post capture task.

I've tried calling a few other programs with guis as post capture tasks, and they seem to do the same thing.

Anyway, has anyone had and overcome this problem, or is it a limitation I'll just have to work around?

Actually, I just thought of something else, could it be because I'm running WS as a service?

Thanks...
Go to the top of the page
 
+Quote Post
null_pointer
post Jan 16 2005, 11:13 AM
Post #2


Web Scheduler Developer


Group: Developers
Posts: 4,495
Joined: 9-July 03
From: Melb
Member No.: 9
Card: None


If you are running WS as a service (default install option) then you need to change the service settings so WS can interact with the desktop, you may also need to run the service as a different user.
Go to the top of the page
 
+Quote Post
PhilbyJ5
post Jan 16 2005, 11:53 AM
Post #3


Forum Regular


Group: Members
Posts: 182
Joined: 3-February 04
From: Canberra, Australia
Member No.: 461
Card: VisionPlus DVB-t


oscillatory,

Once you get it all working nicely, I would be very interested in setting up something similar. Would you consider doing some brief setup steps for others to make use of?
Go to the top of the page
 
+Quote Post
Guest_oscillatory_*
post Jan 16 2005, 03:57 PM
Post #4





Guests






QUOTE (null_pointer @ Jan 16 2005, 11:13 AM)
If you are running WS as a service (default install option) then you need to change the service settings so WS can interact with the desktop, you may also need to run the service as a different user.
*


Thanks null, that worked a treat. I should have thought of this. Now that you mention it, I remember it cropping up as an issue months ago (WS needing to interact with the desktop that is).


QUOTE (PhilbyJ5 @ Jan 16 2005, 11:53 AM)
oscillatory,

Once you get it all working nicely, I would be very interested in setting up something similar.  Would you consider doing some brief setup steps for others to make use of?
*


Hi Philby, I'd be happy to pass the script on to you once its a little more robust. At the moment its probably pretty fragile, and there's still a few potential issues I'd like to sort out.
Go to the top of the page
 
+Quote Post
PhilbyJ5
post Jan 16 2005, 04:16 PM
Post #5


Forum Regular


Group: Members
Posts: 182
Joined: 3-February 04
From: Canberra, Australia
Member No.: 461
Card: VisionPlus DVB-t


Cool. Whenever your ready.
Go to the top of the page
 
+Quote Post
anthonyshephard
post Jan 19 2005, 05:47 AM
Post #6


Forum Regular


Group: Members
Posts: 141
Joined: 21-November 04
Member No.: 2,060
Card: VisionPlus DVB-t


FYI,
I've put together a small DOS batch script which seems to work okay for me. Currently the script takes a transport stream, passes it through ProjectX, muxes it through mplex1 and then uses mencoder to generate a DivX. The choice of DivX, elemental streams or MPEG file as output is selectable via the calling script.
So, to convert to DivX, set up the following task
DRIVE:\PATH\to_divx_hq.bat "$filename"
Hope it all makes sense and feel free to use it if you want. The version of mencoder is from
http://armory.nicewarrior.org/projects/cygmp/

Comments welcomeAttached File  ws_batch_convert.zip ( 1.91K ) Number of downloads: 113


Anthony
Go to the top of the page
 
+Quote Post
Guest_oscillatory_*
post Jan 19 2005, 04:17 PM
Post #7





Guests






I'll have to check out mencoder... it looks like a much better solution than using VirtualDubMod.
Go to the top of the page
 
+Quote Post
pixelboy
post Jan 20 2005, 09:01 AM
Post #8


Participant


Group: Members
Posts: 26
Joined: 11-January 05
Member No.: 2,340
Card: DNTV TinyTwin USB


Great stuff Anthony. smile.gif

One thing... what application does SET DVRTOMPEG_PATH=C:\Progra~1\DigitalTv refer to.

I am attempting to use your scripts to automate conversion to DVD MPG2.

I think Ive got everything else.

Thanks
Go to the top of the page
 
+Quote Post
anthonyshephard
post Jan 22 2005, 05:21 AM
Post #9


Forum Regular


Group: Members
Posts: 141
Joined: 21-November 04
Member No.: 2,060
Card: VisionPlus DVB-t


Hi,
It is an application written by null pointer which uses the CL mux and the Web Scheduler Dump filter to convert a DVR-MS to MPG. See this same group but DVR-"MS to MPG, New Tool" topic. You can download it from;

http://sourceforge.net/project/showfiles.php?group_id=117011

I only think it is useful if you want to convert from DVR-MS to MPG. Of course you could just use the same CL mux directly from WebScheduler by selecting "DNTV Live! MpgMux" capture type instead.
When I'm making up a DVD, I record a TS mux then run the demux part of the script. Then use Cuttermaran to cut out adverts. The elemental files (m2v and mp2) can be taken directly by most DVD packages to make up a DVD, including DVDLab, which I use. My DVD player has some trouble taking MPEG files that aren't in a VOB format with associated IFO files.

Hope this helps.

Anthony
Go to the top of the page
 
+Quote Post
Guest_xenuwork_*
post Jan 23 2005, 10:09 AM
Post #10





Guests






oscillatory,
find attached my perl script that uses mencoder to convert CLmux mpg's to divx. I normally use VideoReDo to cleanup the recorded files and copy them to a transcode directory, then have this script scheduled to run at 1am. It processes all files it finds in the transcode directory, sending the divx files to an archive directory and moving the original files to a directory for manual deletion later. Has been working pretty well for me.
cheers
xenu

Attached File  mpg2Avi.zip ( 2.05K ) Number of downloads: 83
Go to the top of the page
 
+Quote Post
stevodude
post Jan 20 2006, 08:35 AM
Post #11


Participant


Group: Members
Posts: 68
Joined: 19-October 05
From: Australia
Member No.: 3,742
Card: DNTV Live! DVB-T


QUOTE (xenuwork @ Jan 23 2005, 10:09 AM) *
oscillatory,
find attached my perl script that uses mencoder to convert CLmux mpg's to divx. I normally use VideoReDo to cleanup the recorded files and copy them to a transcode directory, then have this script scheduled to run at 1am. It processes all files it finds in the transcode directory, sending the divx files to an archive directory and moving the original files to a directory for manual deletion later. Has been working pretty well for me.
cheers
xenu

Attached File  mpg2Avi.zip ( 2.05K ) Number of downloads: 83


Hi, my first post here :-)

great place for dvb stuff...

anyway I've been using analogue cards and htpc setups for about 3 years now, and usually I've been using an application called showshifter which does a great job of direct divx avi recordings of the analogue cards, and I've been fidling with Digital card a year or so back, and the support wasn't very good. But now the cards seems to be quite usable.

I have a dntv live! DVB-T card and the recordings are obviously in mpg format and quite large (3Gb+ for 1 hrs recording), where as my divx avi is abround 1Gb for 1hr which I like.

I use windowsXP, so don't know if this is a dumb question, but how would I get that script with mencoder to run under windows? using win32 perl?

cheers, stevo.
Go to the top of the page
 
+Quote Post
nate
post Jan 20 2006, 09:33 AM
Post #12


DigitalWatch Developer


Group: Developers
Posts: 2,263
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


I (and some others) just use a .bat file.


--------------------
Go to the top of the page
 
+Quote Post
stevodude
post Jan 20 2006, 10:56 AM
Post #13


Participant


Group: Members
Posts: 68
Joined: 19-October 05
From: Australia
Member No.: 3,742
Card: DNTV Live! DVB-T


haha don't worry fella's, I downloaded a win32 compiled mplex1, mencoder & ProjectX loaded up your batch files, and bingo, worked GREAT!...

thanks anthonyshephard, great stuff.

only problem now is media player classic can't play the avi?...
Output from MPC

"Media Type 0:
--------------------------
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {34504D46-0000-0010-8000-00AA00389B71}
formattype: FORMAT_VideoInfo {05589F80-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 135523
cbFormat: 88

VIDEOINFOHEADER:
rcSource: (0,0)-(0,0)
rcTarget: (0,0)-(0,0)
dwBitRate: 1500775
dwBitErrorRate: 0
AvgTimePerFrame: 400000

BITMAPINFOHEADER:
biSize: 40
biWidth: 720
biHeight: 576
biPlanes: 1
biBitCount: 24
biCompression: FMP4
biSizeImage: 1244160
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0"

OK now used gspot and it says "codec NOT installed"
4cc=FMP4 Name=Unkown.
Go to the top of the page
 
+Quote Post
black_dog
post Jan 20 2006, 11:22 AM
Post #14


Forum Regular


Group: Members
Posts: 219
Joined: 31-July 05
Member No.: 3,277
Card: DVICO FusionHDTV


[deleted due to not having read the thread properly ]
Go to the top of the page
 
+Quote Post
paul_ahb
post Jan 20 2006, 12:26 PM
Post #15


Forum Regular


Group: Members
Posts: 1,162
Joined: 9-June 04
From: Hobart
Member No.: 1,030
Card: None


QUOTE (oscillatory @ Jan 19 2005, 05:17 PM) *
I'll have to check out mencoder... it looks like a much better solution than using VirtualDubMod.

you might like to use:
http://forums.dvbowners.com/index.php?showtopic=4027&st=0

This ises mencoder to do avi compression tasks.

Paul


--------------------
Go to the top of the page
 
+Quote Post
anthonyshephard
post Jan 20 2006, 10:09 PM
Post #16


Forum Regular


Group: Members
Posts: 141
Joined: 21-November 04
Member No.: 2,060
Card: VisionPlus DVB-t


stevodude,
I think that Paul's script is a lot more developed than mine, so you are probably best transferring. But I think the problem is due to a newer version of mencoder which defines the 4CC differently when encoding DivX. It is possible to force the 4cc to what ever you want. My script has moved on a bit, and now forces the 4CC when encoding to DivX.

Anthony
Go to the top of the page
 
+Quote Post
stevodude
post Jan 24 2006, 01:50 PM
Post #17


Participant


Group: Members
Posts: 68
Joined: 19-October 05
From: Australia
Member No.: 3,742
Card: DNTV Live! DVB-T


QUOTE (anthonyshephard @ Jan 20 2006, 10:09 PM) *
stevodude,
I think that Paul's script is a lot more developed than mine, so you are probably best transferring. But I think the problem is due to a newer version of mencoder which defines the 4CC differently when encoding DivX. It is possible to force the 4cc to what ever you want. My script has moved on a bit, and now forces the 4CC when encoding to DivX.

Anthony


Thanks, I have actually got it working fine, I just set audio to cbr & then vdubmod can edit it just fine & it spits out the avi with audio in sync... yah.

only thing I have to work out now is how to do the DRIVE:\PATH\to_divx_hq.bat "$filename" as a post task in webscheduler.
Go to the top of the page
 
+Quote Post
stevodude
post Jan 27 2006, 10:53 AM
Post #18


Participant


Group: Members
Posts: 68
Joined: 19-October 05
From: Australia
Member No.: 3,742
Card: DNTV Live! DVB-T


OK, I have decided to go with paul_ahb's scripts, looks a bit neater...

only problem is how do I add post task... same as the other one?

ie post task add e:\paulh_toavi\AVI4-43.bat "$filename"

and probably a stupid question, but how do I move the files within the batch file once completed?

ie use your mpg2avi avi4-43.bat, removed the delete option, but want to add ie:

move .avi to e:\avi2edit ( so I remember to edit the commercials )
move .ts to e:\recording archives ( so once a week I check avi's then delete caputure manually)

also don't know if this has been covered, can you automatically detect 4.3 format? ie if it has black bars Left/Right then run avi4-42.bat, otherwise run avi4-169.bat? (think I asked this somewhere else, sorry)

Kind regards, Stevo.
Go to the top of the page
 
+Quote Post
black_dog
post Jan 27 2006, 01:44 PM
Post #19


Forum Regular


Group: Members
Posts: 219
Joined: 31-July 05
Member No.: 3,277
Card: DVICO FusionHDTV


On the topic of conversion to XVID/DIVX I'm keen to understand peoples opinion on handling audio
formats.

Paul's script converts the audio to MP3 at 128kbs, and for some content which is AC3 I've been toying
with the idea of demuxing the audio and re-adding it to the XVID's AVI container directly (via VirtualDUBmod)

Any opinions on whether AC3/MPEG/MP3 formats are preferrable for an AVI? Problems with size or
quality? or audio sync maybe?

mencoder doesn't seem to have an option to stream the source audio data directly into the target
AVI, but then maybe its the default action.
Go to the top of the page
 
+Quote Post
paul_ahb
post Jan 27 2006, 09:56 PM
Post #20


Forum Regular


Group: Members
Posts: 1,162
Joined: 9-June 04
From: Hobart
Member No.: 1,030
Card: None


stevo,

please ask support questions for WSPostProcessor and/or CommandQueue on the support thread:
http://forums.dvbowners.com/index.php?showtopic=4027

This is just so that other people looking for help with it can find it all in the one place smile.gif

Paul

QUOTE (black_dog @ Jan 27 2006, 02:44 PM) *
but then maybe its the default action.

I think you are right about that. I am sure that you can stream directly, I remember it when I was looking into the compression options ages ago.

My hearing isn't great and I can't tell anything better than 128kb/s so that is why I made that the max default setting rolleyes.gif (Unless you are using the custom settings). There are always ways around it...

Paul


--------------------
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th May 2013 - 04:18 PM