Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to stream mpeg format video in internet

Hello Everyone,

I am looking for some idea to stream MPEG Video images capture using webcam to a remote computer through internet. I can save the video in mpeg format to local computer using the MPEG format but I am not able to stream it live to remote computer. Any input would be highly appreciated.

Thanks

 

0 Kudos
Message 1 of 7
(5,395 Views)

Are you trying to do this through LabVIEW? Do you want to use Vision Development Module (VDM)?

 

The mpeg format is not supported in VDM or LabVIEW. One option you would have for the VDM would be to use a third party software to convert the mpeg video to AVI format and then you could use it in VDM.

Vince M
Applications Engineer
0 Kudos
Message 2 of 7
(5,378 Views)

I'm not sure if I completely understood your question.

 

In LV8.6 it is very easy to stream video to a web client using web services. 

 

See this thread for an example:

http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=356523#M356523

0 Kudos
Message 3 of 7
(5,345 Views)

I want to develop a video conferencing software (a client server type and not on http) that can get image frames from webcam and then compress them using some  compression filter like mpeg or H.264 and then transmit to the remote end and display. I can do this by grabbing jpeg images and then flattening to string and then transmittting it to remote end and then unflattening it but it is very inefficient and incompetent because I am using wireless.

 

Does anyone have idea on how to do that . I could use ffdshow codec to covert jpeg files from command line to mpeg ( simillarly I used lame encoder to convert wave file into mp3) but it induces delay. The best way is to get a dll that can give you the frame data when you provide it with two frames (giving the difference in frame) .

 

Or is it possible to use the sophisticated and advanced vision tool to find the difference in frame of two images , that would work simillar to mpeg.

 

I am using Labview 8.51 , Vision Acquistion 8.50 and Vision Development Module 8.50

0 Kudos
Message 4 of 7
(5,241 Views)

Dear aman_bajra,

 

You can use the IMAQ Subtract VI to get the difference between two images. You may be able to do this on the image acquisition side and only send data that has changed since the last frame, cutting down on the amount of information you need to send. For compression and decompression, I believe that you would have to ensure that you had the exact same codec on both computers (to encode and decode successfully). You can explore writing to an AVI frame with compression:

 

 Writing a Compressed AVI File with the IMAQ Vision Acquisition Software

http://digital.ni.com/public.nsf/allkb/0A4D5BF47FD3FF0186256E9A004FD671?OpenDocument

 

AVI Compressor Comparison

http://zone.ni.com/devzone/cda/epd/p/id/5542 

 

You would have to find a way to transfer these compressed AVI frames, and furthermore, synch these frames up with synched audio. This is no small task, and presents many challenges. The few references I've seen to doing video conferencing in the past have all been ActiveX calls into a 3rd party video conferencing software.

 

I wish you luck in your development,

 

~Nate 

 

 

0 Kudos
Message 5 of 7
(5,215 Views)

Dear Nate ,

Thank you very much for your reply. I thought and tried to use AVI write vi using existing codec however since I want to create real time video conferencing software , saving and transmitting induced delay which was not admissible.

 

I have been trying to use x263 to use H.263 compression technology however with little success.  I couldnt compile the source code or it might be I didnt get the right code. Ideally it would be great to have a dll or ActiveX that can accept raw video data and give the intra frame compressed data so as to transmit to other side and then decompress again. 

 

Regarding subtracting image, I tried that too but cudnt reproduce the image back again. I have included the VI herewith . .

 

Thanks

 

0 Kudos
Message 6 of 7
(5,213 Views)
I took a look at your code and you are subtracting an image from itself. Image Src A and Image Src B are looking at the same memory location which means that the shift register is ineffective because it does not function as a normal LabVIEW varible. What you can do to properly subtract is to use two different memory locations. One for Image Src A and a different one for Image Src B.
Vince M
Applications Engineer
0 Kudos
Message 7 of 7
(5,189 Views)