Tuesday, October 10, 2023

ffmpeg Syntax for NVR Footage

 

Intro:

Occasionally from time to time I'm asked to pull video footage from NVR systems and send this off to either the customer or police departments. Honeywell systems will dump this footage as ".asf" files and for some reason it's not playable once directly uploaded to Google Drive. 

You also can't speed up the footage without artifacts starting to appear around 7-10x speed and getting worse with higher speeds around 15x. If re-encoded to the container MKV, it's playable on Google Drive. No clue why and I don't have time to figure it out at the moment. I may come back to this in a future article.


ffmpeg Syntax:

Combine Multiple Files:
  • CMD
  • CD to directory with ASF files to be combined.
  • Create a list of files to be combined and save them to "list.txt".
    • (echo file 'first file.asf' & echo file 'second file.asf' )>list.txt
  • To make things easy, CD to the directory of "ffmpeg.exe".
  • Run ffmpeg, concatenating each file in succession found in "list.txt", and save to a single "output.mp4" file.
    • ffmpeg -safe 0 -f concat -i C:\temp\list.txt -c copy output.asf
      • C:\temp\list.txt references must exist in C:\temp\
      • output.asf is generated in ffmpeg directory
      • make output file extension same as input then convert to MKV in Handbrake
      • output.xxx can be .asf, .mp4, or mkv

Convert MP4 to MKV Container:
  • Change the input file and output file names
    • ffmpeg -i "INPUT FILE.mp4" "OUTPUT FILE.mkv"




πŸ‘½

No comments: