Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Last active June 27, 2017 06:56
Show Gist options
  • Select an option

  • Save xeoncross/5c25f4f4c2f064a13618ba5b691afbe8 to your computer and use it in GitHub Desktop.

Select an option

Save xeoncross/5c25f4f4c2f064a13618ba5b691afbe8 to your computer and use it in GitHub Desktop.
Convert a movie into a variety of sample formats (as in Planar and non-Planar "sampling" formats). Useful for testing.
ffmpeg -i MVI_2595.MOV -sample_fmt u8 mov_u8.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt s16 mov_s16.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt s32 mov_s32.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt flt mov_flt.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt dbl mov_dbl.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt u8p mov_u8p.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt s16p mov_s16p.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt s32p mov_s32p.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt fltp mov_fltp.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt dblp mov_dblp.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt s64 mov_s64.mp4
ffmpeg -i MVI_2595.MOV -sample_fmt s64p mov_s64p.mp4
list of sample formats: $ ffmpeg -v quiet -sample_fmts | tail -n +2
u8 8
s16 16
s32 32
flt 32
dbl 64
u8p 8
s16p 16
s32p 32
fltp 32
dblp 64
s64 64
s64p 64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment