Wednesday, September 21, 2016

ffmpeg transcode bash example

#!/bin/sh
# [-map 0:... -map 0:...]
FFMPEG="${HOME}/ffmpeg-3.0.2/ffmpeg"
INPUT_FN="$1"
OUTPUT_FN="$2"
shift 2
time "$FFMPEG" -strict -2 -i "$INPUT_FN" "$@" -c:v nvenc_h264 -preset slow -b:v 2000k -ac 2 -c:a libmp3lame -b:a 128k -c:s  copy "$OUTPUT_FN"

Thursday, September 8, 2016

transcoding using nvenc ffmpeg

./ffmpeg -i /mnt/file.avi -c:v nvenc_h264 -preset slow -b:v 2000k -c:a libmp3lame testnvenc.mp4
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2.1) 20160413
  configuration: --enable-opencl --enable-opengl --enable-nvenc --enable-nonfree --prefix=/home/y/ --extra-cflags='-I /home/y/nvidia_video_sdk_6.0.1/Samples/common/inc' --enable-libmp3lame