if($video_stream_info =~ / (\d+x\d+)[,| ]/) { $dimensions = "$1"; }
     else { print "-W- ffprobe was unable to find dimensions for video: $video\n"; }
 
+    # Video Codec
+    my $video_stream_info = `$ffprobe "$video" 2>&1 | grep -e "Stream.*Video"`; chomp($video_stream_info);
+    my $video_codec = "unknown";
+    if($video_stream_info =~ / Video: (\S+) /) { $video_codec = "$1"; }
+    else { print "-W- ffprobe was unable to find video codec for video: $video\n"; }
+
     # Color space
     my $color_space = "unknown";
     if($video_stream_info =~ /, (\S+)\(.*?\)/) { $color_space = "$1"; }
     else { print "-W- ffprobe was unable to find audio codec for video: $video\n"; }
 
     # Now create our parameters string
-    my $parameters = "$dimensions.$color_space.$audio_handler.$audio_codec";
+    my $parameters = "$dimensions.$video_codec.$color_space.$audio_handler.$audio_codec";
     
     print "   Adding video $video to be merged into output video file: $opt_o.$parameters.mkv\n" if($opt_v);
     push @{$merge_videos{"$parameters"}}, $video;
 
 
     my $videos = join(',', @{$videos{$dstfile}});
     
-    if($dstfile =~ /(\d+)-(\d+)-(\d+)/) {
+    if($dstfile =~ /(\d+)-(\d+)-(\d+)$/) {
        $year = $1;
        $month = $2;
        $day = sprintf("%02d",$3);
 
 $merge_videos_by_day = "/naspool/videos/bin/merge_videos_by_day";
 
 # Flag to merge videos by modification date instead of the date parsed from the filename
-$merge_by_modification_date = 0;
+$merge_by_modification_date = 1;
 
 # Path to the make_mkv script
 $make_mkv = "/naspool/videos/bin/make_mkv";
 
 # Video file creation dates must not have changed in the last X minutes to process any of the video files
 # This is done to ensure that all videos from a given upload from a camera have completed prior to looking for videos to merge
-$minage = "+60";
+$minage = "+120";
 
 # What command should be used to find files that have changed (are at least $minage old) 
 $find_changed_cmd = "find  \"$srcpathname/\" -not -cmin $minage -a \\( $movie_file_ext \\)";