A camera on an FPGA board and a player window on a PC are five blocks apart. This article walks through those blocks as we built them for H.264 video over Ethernet, and gives the numbers each of our two reference boards measured at 1080p30.
The five blocks
| Block | Job |
|---|---|
| Capture | IronCapture receives two-lane MIPI CSI-2 RAW10, reconstructs color and writes packed YUYV frames to DDR. |
| Encode | IronH264 reads the frame from DDR and writes H.264 Constrained Baseline NAL units back to memory, with an index of byte ranges. |
| Packetize | Firmware or a Linux application reads each encoded picture, multiplexes an MPEG transport stream and sends UDP datagrams to port 5004. |
| Network | RTLNet supplies the Ethernet MAC, ARP, ping, DHCP and UDP in logic. |
| Play | VLC or ffplay on the PC opens udp://@:5004. |
The pixels never pass through the processor. The capture core and the encoder are both bus masters on DDR, so the CPU handles addresses, lengths and packets, and the frame data stays in memory until the encoder has compressed it.
Why the frame goes through DDR
A 1080p30 YUYV stream is 124.416 MB/s. Writing it to DDR gives the encoder a whole picture to work on and gives it the previous reconstructed picture for motion search. It also separates the camera's timing from the encoder's. The capture core finishes a frame and reports it; the encoder starts when software hands it that buffer.
The encoder writes its output to a ring in the same memory. When the ring fills, the encoder stalls, so unread data is never overwritten. Software reads the index, assembles one access unit per picture and marks the IDR pictures so a player that joins late has a place to start.
MPEG-TS over UDP
We send an MPEG transport stream in UDP datagrams because every common player opens it with no setup, and a receiver can join a stream that is already running. The transport stream carries a continuity counter in each packet, which gives a direct test for loss: a receiver that reports zero continuity errors received every packet in order.
What the two boards measured
| Nexys Video (Artix-7 XC7A200T) | Zybo Z7-20 (Zynq-7000 XC7Z020) | |
|---|---|---|
| Source | On-board test pattern | Pcam 5C camera |
| Encoder | Two engines at 90 MHz | One engine at 121.85 MHz |
| Software | MicroBlaze V firmware | IronForge Linux on two Cortex-A9 cores |
| Ethernet | RTLNet RGMII MAC | The Zynq's own Gigabit Ethernet |
| 1080p30 | 18,002 pictures in ten minutes, zero dropped, minimum PSNR 44.28 dB at QP 28 | 1,800 of 1,800 pictures encoded and decoded at 30.00 pictures/s, zero continuity errors |
| Bit rate | 7.99 to 8.02 Mb/s at an 8 Mb/s target | 20.45 Mb/s at QP 28 for the measured scene |
The two builds are different, and the table says how. The Nexys build encodes a generated pattern with the camera input tied off. The Zybo build uses a real camera and sends through the processor's Ethernet, so RTLNet is not in that path.
Try it on a Nexys Video
The prebuilt bitstream on the system page holds the whole chain with the firmware inside it.
- Load the bitstream over JTAG with Vivado 2026.1.
- Open the UART at 115200 baud.
show ipprints the address from DHCP. - On the PC, run
ffplay -fflags nobuffer udp://@:5004. - On the console, enter
enable,camera mode 1080p30,camera pattern all 4,encoder bitrate 8000andstream h264 <PC address> 5004. show streamandshow encoderprint the picture counts, the bit rate and any dropped pictures.
Where the bit rate goes
The rate depends on the scene and the quantizer. The test pattern with a noise band is hard to compress on purpose: at constant QP 28 it ran 27.54 Mb/s on the Nexys. Rate control brought the same input to 8 Mb/s. For a lower rate at the same picture, the High Profile extension adds CABAC; our article on Baseline against High Profile has those measurements.