Skip to content

Instantly share code, notes, and snippets.

@ashee
Created April 29, 2012 13:45
Show Gist options
  • Save ashee/2550512 to your computer and use it in GitHub Desktop.
Save ashee/2550512 to your computer and use it in GitHub Desktop.
jpg2mp4 - Image to Video
#!/bin/sh
# converts a single image to a video for a duration of 3055.23s
$ ffmpeg -r 1 -loop 1 -f image2 -i slide_0057_full.jpg -t 3055.203 -an tmp/slide_0057.mp4
# extract raw streams
$ ffmpeg -i slide_0002.mp4 -f mpegts -c copy -bsf:v h264_mp4toannexb s3.mpeg.ts
# join raw streams along with the audio stream
$ ffmpeg -shortest -isync -i "concat:s3.mpeg.ts|s4.mpeg.ts" -i ../c1e7fc9d-0dee-49c6-b76a-e49ebf8df4af.m4a -c copy tt.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment