Skip to content

Instantly share code, notes, and snippets.

@victor-torres
Created October 25, 2017 20:17
Show Gist options
  • Select an option

  • Save victor-torres/eaed025745c4f400461175c9b34be80d to your computer and use it in GitHub Desktop.

Select an option

Save victor-torres/eaed025745c4f400461175c9b34be80d to your computer and use it in GitHub Desktop.

Revisions

  1. victor-torres created this gist Oct 25, 2017.
    6 changes: 6 additions & 0 deletions compress_gopro_videos.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    # Convert and compress GoPro videos to reduce file size keeping regular quality
    # Run in the same directory as the original files
    # Output is MP4 H.264
    # Be awere that convertions may take several minutes or even hours!
    # I do recommend to run with small sets of video files for each iteraction
    time find . -type f -name "G*PR*.MP4" -exec handbrakecli -i {} -o /<dest dir>/{} -e x264 -x "level=4.0:vbv-maxrate=20000:weightp=1:vbv-bufsize=25000:ref=1:8x8dct=0:subme=2:mixed-refs=0:trellis=0:rc-lookahead=10" \;