当前位置:网站首页>Gnuradio transmits video and displays it in real time using VLC

Gnuradio transmits video and displays it in real time using VLC

2022-07-08 01:22:00 You roll, I don't roll

I need to participate in a competition recently , It's all about using FPGA Get the video and send it to USRP RX Send , Finally, real-time display is carried out at the receiving end . This time, I will record the method and test process of real-time video display at the receiving end . The main flow chart is as follows :

chart 1

Achieve video pass USRP Send and display in real time at the receiving end , This process is summed up in two popular words —— live broadcast . Generally speaking , Due to the limitation of channel bandwidth , If the original video is decoded into one frame of images and then sent, and then displayed in the receiving segment, it requires a lot of transmission bandwidth , General wireless transmission is difficult to achieve such a large bandwidth , In especial Underwater acoustic communication . Therefore, the encoded video stream must be transmitted ( such as mp4 Video format ).

For people like me who have not studied video coding and decoding in detail , The simpler the way to realize real-time video display, the better , It's better not to write code ! Fortunately , This method really exists (^-^)! The real-time display of video at the receiving end can use VLC player . Let's look at some examples of transmission :

1、 Audio transmission

This experiment transmits a .wav Format audio data ,GNU Radio The settings in are as follows :

as for UDP Sink How to use the module is omitted here ( Let go link , If you need it, you can click in to learn ), Be careful IP Address Address Parameter settings , Can pass ifconfig -a Command to get . Then the port number Destination Port Parameter settings , Set why casually , Just follow VLC Just be consistent in .

Say below VLC Set up ,VLC The installation command of is sudo apt install vlc . open VLC , Choose... From the menu bar Media -> Open Network Stream, You will see the following interface :

We are URL Fill in the network address and port number , Note that the prefix is :udp/wav:// ,  hinder ip The address and port number should be the same as UDP Sink The settings in the module are consistent . And then click Play Button to wait for data reception .

Finally, plug in the headset and run  GNU Radio Flow chart ,~~~ You listen to , What a wonderful sound ~~~

Be careful : Don't use it here Throttle modular , As for why , You can add it and try it .

2、 video transmission  

At present, it only realizes the use GNURadio Transmit silent video , The transmission method of audio and video is still under study . The process is as follows :

I'll start with the audio transmission VLC URL The prefix in the column is changed to :udp/h264:// , Other settings remain unchanged . And then use ffmpeg Tools ( Installation steps Reference link ) Take the sound taken by the mobile phone mp4 File to h264 File format , The order is as follows :

ffmpeg -i 36985186.mp4 -c copy test.h264

The conversion method comes from :

Use ffmpeg take mp4 The file to h264 Documents or 264 file _soralaro The blog of -CSDN Blog

After the conversion test.h264 Just transfer the file , The steps are the same as above .

Current progress , Let's make a summary , Later, we have to figure out how to send normally mp4 The file will be updated when it comes back .

原网站

版权声明
本文为[You roll, I don't roll]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130542480659.html