I found that I haven't written a blog for a long time. Recently, I 've been struggling with the sdio WiFi driver. So far, I haven't solved the problem perfectly. Although I can connect to the network, the transmission speed is slow, unacceptable. However, you have learned a lot about the network, whether it is the underlying driver, or some basic network knowledge, routers, servers, and so on. After learning more deeply, you can share the learning process.
During this period, we used 6410 to verify the code and sdio hardware. We were also instructed by some experts to play with the transmission of FFMPEG + ffserver streaming media. It is really good. After this road passes, the camera collects data and can directly transmit the data over the network through ffserver. Then the client can receive the data, and then the network monitoring will be available. Hahaha, let's record this process. With expert guidance, it took a little time to complete the process.
First, download FFMPEG. Git clone or download it at http://ffmpeg.org ., After downloading the SDK, configure it first. Below is my configuration: refer to the master, without dynamic libraries, directly static libraries, so after compilation, you can directly copy an application and run it on ok6410.
./configure --disable-shared--enable-static --prefix=/home/eastmoon/ok6410/rootfs/ffmpg--cross-prefix=/usr/local/arm/4.2.2-eabi/usr/bin/arm-linux- --arch=arm--target-os=linux --enable-gpl --disable-bzlib --disable-zlib
After compilation, FFMPEG and ffserver will be available, and the two will be copied to the rootfs/bin of ok6410 (I mounted NFS on the network ), then you can run the ffserver command on the Development Board.
Since this program can be run, a ffserver. conf configuration file is still missing. This is available under the doc directory in the FFMPEG source code. It can be used. The following is added because local data is to be played. Put the source test1.mpeg in MPEG format and the configuration file ffserver. conf in the rootfs/ffserver folder.
<Stream test2.mpg>File /ffserver/test1.mpegFormat mpeg</Stream>
All right, everything is ready. Next, start the connection test and check whether the ffserver service is running. Run ffserver-F/ffserver. conf ON THE DEVELOPMENT BOARD
You can see the following,
Then you can open it in a browser on the PC. Because the IP address of my board is 192.168.5.120 and the port number in the ffserver STARTUP configuration is 8090, enter the following in the browser:
Http: // 192.168.5.120: 8090/stat.html. the following webpage is displayed, indicating that the ffserver is running properly.
Now that ffserver is normal, try playing it.
You can try using ffplay on your PC (install it in advance ).
Ffplay http: // 192.168.5.120: 8090/test2.mpg.
You can see and hear the video.
Here, FFmpeg is simply used. You need to check its source code later, because it is specially used for codec. Therefore, many audios and videos can be cropped from here. Very good, very powerful. Wait for time to get the camera in. What's wrong with WiFi. Therefore, after the camera data collection encoding is completed, the rest is very simple.