Common lisp gray streams - stream

Is there a tutorial on how to use gray streams?
I want to create a class that reads from a file while looking for a specific set of bytes. My initial thought was to use gray streams, but could not find any starting information.

Perhaps the examples in the SBCL manual can help you for a start?
http://www.sbcl.org/manual/#Gray-Streams-examples

I found this useful. In SBCL, gray streams are in package :GRAY.

Related

Replacement of cv::imencode

I wonder if there is some replacement of cv::imencode function without a need of OpenCV. I'd like to have that still under python.
Can please advice how to replace it without using OpenCV?
Thank you.
Perhaps you can take a look on my https://github.com/lilohuang/PyTurboJPEG which is a Python wrapper of libjpeg-turbo for decoding and encoding JPEG image without using OpenCV.

Programming screen recorder - output issues

I want record screen (by capturing 15 screenshots per second). This part I know how to do. But I don't know how to write this to some popular video format. Best option which I found is write frames to separated PNG files and use commandline Mencoder which can convert them to many output formats. But maybe someone have another idea?
Requirements:
Must be multi-platform solutions (I'm using Free Pascal / Lazarus). Windows, Linux, MacOS
Exists some librarys for that?
Could be complex commandline application which record screen for me too, but I must have possibility to edit frames before converting whole raw data to popular video format
All materials which could give me some idea are appreciated. API, librarys, anything even in other languages than FPC (I would try rewrite it or find some equivalent)
I considered also writting frames to video RAW format and then use Mencoder (he can handle it) or other solution, but can't find any API/doc for video RAW data
Regards
Argalatyr mentioned ffmpeg already.
There are two ways that you can get that to work:
By spawning an new process. All you have to do is prepare the right input (could be a series of jpeg images for example), and the right commandline parameters. After that you just call ffmpeg.exe and wait for it to finish.
ffmpeg makes use of some dll's that do the actual work. You can use those dll's directly from within your Delphi application. It's a bit more work, because it's more low-level, but in the end it'll give you a finer control over what happens, and what you show the user while you're processing.
Here are some solutions to check out:
FFVCL Commercial. Actually looks quite good, but I was too greedy to spend money on this.
Open Source Delphi headers for FFMpeg. I've tried it, but I never managed to get it to work.
I ended up pulling the DLL wrappers from an open source karaoke program (UltraStar Deluxe). I had to remove some dependencies, but in the end it worked like a charm. The relevant (pascal) code can be found here:
http://ultrastardx.svn.sourceforge.net/viewvc/ultrastardx/trunk/src/lib/ffmpeg-0.10/
There was some earlier discussion with a Delphi component here. It's a very simple component that sometimes generates some weird movies. Maybe a start.

Streaming opencv Video

I need some ideas about how to stream video feed coming from opencv to a webpage. I currently have gStreamer, but I don't know if this is the right tool for the job. Any advice on using gStreamer or any hyperlinks to tutorials would be helpful and appreciated!
Thanks!
OpenCV doesn't provide an interface for streaming video, which means that you'll need to use some other techonology for this purpose.
I've used GStreamer in several professional projects: this is the droid you are looking for.
I do not have any experience w/ streaming OpenCV output to a website. However I'm sure this is possible using gstreamer.
Using a gstreamer stream, it is possible to get data and convert the data in to OpenCV format. I recommend you read up on GstAppSink and GstBuffer.
Basically, if I remember correctly, you must run a pipeline in the a background thread. Then using some function in gst_app_sink, you can get the buffer data from the sink.
A quick lookup on the issue, you had to use GST_BUFFER_DATA for this
I remember having to convert the result from yCBCr to bgr, a collegue had problems as the conversion of opencv was inadequate. So you might have to write your own. (This was back in the IplImage* days)

cannot create larger AVI video using OPENCV

I have a series of about 600 JPEG images with sequential filenames. what I need is to create an AVI video. cvCreateVideoWriter didn't return NULL! Initially frames got started to form video but after few frames program terminates... i don't know what i am going wrong.
can anyone help? i would really appreciate that. Thanks in advance.
OpenCV uses VFW and only creates standard AVI files which are limited to 2Gb
You can use ffmpeg to create either mp4 or extended openDML type AVIs
The easiest solution is normally to pipe image frames to something like memcoder rather than having to deal with the details of the video library yourself - see http://opencv.willowgarage.com/wiki/VideoCodecs

From jpg to animated gif

I'm desperate, I need to convert some jpg images into an animated gif.
I've tried ffmpeg, but the result has a terrible quality.
Also tried imagemagick, and the result looks great but it weights 511 KB !!
Anyone please can tell me what to use or how to use the before applications to get a final animated gif with a normal quality and a normal weight for a gif??
As I said I'm desperate, I need to finish this asap :(
Thanks a lot
Not looking too deeply into the details, this link might have what you are looking for: http://www.somethinkodd.com/oddthinking/2005/12/06/python-imaging-library-pil-and-animated-gifs/, in particular the first link in the comment by Almar on June 16, 2009.
This approach uses the Python and the Python Imaging Library. If you're not handy with either, then it sounds like this approach is going to take longer than you're hoping.
By the way, you might want to ask this question on superuser ... stackoverflow is for programming questions, superuser is more generally about 'doing stuff with computers'.
FIJI or ImageJ do this pretty well. See my answer to an identical SO question here.

Resources