Skip to content

Instantly share code, notes, and snippets.

@lg3bass
Last active August 13, 2020 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lg3bass/127befd3ca8e2d4ed33020cc435d34ec to your computer and use it in GitHub Desktop.
Save lg3bass/127befd3ca8e2d4ed33020cc435d34ec to your computer and use it in GitHub Desktop.
FFMPEG - convert (MAX)AVRECORDR > Instagram
//one line combo magic. all the .mov p422 files in a directory
for FILENM in *; do ffmpeg -i $FILENM -c:v libx264 -c:a aac -vf format=yuv420p -crf 1 -movflags +faststart ${FILENM%.*}.mp4; done;
//To convert the .h264 (.mov) output, keeping the same codec,bitrate, etc.
//DIRECT OUT OF AVRECORDR (60fps,h.264)
//with faststart
ffmpeg -i 20200611-480x-h264.mov -c copy -movflags +faststart output2.mp4
//no faststart
ffmpeg -i 20200611-480x-h264.mov -c copy output2.mp4
//both work in IG
//here is an encoding example:
ffmpeg -i 20200611-480x-p422.mov -c:v libx264 -c:a aac -vf format=yuv420p -crf 1 -movflags +faststart output5.mp4
//source: https://superuser.com/questions/1155186/convert-mov-video-to-mp4-with-ffmpeg
//source: https://trac.ffmpeg.org/wiki/Encode/H.264
for FILENM in *; do ffmpeg -y -i $FILENM ${FILENM%.*}.m4v; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment