中華セキュリティカメラの.264をmp4に変換
$ brew install ffmpeg
Build x264 with mp4 file support
$ brew install gpac
$ cd ~/work
$ git clone https://github.com/l-smash/l-smash.git
$ cd l-smash
$ sudo make install
$ cd ~/work
$ git clone https://code.videolan.org/videolan/x264.git
$ cd x264
$ ./configure
$ make -j 10
split264
https://www.spitzner.org/kkmoon.html
The 2nd code is needed to save as "split264.c"
$ clang split264.c
$ mv a.out split264
Convert .264 to .mp4
$ ~/work/split264/split264 P230311_155008_155523.264
$ ~/work/x264/x264 P230311_155008_155523.h264 -o temp.mp4
$ ffmpeg -i temp.mp4 -i P230311_155008_155523.wav -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 temp2.mp4
the shell script