Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with H.264 bitstream malformed, no startcode found #34492

Open
panminjia82 opened this issue Jan 29, 2025 · 4 comments · May be fixed by #34498
Open

Problem with H.264 bitstream malformed, no startcode found #34492

panminjia82 opened this issue Jan 29, 2025 · 4 comments · May be fixed by #34498
Labels
PC Issues related to running openpilot on PC

Comments

@panminjia82
Copy link

Describe the bug

RUN OpenPilot's master branch on PC with two webcam@30fps on mjpg model.

error log

000019- - 6350628e80--0
Getting VIN & FW versions
webcamerad logcatd proclogd logmessaged mic dmonitoringmodeld encoderd loggerd modeld ui soundd locationd pandad calibrationd torqued controlsd selfdrived card deleter monitoringd paramsd plannerd radard hardwared statsd
Setting OBD multiplexing to True Starting listener for: camerad
system/loggerd/encoderd.cc: encoder road_cam_encoder init 640x480
OBD multiplexing set successfully
[mpegts @ 0x62c5330c6c00] H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb'
option with ffmpeg)
system/loggerd/video_writer.cc: ts encoder write issue len: 67624 ts: 50000
[mpegts @ 0x62c5330c6c00] H.264 bitstream malformed, no startcode faund, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb'
option with ffmpeg)
system/loggerd/video_writer,cc: ts encoder write issue len: 67616 ts: 100000
[mpegts @ 0x62c5330c6c00] H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb'

OS Version

Ubuntu 24.04

openpilot version or commit

No response

Additional info

No response

@panminjia82 panminjia82 added the PC Issues related to running openpilot on PC label Jan 29, 2025
@panminjia82
Copy link
Author

@deanlee
Thank you for your help .

After commit your code ,Warning of"non-strictly-monotonic PTS" still occurred .and the WedCam DO NOT WORK
here is the log :
(openpilot) panminjia@Lenovo-M75n:/data/openpilot$ NOSENSOR=1 USE_WEBCAM=1 system/manager/manager.py
system/loggerd/encoder/ffmpeg_encoder.cc: needs update
system/loggerd/bootlog.cc: bootlog to /home/panminjia/.comma/media/0/realdata/boot/000000b3--cdf2305b68
missing public key: /home/panminjia/.comma/persist/comma/id_rsa.pub
: Could not find the Qt platform plugin "wayland" in ""
Panda 3b004e001751373134373734 connected, version: DEV-3ff97305-DEBU, signature 0251e6f044051fc7, expected 0251e6f044051fc7
selfdrive/pandad/main.cc: starting pandad
selfdrive/pandad/pandad.cc: connecting to pandas: 3b004e001751373134373734
selfdrive/pandad/panda.cc: connected to 3b004e001751373134373734 over USB
selfdrive/pandad/pandad.cc: connected to all pandas
logmessaged ui deleter pandad hardwared statsd
opening roadCameraState at /dev/video0
Waiting for CAN messages...
system/loggerd/loggerd.cc: logging to /home/panminjia/.comma/media/0/realdata/00000058--af50d1b259--0
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
Getting VIN & FW versions
Setting OBD multiplexing to True
OBD multiplexing set successfully
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
got vin with request=b'\t\x02'
opening driverCameraState at /dev/video2
Setting OBD multiplexing to False
Starting listener for: camerad
system/loggerd/encoderd.cc: encoder driver_cam_encoder init 640x480
system/loggerd/encoderd.cc: encoder road_cam_encoder init 640x480
[libx264 @ 0x75f200005a80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x75f200005a80] profile High, level 2.1, 4:2:0, 8-bit
OBD multiplexing set successfully
modeld init
setting up CL context
CL context ready; loading model
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
models loaded, dmonitoringmodeld starting
connecting to driver stream
connected with buffer size: 460800
iso-tp query bad response: (1793, None) - 0x7f3e13
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
iso-tp query bad response: (1792, None) - 0x7f3e13
iso-tp query bad response: (1793, None) - 0x7f3e13
iso-tp query bad response: (1988, None) - 0x7f0911
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
iso-tp query bad response: (1920, None) - 0x7f0910
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
iso-tp query bad response: (1988, None) - 0x7f3e11
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
iso-tp query bad response: (1968, None) - 0x7f3e12
iso-tp query bad response: (1953, None) - 0x7f3e12
iso-tp query bad response: (1920, None) - 0x7f3e12
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
iso-tp query bad response: (1872, 109) - 0x7f3e12
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
iso-tp query bad response: (1872, 15) - 0x7f3e12
VIN LVGB674K4KG018519
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
models loaded, modeld starting
vision stream set up, main_wide_camera: False, use_extra_client: False
connected main cam with buffer size: 460800 (640 x 480)
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
{'event': 'fingerprinted', 'car_fingerprint': 'TOYOTA_CAMRY', 'source': 1, 'fuzzy': True, 'cached': False, 'fw_count': 9, 'ecu_responses': [(1880, 109, 0), (1880, 15, 0), (1998, None, 0), (1800, None, 0), (1979, None, 0), (1961, None, 0), (1976, None, 0), (1801, None, 0)], 'vin_rx_addr': 2024, 'vin_rx_bus': 0, 'fingerprints': '{0: {170: 8, 186: 4, 608: 8, 740: 5, 464: 8, 1017: 8, 466: 8, 643: 7, 37: 8, 36: 8, 180: 8, 1568: 8, 355: 5, 1114: 8, 552: 4, 544: 4, 1595: 8, 562: 6, 452: 8, 835: 8, 1020: 8, 550: 8, 812: 8, 951: 8, 921: 8, 467: 8, 610: 8, 705: 8, 761: 8, 114: 5, 426: 6, 836: 8, 1556: 8, 945: 8, 800: 8, 810: 2, 1571: 8, 869: 7, 871: 2, 1572: 8, 1112: 8, 1570: 8, 830: 7, 1745: 8, 870: 7, 1044: 8, 1161: 8, 1162: 8, 1163: 8, 1042: 8, 976: 1, 1552: 8, 728: 8, 1279: 8, 1059: 1, 1002: 8, 1779: 8, 955: 8, 888: 8, 1541: 8, 918: 8, 1041: 8, 913: 8, 956: 8, 1553: 8, 898: 8, 944: 8, 1235: 8, 1056: 8}, 1: {865: 8, 866: 8, 291: 7, 767: 8, 1664: 8, 1665: 8, 1666: 8, 1667: 8, 1668: 8, 1669: 8, 769: 8, 771: 8, 773: 8, 775: 8, 777: 8, 779: 8, 781: 8, 783: 8, 785: 8, 787: 8, 789: 8, 791: 8, 849: 8, 864: 8, 768: 8}, 2: {170: 8, 186: 4, 608: 8, 740: 5, 464: 8, 1017: 8, 466: 8, 643: 7, 37: 8, 36: 8, 180: 8, 1568: 8, 355: 5, 1114: 8, 552: 4, 544: 4, 1595: 8, 562: 6, 452: 8, 835: 8, 1020: 8, 550: 8, 812: 8, 951: 8, 921: 8, 467: 8, 610: 8, 705: 8, 761: 8, 114: 5, 426: 6, 836: 8, 1556: 8, 945: 8, 800: 8, 810: 2, 1571: 8, 869: 7, 871: 2, 1572: 8, 1112: 8, 1570: 8, 830: 7, 1745: 8, 870: 7, 1044: 8, 1161: 8, 1162: 8, 1163: 8, 1042: 8, 976: 1, 1552: 8, 728: 8, 1279: 8, 1059: 1, 1002: 8, 1779: 8, 955: 8, 888: 8, 1541: 8, 918: 8, 1041: 8, 913: 8, 956: 8, 1553: 8, 898: 8, 944: 8, 1235: 8, 1056: 8}, 3: {}, 4: {}, 5: {}, 6: {}, 7: {}}', 'fw_query_time': 1.5537788720000094}
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
selfdrive/pandad/panda_safety.cc: Finished FW query, Waiting for params to set safety model
skipping model eval. Dropped 39 frames
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
skipping model eval. Dropped 2 frames
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
skipping model eval. Dropped 5 frames
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
[libx264 @ 0x75f200005a80] non-strictly-monotonic PTS
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
skipping model eval. Dropped 1 frames
skipping model eval. Dropped 4 frames
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
skipping model eval. Dropped 3 frames
skipping model eval. Dropped 2 frames
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
skipping model eval. Dropped 3 frames
skipping model eval. Dropped 6 frames
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
skipping model eval. Dropped 4 frames
webcamerad logcatd proclogd logmessaged micd dmonitoringmodeld encoderd loggerd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter dmonitoringd pandad paramsd plannerd radard hardwared statsd
skipping model eval. Dropped 3 frames
skipping model eval. Dropped 1 frames
skipping model eval. Dropped 3 frames

@deanlee
Copy link
Contributor

deanlee commented Feb 1, 2025

H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb'
option with ffmpeg)

This is an encoder issue, not related to the webcam. If you're facing webcam issues, make sure the correct camera IDs are set properly.

The [libx264 @ 0x75f200005a80] non-strictly-monotonic PTS warning can be safely ignored for now. Despite the warning, H.264 video (qcamera) will still be logged after #34498. This is a separate issue and will be addressed in a future PR.

@panminjia82
Copy link
Author

panminjia82 commented Feb 1, 2025

Thank you very much. @deanlee
I will ignore it .

webcam IDs maybe is not the reason.
Driver_cam and Road_cam work normally.

the ui message is "Sensor Data Invalid
Possible Hardware Issue".

I do not have any IMU sensor ,this occur issue ?
OR, frames are dropped that make the issue?

@deanlee
Copy link
Contributor

deanlee commented Feb 1, 2025

the ui message is "Sensor Data Invalid Possible Hardware Issue".

I do not have any IMU sensor ,this occur issue ?

Yes, the UI message "Sensor Data Invalid" appears because the system can't detect accelerometer or gyroscope sensors. Since you're running this on a PC, which doesn't have these sensors, this message is expected and not indicative of an actual hardware issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PC Issues related to running openpilot on PC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants