On Wed, 11 Feb 2004, Dragon_at_work wrote:
> I thought so. I wasn't doing it that way, though.
> It was more like your following example, but without the backslashes and new
> lines.
Ah, then you may be running into a line length limit imposed by the
shell...
The new lines and continuation lines may be the key difference.
> I changed it to look closer to your example, but I still get the same result
> of 32512 for the system call.
> > (command file1; \
> > command file2 | skip1; \
> > ...
> > command file1066 | skip1 ) | mpeg2enc
> I think so. Here is how it looks:
>
>
> (lav2yuv +p /vcdtemp/lump/_cd11_dong_bei_and_HK_1of6___dscf0003.avi | yuvfps
> -v 0 -r 25:1 | yuvscaler -v O -O SVCD ; \
> jpeg2yuv -v 0 -I p -f 25 -n 25 -j
> /vcdtemp/lump/_cd11_dong_bei_and_HK_1of6___dscf0004.jpg | yuvfps -v 0 -r 25:1
> | yuvscaler -v 0 -O SVCD | /vcdtemp/strip_1.sh ; \
> jpeg2yuv -v 0 -I p -f 25 -n 25 -j
> /vcdtemp/lump/_cd11_dong_bei_and_HK_1of6___dscf0005.jpg | yuvfps -v 0 -r 25:1
> | yuvscaler -v 0 -O SVCD | /vcdtemp/strip_1.sh ; \
> .
> .
> lav2yuv +p /vcdtemp/lump/_cd11_dong_bei_and_HK_6of6___dscf0341.avi | yuvfps -v
> (n.b. your skip is my strip)
It would speed things up (quite a bit I suspect) if 'strip' were
a shell function. That would save the overhead of having to
create a new shell to interpret the strip_1.sh script all the time.
Using a function would also shorten the command line - if there's
a limit then spending an extra 10 or 12 characters per file (the
difference between /vcdtemp/strip_1.sh and simply strip1) would add
up to quite a bit over 1000+ files.
sk1()
{
read junk
cat
return 0
}
and then use sk1 instead of /vcdtemp/strip_1.sh
Another way to cut down the length of the lines would be to
change directory to where the files are. That saves having to
spend '/vcdtemp/lump/' * 1000 characters on repeated pathnames.
Once you 'cd' into //vcdtemp/lump then the only place you'd really
need an absolute pathname would be on the output file of mpeg2enc
(mpeg2enc -o /whereyouwanttheoutput/...).
OH - one more thing - you don't need to replicate the yuvscaler
command. A SINGLE yuvscaler before the encoder will do what you
want:
(lav2yuv ... ; \
lav2yuv ... | sk1 ; \
...
lav2yuv ... | sk1 ) | \
yuvscaler -O SVCD | mpeg2enc ...
That's another 'yuvscaler -v 0 -O SVCD' (20+ characters) per
file being processed. Once you have a continuous stream of YUV4MPEG2
data it can be scaled as a stream. That'll also speed things up
by not having to start up yuvscaler each time and have it go thru
the initialization (which involves malloc'ing buffers, etc).
> > It sounds like you're passing all the filenames as arguments to
> > a single "convert from jpeg to yuv4mpeg" command rather than using
> > multiple convert commands each with but a single argument.
> I don't think so. But, you can determine this more accurately from above.
Well, it looks like you're doing it right but I may have overlooked
something. Each command should have its own argument size limit.
Feels like somehow the shell's somehow got the idea it has too many
arguments.
Shorter filenames might help too - it looks like there's a long
common prefix (_cd11_dong_bei_and_HK) that's replicated.
Steven Schultz
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users