Re: Newbie needs help with NSTask and NSPipe
Re: Newbie needs help with NSTask and NSPipe
- Subject: Re: Newbie needs help with NSTask and NSPipe
- From: Birch Browning <email@hidden>
- Date: Thu, 15 Dec 2005 15:52:53 -0500
On 2005-12-15 14:23:58 -0500 j o a r <email@hidden> wrote:
On 15 dec 2005, at 18.13, Birch Browning wrote:
However, I'm have a difficult time getting the mpeg4
data back from the pipe and file handler and then
saved to the disk. If I convert from the command line,
I get just over 1MB back in mp4 (it's a short test
video). If I convert using the app I get about 15k.
I'm obviously either not saving all of the video, or
saving the wrong info. I'm sure it's something simple,
but I've hit a wall.
If this helps, when I run the app, sendData: get
called as does taskDataAvailable: (In fact, it gets
called 3 times, thus the checking for an existing
file), but TaskCompleted: does not get called no
matter how long it runs.
Do you really need to funnel the data through your app? Are there no
command
line arguments for specifying input and output paths for your
command line
tool? That seems the most straight forward way. Your current
implementation
will probably not work at all if you were to try it with a large
video fie
(you create an in memory representation of the file to send to the
task...).
There are a lot of threads in the list archives dealing with how to
work
with NSTask. Perhaps you could find something there? For example:
<http://www.cocoabuilder.com/archive/message/cocoa/2005/7/4/140787>
<http://www.cocoabuilder.com/archive/message/cocoa/2001/8/17/38994>
<http://www.cocoabuilder.com/archive/message/2004/12/7/123271>
et.c.
j o a r
Thanks for the response. I'll take a look at the previous posts (I'd
found these previously, but I'll look again.) and re-post if I figure
it out.
I've already run ffmpeg from CLI, but am trying to develop a
single-purpose app for students in my class to convert video into a
more-usable format (for them). I hope to drag-n-drop the vob file onto
an open window and produce the mp4 in their ~/Movies folder. I'm just
working on the NSTask and NSPipe stuff first.
Upon further review, I see your point about memory usage. I'll
re-think the design a bit.
Any other takers?
Boomer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden