ouster-lidar / ouster-sdk

Ouster, Inc. sample code
Other
458 stars 437 forks source link

split pcap file #603

Closed moonmoonmoonmoon closed 2 months ago

moonmoonmoonmoon commented 2 months ago

Hello, everyone. I want to split a pcap file into multiple pcap files. Are there any APIs available to achieve this?

Samahu commented 2 months ago

Yes, you can use the slice command from ouster-cli to achieve this please refer to this example in our latest doc.

for example try this:

ouster-cli source large.pcap slice 0:100 save small-pcap-1.pcap     # save the first 100 frame
ouster-cli source large.pcap slice 100:200 save small-pcap-2.pcap # save the 2nd 100 frame to a different file
# and so on

Alternatively you can use the underlying python API used by the cli command for more control.

Hope this helps!