Skip to content

Commit

Permalink
network-capture fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouqueau committed May 15, 2024
1 parent 0a9e174 commit f2f3a35
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/Howtos/network-capture.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Overview

We discuss here how to use network captures with GPAC 2.3-DEV or above
We discuss here how to use network captures with GPAC 2.3-DEV or above.

# Overview

GPAC can:

- write packets to a custom file format called GPC
- read packets from pcap, pcapng and gpc files
- write packets to a custom file format called GPC (GPAC Packet Capture), and
- read packets from pcap, pcapng and gpc files.

GPAC uses a concept of network capture rules identified by ID. This allows having a set of filters in GPAC use one capture file while other filters will use either no capture file or another capture file.

Expand Down Expand Up @@ -40,11 +40,11 @@ gpac -i source.mp4 reframer:rt=on -o route://234.1.1.1:1234/live.mpd:dynamic -ne

You can also use Wireshark to capture packets.


# Playing network captures

To replay a capture file (from the above examples), use:


```
gpac -i udp://234.0.0.1:1234/ inspect:deep -netcap=src=cap_ts.gpc
Expand All @@ -70,24 +70,24 @@ If you need one filter to read from a capture file and others to not use a captu
For example, playing a route capture and exposing the resulting files to a real HTTP server filter:

```
gpac -i route://234.1.1.1:1234/live.mpd:gcache=false:NCID=RTE -netcap=src=id=RTE,route.gpc httpout:port=8080:rdirs=./dash
gpac -i route://234.1.1.1:1234/live.mpd:gcache=false:NCID=RTE -netcap=id=RTE,src=route.gpc httpout:port=8080:rdirs=./dash
```


# Stress-testing

You can also add rules for packet droping or modifications, in order to simulate errors in the transmission chain or to test GPAC demux reliability.
You can also add rules for packet dropping or modifications, in order to simulate errors in the transmission chain or to test GPAC demux reliability.

This can be done using a capture file or using the device network interface(s). The assignment to filters using `NCID` also works when not using a capture file.
This can be done using a capture file or using the device network interface(s). The assignment to filters using `NCID` also works when not using a capture file:


```
gpac -i session.sdp inspect:deep -netcap=src=cap_rtp.gpc,nrt[s=10]
```

This will drop the 10th UDP packet of the capture file, read in non-realtime mode
This will drop the 10th UDP packet of the capture file, read in non-realtime mode:

```
gpac -i session.sdp inspect:deep -netcap=[f=100]
Expand Down

0 comments on commit f2f3a35

Please sign in to comment.