Skip to content

Commit

Permalink
osgar/tools/lidarview.py - FIXUP H264 copy & paste
Browse files Browse the repository at this point in the history
  • Loading branch information
m3d committed May 13, 2024
1 parent eae8902 commit 8d3b253
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osgar/tools/lidarview.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,12 @@ def get_image(data):
# I - key frame
with open('tmp.h264', 'wb') as f:
f.write(data)
elif data.startswith(bytes.fromhex('00000001 0950')):
elif data.startswith(bytes.fromhex('00000001 0930')):
# P-frame}
with open('tmp.h264', 'ab') as f:
f.write(data)
else:
assert 0, f'Unexpected data {data[:20].hex()}'
cap = cv2.VideoCapture('tmp.h264')
image = None
ret = True
Expand Down

0 comments on commit 8d3b253

Please sign in to comment.