ffmpeg encode mp4 video hls stream code example
Example: ffmpeg convert finished live hls to mp4
ffmpeg -f concat -safe 0 -i <(for f in ./*.ts; do echo "file '$PWD/$f'"; done) -c copy playlist.mp4
ffmpeg -f concat -safe 0 -i <(for f in ./*.ts; do echo "file '$PWD/$f'"; done) -c copy playlist.mp4