Question

Delphi, DSPack, Directshow, and streaming video Part 3

Asked by: asymmetric

Ok, you've looked at and maybe even answered parts 1 and 2 of this, maybe posted a comment, maybe even collected the points.  Now, on to part 3.  I'm still interested in parts 1 and 2, and will award the points even if this part is answered first;  I only say that because if somebody answers this part well, I won't need parts 1 and 2.

You can see Parts 1 and 2 here :
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20604284.html
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20604292.html

I recommend you read at least the first part of part 1, so you're familiar with what I'm doing and what I'm trying to accomplish.

That said, if DSPack and/or TASFWriter aren't up your alley, that's fine by me because I'd like to get away from TASFWriter anyway, and this part can be answered (I imagine) without any real knowledge of TASFWriter or DSPack.

As with the other two parts, this question is worth 1000 points.  I'll provide the other 500 points in another question once this one is answered.

Ok, so I've mentioned I have a webcam app in development, that I want to add streaming capabilities to it, and that I've been trying to use TASFWriter to accomplish that.  Even if parts 1 and 2 are answered to my satisfaction, I still have a problem.  I don't want viewers of the webcam to have to use windows media player to view the webcam.

What I'd like to do is make streaming available, via mpeg, divx, or whatever other codecs I (or the user) may have available.  Now, as you should be aware if you checked out my app, it has a built-in HTTP server.  What I'd like to do is provide via a java applet, or javascript, a way for them to view the stream inside IE.  The following framework outlines this, it's pretty basic, I'm going to describe it just for clarity.

  1) user connects to the internal HTTP server, which already maintains a list of available cams and handles viewing them.
  2) user clicks on the "stream" URL for a cam, which directs them to another URL on the internal HTTP server.
  3) the internal http server serves up the java/javascript applet, which will connect back to the server machine on a different port to get view the stream.

This is what I've no clue about -- how to create this stream.  What I have available is the standard filtergraph I've built using DSPack, a buffer that holds the most recently captured bitmap via a samplegrabber in the graph, and a jpeg compressed version of that bitmap.  I currently capture at a rate of 1FPS, but I can of course do this faster if your implementation requires it.

What I'm looking for is twofold.
  1) Generate the stream to serve to the client.  This stream needs to be compressed.  By a 3rd party component if that's what you're comfortable with, by an installed windows codec if you know how to do this would be best.

  2) The java/javascript code I'll need to serve to the client that connects to the custom port on the webcam app/server to view the stream.  I'll post a link to this Q in the java and javascript areas since I realize this isn't the best place for this.  I'm asking here because I'm also willing to accept a lightweight delphi client instead of java/javascript, as long as the code works fine as an ActiveX component.  I'd like to avoid the ActiveX route if possible because people, like myself, are leery of downloading an unsigned ActiveX control, or even a signed one that still pops up with security warnings; Also, this is fairly hard on the app user.  I can serve the component via the internal HTTP server, but the user will still get security warnings in IE.

As an example of what I'd like to see..  delphi code to take a series of bitmaps and convert them into an mpeg (mjpeg, divx, heck even avi or asf) stream.  Generate an event every so often, say once a second, to tell me that a buffer of that length is ready to be sent.  I'll grab the buffer and send it over the socket to all connected clients.

On the java side, all it needs to do is be able to correctly interpret and display this stream.  It shouldn't send anything, it's a one-sided affair.  The java client connects and immediately starts to receive the stream it is to display.  A minimal protocol will be required just to make sure the client knows the format of the stream, but I leave that detail to those of you who thing you want a shake at the points. :)

I'll provide 1000 points each for these two parts, provided they work together. ;)  This means if one of you comes up with the delphi/sending side and somebody else comes up with the java/client side, you'll get 1k points each.  If one enterprising and skilled individual comes up with a solution that implements both sides, I'll throw you the full 2k.

Answers that help me get there on my own but don't implement the full thing will get some points at my discretion, but I'd really like to see both sides from one person, just so I don't have to worry about any collaboration between coders; especially with regard to picking somebody to blame if the two parts don't communicate properly with one another. ;)  I'm a coder myself, not a manager, and I don't want to be one.  If you can work it out between yourselves, by all means, collaborate away.

I hope that covers everything.. if not, feel free to ask away.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-05-02 at 18:11:34ID20604315
Tags

delphi

,

dspack

Topic

Delphi Programming

Participating Experts
4
Points
500
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. WebCam
    Anyone knows where to get some WebCam stuff for Delphi ???
  2. Video Capture with directshow
    hi all, I want to know how to capture pics and avi and be able to select the video source using directshow(without the drivers dialog boxes) in code. thanks
  3. Working with webcam in Delphi?
    How can I work with webcam and get a picture from its device and bring it in my program? thank you!
  4. USB webcam in Delphi program
    I have an Oregon Scientific Webcam (640-380 resolution) connected with USB to my pc. I want to take every second a picture and show it in my Delphi program. The camera drive is Twain compatible.
  5. Delphi, DSPack, Directshow, and streaming video Part 1
    This is the first part of a three-part question series. I'll post the other parts after this. They're related, but different enough to merit another topic and more points. This question is worth 1000 points. I'll drop the other 500 in another topic after I've chosen an an...
  6. Delphi, DSPack, Directshow, and streaming video Part 2
    Part 1 of this is here : http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20604284.html I suggest you read that question even if you can't answer it, as it provides some background. Like Part 1, this question is worth 1000 points. I forg...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: Lee_NoverPosted on 2003-05-04 at 04:57:53ID: 8454598

check out my VideoCoDec demo and VoIP demo ;)
VideoCoDec:
http://leenover.dyndns.org/isapi/pas2html.dll/pas2html?File=/delphi/projects/VideoCoDecDemo/
alternate:
http://files.delphi-si.com/VideoCoDecDemoBin.zip
http://files.delphi-si.com/VideoCoDecDemoSrc.zip

VoIP:
http://leenover.dyndns.org/isapi/pas2html.dll/pas2html?File=/delphi/projects/VoIP
alternate:
http://files.delphi-si.com/VoIP.zip
http://files.delphi-si.com/VoIP_src.zip


all the needed 3rd party components are in the 3rd party dirs

for Video I use DSPack and my VideoCoDec class
for Audio the ACM Components from peter morris
the transport is done with Indy UDP compos but can simply be remade to use TCP

you'll be mostly interested in the VideoCoDec demo
to get sound from there just add another sample grabber and set it's format
then use the code from VoIP to do the compression ;)

have fun

 

by: ginsonicPosted on 2003-05-04 at 22:09:01ID: 8458990

What version of Indy use you?

 

by: Lee_NoverPosted on 2003-05-05 at 01:09:50ID: 8459987

9.0.10 ? .. I think
not sure if the projects are up to date with the new Indy version
doesn't really matter .. the code is there

 

by: ginsonicPosted on 2003-05-05 at 01:33:44ID: 8460117

A big number of properies was changed/eliminated with the new versions.

I try to compile your demo but a lots of unexisting properties are reported.

But OK, the idea is more important :)

 

by: asymmetricPosted on 2003-05-07 at 17:05:43ID: 8484101

Thanks Lee.  I'll check it out today or tomorrow.  Had a bit of a meltdown on monday that kept me without a machine until last night.

The bad news is I'm running the same psu/mobo right now after I did some hardware hacking to get it working.  The good news is Tyan has agreed to RMA the motherboard, no questions asked, which I didn't expect.

You can spend some idle time looking at the pictures here. ;)

http://asym.macroshell.com/doom/socket_1.jpg
http://asym.macroshell.com/doom/plug_1.jpg
http://asym.macroshell.com/doom/plug_2.jpg

 

by: rietbergdjPosted on 2003-05-08 at 13:08:08ID: 8491447


Hi, it's me again, just had a quick look at this question as well, and was just wondering if i was missing something??
If you take the solution we created in part 1 it creates a stream on port 3333 of the localhost by default.. Then you can embed standard MS Media player in a html file to view that stream. So what other functionality is it you are looking for.. I included some html to embed the control below, just in case :-)
Let me know,
Regards,
Dj

<snip>
<HTML>
<HEAD>
<TITLE>Embedded Windows Media Player 6.4 Control</TITLE>
</HEAD>
<BODY>
<OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=240
CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..."
TYPE="application/x-oleobject"
CODEBASE=
"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">

<PARAM name="autoStart" value="True">
<PARAM name="filename" value="http://localhost:3333/">

<EMBED TYPE="application/x-mplayer2"
SRC="http://localhost:3333/"
NAME="MediaPlayer"
WIDTH=320
HEIGHT=240>
</EMBED>
</OBJECT>
</BODY>
</HTML>
</snip>

 

by: asymmetricPosted on 2003-05-08 at 16:36:21ID: 8492425

Well I want to get away from using WMP if I can, that's the point of this question..

Parts 1 and 2 are for getting that going, but it's limited to windows clients with WMP 9 or newer being able to view the webcam; more restrictive than I'd like to be.

If I can get the profiles (part 2) going right, then I can dumb it down to V7 and I'd be ok with that.. one or the other, so I'll keep this in mind and an answer if we can get part 2 going. ;)

 

by: rietbergdjPosted on 2003-05-09 at 05:02:18ID: 8494826

Did you get my question on part two?

 

by: asymmetricPosted on 2003-05-09 at 10:36:46ID: 8496435

Ok Lee, I gave the demo (just the bins) a shot.. they're showing the proper resolution, but a blank image.  Occasionally when I choose a codec the "server" side says "bad format"; It always seems to generate an exception when I close it.

I'll check out the source and see if I can figure out what's going on, but one question.  Does this require the viewer to have the client application on their end?

Ideally I'd like something that can be viewed in a webpage..

 

by: Lee_NoverPosted on 2003-05-09 at 20:16:46ID: 8498381

ofcourse a client is needed
it handles the frame decoding and drawing
you could create an ActiveX object and use it in a webpage :)

 

by: asymmetricPosted on 2003-05-09 at 20:28:59ID: 8498423

Right, I was guessing that much.. I didn't have a chance to look at the source yet, any idea what could be causing that?  I can't seem to find a combination that works properly..

ActiveX would work but I'm really hoping for another solution.. That's going to involve all kinds of "security warning" garbage and what not, and once again limits me to Windows + IE only.. if I'm limited to that combination, the ASF solution works just as well. ;)

 

by: asymmetricPosted on 2003-05-10 at 15:14:11ID: 8501877

Lee you still here?

Your VideoCoDecDemoBin.zip files aren't working for me.  No matter what options I choose (after doubleclicking) I get "Bad Format" showing up in the title bar when I hit apply and/or ok.

If I change it again, I get an exception and the whole thing crashes and burns.

 

by: Lee_NoverPosted on 2003-05-11 at 02:27:54ID: 8503254

weird .. works fine for me
try to recompile the code and debug

 

by: CleanupPingPosted on 2003-09-08 at 22:34:25ID: 9315914

asymmetric:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations!  No comment means you don't care.

 

by: asymmetricPosted on 2003-11-09 at 06:27:31ID: 9709894

Rietbergdj

Sorry about the (loooooooooooooooong) delay here.  I've been off doing all kinds of crazy things, and my development on this project had dwindled away to nothing.  I revived it yesterday, bascially rewriting from scratch, and came here to look at questions I'd asked to see If I'd posted any code snippets for things I'd worked around/fixed in my old questions, as I had one of my drives fail; I thought I had but so far, no luck.

Anyway I didn't even realize I still had questions open.

I'm awarding you the 500 points here, as your suggestion of streaming (sticking with ASF) and embedding a media player in the webpage is exactly what I did.

I'm not awarding the other 500 anywhere as what I set out to do (Initial post for this Q) was to get *away* from using media player in any form; I wanted the stream to be cross-platform playable, not limited to windows clients, but it looks like that was too much to ask from some unpaid volunteers.. ;)

Cya 'round the forums.

-asym

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...