minimal ffmpeg build (#36138)

* min ffmpeg

* remove avfilter

* x264

* merge x264

* simpler

* pin x264

* mac

* rm that

* lil more

* move includes to lfs

* try this

* cleanup

* larch

---------

Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
Adeeb Shihadeh
2025-09-12 18:59:15 -07:00
committed by GitHub
parent cbea5f198f
commit 347b23055d
147 changed files with 517 additions and 13 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
Import('env', 'arch', 'messaging', 'common', 'visionipc')
libs = [common, messaging, visionipc,
'avformat', 'avcodec', 'avutil',
'yuv', 'OpenCL', 'pthread', 'zstd']
'yuv', 'OpenCL', 'pthread', 'zstd',
'avformat', 'avcodec', 'avutil', 'x264']
src = ['logger.cc', 'zstd_writer.cc', 'video_writer.cc', 'encoder/encoder.cc', 'encoder/v4l_encoder.cc', 'encoder/jpeg_encoder.cc']
if arch != "larch64":
+12 -2
View File
@@ -316,8 +316,18 @@ class TestLoggerd:
self._publish_camera_and_audio_messages()
qcamera_ts_path = os.path.join(self._get_latest_log_dir(), 'qcamera.ts')
ffprobe_cmd = f"ffprobe -i {qcamera_ts_path} -show_streams -select_streams a -loglevel error"
has_audio_stream = subprocess.run(ffprobe_cmd, shell=True, capture_output=True).stdout.strip() != b''
# simplest heuristic: look for AAC ADTS syncwords in the TS file
def ts_has_audio_stream(ts_path: str) -> bool:
try:
with open(ts_path, 'rb') as f:
data = f.read()
# ADTS headers typically start with 0xFFF1 or 0xFFF9
return (b"\xFF\xF1" in data) or (b"\xFF\xF9" in data)
except Exception:
return False
has_audio_stream = ts_has_audio_stream(qcamera_ts_path)
assert has_audio_stream == record_audio
raw_audio_in_rlog = any(m.which() == 'rawAudioData' for m in LogReader(os.path.join(self._get_latest_log_dir(), 'rlog.zst')))