LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I take compressed (MPEG4 bitstream) from serial port, decode it, and display it in real time?

Hi, I have a student version of labview 8.20, and I'm implementing an h.264 (MPEG-4) encoder on an FPGA to compress the video output from a digital image sensor in order to lower its bandwidth, and then transmitting it over a wireless link to a device at the computer, which will forward the recieved video to the serial (RS232) port of the computer. I will also send commands upstream to the video module for changing image settings, and other things. 

 

I want to use labview to take the data from the serial port, implement a h.264 decoder, and then display the decoded image data in real time in a window. Can anyone give me some direction as to the kind of things I will need to acheive this, or any suggestions on how you would go about it, just so I can start exploring relevant avenues quicker? It has been a while since I used labview, and never really did anything that advanced on it before.

 

Appreciate any feedback, thank you

0 Kudos
Message 1 of 9
(4,479 Views)

Hi BadGranola,

 

I have looked into your problem. Do you have a decoding algorithm? If you do have one you would be able to implement it on FPGA. NI do not have a decoder for h.264 so you would have to obtain/write this yourself.

 

The Wireless Group may be able to help you further with setting up your wireless transmission.

 

This KB might help with getting up to speed with serial communications. It also has a few links to Devsite Tutorials. Serial Comms.

 

Hope this helps.

 

Regards,

 

Chris

 

 

National Instruments - Tech Support
0 Kudos
Message 2 of 9
(4,444 Views)

And your "real time" statement about displaying the video is open to interpretation. There will be a definite lag between the "live" action and the displayed action, particularly with the serial part of the link, the serial port being severely bandwidth limited, at least compared to normal video rates.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 3 of 9
(4,432 Views)

Putnam beat me to that reply 😉

0 Kudos
Message 4 of 9
(4,429 Views)

Thanks for the replies. I have an algorithm/ functional structure for my encoder and decoder, and have started to implement the encoder on the FPGA. The wireless link should not be a problem either, I will use high data rate radio transceiever modules, which can be interfaced with via UART. The video can be compressed as heavily as needed, by changing a "quantisation parameter" in the encoder to lower the bit rate to a necessary level (At the expense of video quality).

 

My main concerns are within labview, in how to acquire data from a COM port (In windows), and how to display each frame in a window, as it is acquired from the port and decoded. Does it need to be written to a file first for example? What labview tools will I need to accomplish this?

0 Kudos
Message 5 of 9
(4,397 Views)

Hi BadGranola,

 

I don't think you will need to save the data to a file first. I would have thought your best bet would be to bring the data into LabVIEW and write it to an RT FIFO which is read in the FPGA where the decoding is performed and then write to a network shared variable and read with an NI Vision. The links below may help you with reading your serial port. I would personally recommend VISA.

 

.NET Serial Read/Write

 

Visa Serial Operations

 

Regards,

 

Chris

National Instruments - Tech Support
0 Kudos
Message 6 of 9
(4,360 Views)

such'm doing similar to yours, which conducted the RF signal interference digital televisiom and would like to show the video in real time, reading about ISDBT uses the encoder and deco h.264 I wonder if you can not do this or I saw and if you can develop LabVIEW

0 Kudos
Message 7 of 9
(3,801 Views)

Hi Jorge,

 

I'm not really sure I understand your post, what is it you need help with? I would highly recommend making a new thread and including more information since it will be much more likely to attract replies as well as allowing future users to see the answer to this question more clearly.

 

Best regards,

Jake A

Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 8 of 9
(3,772 Views)

Hello - I am trying to do something similar, except for windows.  I have a h264 I Frame parser which gives me the IDR picture data bytes.  I was hoping to be able to decode and display in LV, have you made any progress with your FPGA decoder?  I guess in windows I might be able to use the built-in codec's but have not looked into that yet.

0 Kudos
Message 9 of 9
(3,504 Views)