Skip to content

Instantly share code, notes, and snippets.

@nateraw
Created December 8, 2022 22:06
Show Gist options
  • Save nateraw/4e323d41c6a4b90e672cf6d4d15dfde5 to your computer and use it in GitHub Desktop.
Save nateraw/4e323d41c6a4b90e672cf6d4d15dfde5 to your computer and use it in GitHub Desktop.
Create a couple dummy video files with ffmpeg
# Create video w/ red background
ffmpeg -f lavfi -i color=color=red -t 3 -vf scale=64:48 test_video_no_audio.mp4
# Make some dummy audio
ffmpeg -f lavfi -i "sine=frequency=1000:duration=3" -ac 2 dummy_audio.wav
# Add dummy audio to the previous video
ffmpeg -i test_video_no_audio.mp4 -i dummy_audio.wav -map 0:v -map 1:a -c:v copy -shortest test_video_audio.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment