Ver código fonte

Merge branch 'master' of github.com:profplump/UberZach-Video

Zachary Kotlarek 9 anos atrás
pai
commit
1831228742
2 arquivos alterados com 10 adições e 6 exclusões
  1. 2 2
      encode.pl
  2. 8 4
      findRecode.sh

+ 2 - 2
encode.pl

@@ -37,13 +37,13 @@ my $MIN_VIDEO_WIDTH = 100;
 my $MAX_CROP_DIFF   = .1;
 my $MAX_DURA_DIFF   = 5;
 my $NO_CROP         = 0;
-my @CODEC_ORDER     = ('DTS-HD', 'FLAC', 'DTS', 'AC3', 'PCM', 'VORBIS', $MIXDOWN_CODEC, 'OTHER');
+my @CODEC_ORDER     = ('DTS-HD', 'FLAC', 'DTS', 'E-AC3', 'AC3', 'PCM', 'VORBIS', $MIXDOWN_CODEC, 'OTHER');
 my $HB_EXEC         = $ENV{'HOME'} . '/bin/video/HandBrakeCLI';
 my $DEBUG           = 0;
 
 # General parameters for HandBrake
 my @video_params = ('--markers', '--optimize', '--detelecine', '--decomb', '--auto-anamorphic');
-my @audio_params = ('--audio-copy-mask', 'dtshd,dts,ac3,aac', '--audio-fallback', 'ffac3');
+my @audio_params = ('--audio-copy-mask', 'dtshd,dts,eac3,ac3,aac', '--audio-fallback', 'ffac3');
 
 # Use CoreAudio where available
 my ($OS) = POSIX::uname();

+ 8 - 4
findRecode.sh

@@ -75,16 +75,20 @@ for i in ${FILES}; do
 		continue
 	fi
 
-	# Find the x264 header, if present. Scan deeper if the fast scan fails.
+	# Find the x264/Nx265 header, if present. Scan deeper if the fast scan fails.
 	STRINGS="`head -c $(( $SCAN_DEPTH_FAST * 1024 * 1024 )) "${i}" | strings -n 100`"
-	if ! echo "${STRINGS}" | grep -Eq '^x264 - core'; then
+	if ! echo "${STRINGS}" | grep -Eq '^(x264|Nx265)'; then
 		STRINGS="`head -c $(( $SCAN_DEPTH_SLOW * 1024 * 1024 )) "${i}" | strings -n 100`"
 	fi
 
 	# Check for our particular HandBrake parameters
 	HANDBRAKE=0
-	if echo "${STRINGS}" | grep -E '^x264 - core (79|112|120|125|129|130|142)' | grep -Eq 'crf=2[0-5]\.[0-9]'; then
-		HANDBRAKE=1
+	if echo "${STRINGS}" | grep -Eq 'crf=2[0-5]\.[0-9]'; then
+		if echo "${STRINGS}" | grep -Eq '^x264 - core (79|112|120|125|129|130|142)'; then
+			HANDBRAKE=1
+		elif echo "${STRINGS}" | grep -Eq '^Nx265 \(build 95\)'; then
+			HANDBRAKE=1
+		fi
 	elif echo "${STRINGS}" | grep -q HandBrake; then
 		echo "Matched literal 'HandBrake': ${i}" 1>&2
 		HANDBRAKE=1