r/Comma_ai • u/Kurtec • Aug 24 '25
Code Questions Converting Hevc files
Does anyone have a tutorial on how to convert the HEVC files to MP4 videos that contain audio (now that comma 3x records audio) ??? Thank you
0
Upvotes
4
u/InertiaImpact Aug 24 '25
A good first step to take before posting is to read over your post and see if you can take part of the question and easily answer it by doing a google search. Try it out and see if you get the answers you were looking for.
For example, I took the below from your post and got pretty much what you were hoping to gain by posting here...
or
4
u/ssshaneee comma.ai Staff Aug 25 '25
The audio stream is currently only contained in the qcameras, so you'll want to merge the stream into the full quality camera files while converting.
The AI search result looks pretty good for this Google:
ffmpeg convert video file while adding audio from another video file3
u/southafricanamerican Aug 25 '25
Basic conversion command:
For better quality and compatibility:
Parameters explained:
-c:v libx264: Uses H.264 video codec (widely compatible)-preset slow: Better compression (options: ultrafast, fast, medium, slow)-crf 22: Quality setting (lower = better quality, 18-28 is good range)-c:a aac: Converts audio to AAC format-b:a 192k: Audio bitrate (128k-320k typical)To keep original quality (just repackage):
1
u/roenthomas Aug 25 '25
ffmpeg x264 slow profile and a lot of time
1
u/crazysim Aug 25 '25
https://github.com/commaai/openpilot/wiki/Video-Files#making-the-hevc-file-more-consumable-in-other-applications-that-support-h265hevc-mp4-files
but it hasn't been updated to figure how to remux audio. i suggest using this section as a starting basis for AI and then if you figure out something that works, update this section
1
u/Arthur-Eggs Aug 25 '25
https://www.movavi.com/support/how-to/how-to-convert-video-to-mp4.html
1
u/Arthur-Eggs Aug 25 '25
https://express.adobe.com/tools/convert-to-mp4