LAPINPT

Movie split FAT32 size limit

Dec 25th, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.38 KB | None | 0 0
  1. ffmpeg -i "SOURCE.mkv" -map 0:v:0 -map 0:a:0 -c:v copy -ac 2 -clev 2dB -slev -3dB -c:a libfdk_aac -b:a 192k "TARGET-temp.mp4"
  2.  
  3. fSIZE=$(du -k "TARGET-temp.mp4" | awk '{print $1}')
  4.  
  5. if [ $fSIZE -ge 4194303 ]; then
  6.     SpliT=$(( ( $fSIZE / 2 ) + 51200 ))
  7.     [ $fSIZE -ge 8388606 ] && SpliT=$(( $SpliT / 2 ))
  8.     MP4Box -new -add "TARGET-temp.mp4" -splits $SpliT "TARGET.mp4"
  9. fi
Add Comment
Please, Sign In to add comment