Skip to content

Instantly share code, notes, and snippets.

@csghone
Last active February 27, 2018 19:34
Show Gist options
  • Select an option

  • Save csghone/a56ce490eb556ddd74d4c38766dfe3b5 to your computer and use it in GitHub Desktop.

Select an option

Save csghone/a56ce490eb556ddd74d4c38766dfe3b5 to your computer and use it in GitHub Desktop.
# More ffmpeg commands:
# http://processors.wiki.ti.com/index.php/Open_Source_Video_Processing_Tools_-_MPlayer,_FFMpeg,_AviSynth,_MKVToolnix,_MP4Box
# Encode numbered images using ffmpeg
ffmpeg -start_number 100 -vframes 10 -i IMG_%03d.jpg -pix_fmt yuv420p output.mp4
# Encode numbered images using ffmpeg - creates REC.601(8bit) output
ffmpeg -i input.mp4 -pix_fmt yuv420p output.mp4
# Encode numbered images using ffmpeg - creates REC.709(10bit) output
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/x264-10bit/ ffmpeg -i input.mp4 -pix_fmt yuv420p10le output.mp4
# Scale FPS with re-encode (I think this duplicates frames to increase length of the video)
avconv -i in.mp4 -vb 40M -vf setpts=1.25*PTS -r 25 out.mp4
# Change FPS in header - without change framecount
# Ref: https://askubuntu.com/questions/370692/how-to-change-the-framerate-of-a-video-without-reencoding
sudo apt-get install -y gpac
MP4Box -add SourceMovie.mp4#video -raw 1 -new test
MP4Box -add test_track1.h264:fps=30 -new DestMovie.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment