Projects
Multimedia
ffhevc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 150
View file
ffhevc-3.8.8.tar.gz/ffhevc
Changed
@@ -479,6 +479,8 @@ vidmap="-map 0:0" fi +vidtrack="$(echo "$vidmap" | awk '{print $2}' | awk -F: '{print $2}')" + if [ ! -z "$batchmode" ]; then OUTPUT="$OUTDIR/$(basename $0)_$$" printf "Specify the Output Directory [default is $OUTPUT]: " @@ -830,7 +832,7 @@ # Used by mc/bobbing deinterlace and FPS conversion video_fps_func() { - GETFPS="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=r_frame_rate -of default=noprint_wrappers=1:nokey=1 | tail -1)" + GETFPS="$($FFPROBE -i "$input" -v quiet -select_streams v:$vidtrack -show_entries stream=r_frame_rate -of default=noprint_wrappers=1:nokey=1 | tail -1)" } # Used by mc/bobbing deinterlace, IVTC and interlace-aware encoding @@ -838,7 +840,7 @@ echo green "-> Detecting Field Parity..." sleep 1 - FPAR="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=field_order -of default=noprint_wrappers=1:nokey=1 | tail -1)" + FPAR="$($FFPROBE -i "$input" -v quiet -select_streams v:$vidtrack -show_entries stream=field_order -of default=noprint_wrappers=1:nokey=1 | tail -1)" case "$FPAR" in t*|T*) fp="tff"; fparity="Top Field First (TFF)" ;; b*|B*) fp="bff"; fparity="Bottom Field First (BFF)" ;; @@ -972,7 +974,7 @@ sleep 1 case "$1" in pixfmt) - PIXFMT="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=pix_fmt -of default=noprint_wrappers=1:nokey=1 | tail -1 | tr '[a-z]' '[A-Z]')" + PIXFMT="$($FFPROBE -i "$input" -v quiet -select_streams v:$vidtrack -show_entries stream=pix_fmt -of default=noprint_wrappers=1:nokey=1 | tail -1 | tr '[a-z]' '[A-Z]')" green "-> Detected $PIXFMT" ;; vchars) @@ -985,7 +987,7 @@ 5) char[i]="pix_fmt" ;; 6) char[i]="bits_per_raw_sample" ;; esac - VCHARS[i]="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=${char[i]} -of default=noprint_wrappers=1:nokey=1 | tail -1)" + VCHARS[i]="$($FFPROBE -i "$input" -v quiet -select_streams v:$vidtrack -show_entries stream=${char[i]} -of default=noprint_wrappers=1:nokey=1 | tail -1)" done to_upper() { echo "$1" | tr '[a-z]' '[A-Z]' @@ -1410,7 +1412,7 @@ echo green "-> Scanning for HDR Side Data..." HDRFILE="$OUTDIR/hdr_sd_$$" - $FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries side_data -read_intervals %+1 > "$HDRFILE" + $FFPROBE -i "$input" -v quiet -select_streams v:$vidtrack -show_entries side_data -read_intervals %+1 > "$HDRFILE" sdarray=([0]=green_x [1]=green_y [2]=blue_x [3]=blue_y [4]=red_x [5]=red_y [6]=white_point_x [7]=white_point_y [8]=min_luminance [9]=max_luminance [10]=max_content [11]=max_average) for i in {0..11}; do @@ -1465,7 +1467,7 @@ echo hdr_sd_func() { echo " HDRFILE=\"$(dirname "$OUTPUT")/hdr_sd_$$\"" - echo " $FFPROBE -i \"\$i\" -v quiet -select_streams v:0 -show_entries side_data -read_intervals %+1 > \"\$HDRFILE\"" + echo " $FFPROBE -i \"\$i\" -v quiet -select_streams v:$vidtrack -show_entries side_data -read_intervals %+1 > \"\$HDRFILE\"" echo " sdarray=([0]=green_x [1]=green_y [2]=blue_x [3]=blue_y [4]=red_x [5]=red_y [6]=white_point_x [7]=white_point_y [8]=min_luminance [9]=max_luminance [10]=max_content [11]=max_average)" echo " for sd in {0..11}; do" echo " hdrsd[sd]=\"\$(grep \"^\${sdarray[sd]}\" \"\$HDRFILE\" | tail -1 | awk -F= '{print \$2}' | awk -F/ '{print \$1}')\"" @@ -1487,8 +1489,8 @@ # calc for target file size video_length_func() { case "$1" in - file) VLENGTH="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | tail -1 | awk -F. '{print $1}')" ;; - batch) echo "VLENGTH=\"\$($FFPROBE -i \"\$i\" -v quiet -select_streams v:$(echo "$vidmap" | awk '{print $2}' | awk -F: '{print $2}') -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | tail -1 | awk -F. '{print \$1}')\"" ;; + file) VLENGTH="$($FFPROBE -i "$input" -v quiet -select_streams v:$vidtrack -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | tail -1 | awk -F. '{print $1}')" ;; + batch) echo "VLENGTH=\"\$($FFPROBE -i \"\$i\" -v quiet -select_streams v:$vidtrack -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | tail -1 | awk -F. '{print \$1}')\"" ;; esac } @@ -1566,8 +1568,8 @@ echo green "-> Detecting video resolution..." sleep 1 - WIDTH="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 | tail -1)" - HEIGHT="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=height -of default=noprint_wrappers=1:nokey=1 | tail -1)" + WIDTH="$($FFPROBE -i "$input" -v quiet -select_streams v:$vidtrack -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 | tail -1)" + HEIGHT="$($FFPROBE -i "$input" -v quiet -select_streams v:$vidtrack -show_entries stream=height -of default=noprint_wrappers=1:nokey=1 | tail -1)" if [ ! -z "$crop" ]; then green "-> Original resolution: ${WIDTH}x${HEIGHT}" if [ -z "$batchmode" ]; then
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.