3

I would like to create a new video (MP4) file in PowerShell.

The contents of the video do not matter but should be unique. The file size should be short (5 seconds).

The is required as part of an integration test I am using PowerShell and Pester for. I am using the New-Item cmdlet for the same thing with txt files, but I'm not sure how to create the contents for the video file in PowerShell.

The system I am testing requires a new, unique video.

Martin Kearn
  • 2,313
  • 1
  • 21
  • 35
  • 3
    Depends on how "unique" it needs to be - you could automate adding a timestamp overlay onto a sample video clip, for example. See https://superuser.com/questions/1491264/ffmpeg-filter-to-add-timestamp-on-video – mclayton Dec 14 '20 at 15:17
  • If you can use 3rd party tools, `ffmpeg` can convert [set of still images](https://stackoverflow.com/a/21192710/503046) into slideshow video. Generating still images [from arbitrary text](https://stackoverflow.com/a/2070493/503046) with, say, date/timestamp might be suitable input. – vonPryz Dec 14 '20 at 16:25
  • @mclayton I think you should post that as answer – Theo Dec 14 '20 at 19:54
  • Each test execution has a guid as a kind of correlation ID so I could just insert that into a video frame somewhere and that would make the binary hash unique (which is good enough for what I need), the question s how would I do that? I like the idea of creating a set of image and making that a video, but how do i create the images? – Martin Kearn Dec 15 '20 at 07:53

0 Answers0