Skip to content

Commit

Permalink
Merge pull request #327 from mediamicroservices/broadcast-range
Browse files Browse the repository at this point in the history
Broadcast range
  • Loading branch information
dericed authored Sep 9, 2024
2 parents 811cb82 + 76a8a5c commit 3681e07
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions makederiv
Original file line number Diff line number Diff line change
Expand Up @@ -442,62 +442,52 @@ while [[ "${@}" != "" ]] ; do
_add_video_filter "fieldorder=tff"
if [ "${FORMULA}" = "hds" ] ; then
_add_video_filter "scale=size=hd1080:interl=1"
_add_video_filter "setsar=1/1"
_add_video_filter "setdar=16/9"
_add_video_filter "fps=fps=ntsc"
MIDDLEOPTIONS+=("${MIDDLEOPTIONSXDCAM[@]}")
elif [ "${FORMULA}" = "sds" ] ; then
_add_video_filter "scale=720:480"
_add_video_filter "pad=720:512:0:24"
_add_video_filter "setsar=1/1"
_add_video_filter "setdar=4/3"
MIDDLEOPTIONS+=("${MIDDLEOPTIONSIMX[@]}")
elif [ "${DARRATIO}" = "1.777" -a ! "${CROPDETECT}" = "Y" ] ; then
_add_video_filter "scale=size=hd1080:interl=1"
_add_video_filter "setsar=1/1"
_add_video_filter "setdar=16/9"
_add_video_filter "fps=fps=ntsc"
MIDDLEOPTIONS+=("${MIDDLEOPTIONSXDCAM[@]}")
elif [ $(echo "scale=3 ; ${DARRATIO} > (16/9)" | bc -l) = 1 ] ; then
_add_video_filter "scale=size=hd1080:interl=1:force_original_aspect_ratio=decrease"
_add_video_filter "pad=1920:1080:(ow-iw)/2:(oh-ih)/2"
_add_video_filter "setsar=1/1"
_add_video_filter "setdar=16/9"
_add_video_filter "fps=fps=ntsc"
MIDDLEOPTIONS+=("${MIDDLEOPTIONSXDCAM[@]}")
elif [ $(echo "scale=3 ; $DARRATIO > (3/2)" | bc -l) = 1 -o "${ADDSLATE}" = "Y" ] ; then
_add_video_filter "scale=size=hd1080:interl=1:force_original_aspect_ratio=decrease"
_add_video_filter "pad=1920:1080:(ow-iw)/2:(oh-ih)/2"
_add_video_filter "setsar=1/1"
_add_video_filter "setdar=16/9"
_add_video_filter "fps=fps=ntsc"
MIDDLEOPTIONS+=("${MIDDLEOPTIONSXDCAM[@]}")
elif [ "${WIDTH}" = "720" -a "${HEIGHT}" = "480" -a $(echo "scale=3 ; ${DARRATIO} < (3/2)" | bc -l) = 1 -a ! "${CROPDETECT}" = "Y" ] ; then
_add_video_filter "scale=720:480"
_add_video_filter "pad=720:512:0:24"
_add_video_filter "setsar=1/1"
_add_video_filter "setdar=4/3"
MIDDLEOPTIONS+=("${MIDDLEOPTIONSIMX[@]}")
elif [ "${HEIGHT}" -eq "486" -a "${WIDTH}" -eq "720" ] ; then
_add_video_filter "crop=720:484:0:0"
_add_video_filter "pad=720:512:0:28"
_add_video_filter "setsar=1/1"
_add_video_filter "setdar=4/3"
MIDDLEOPTIONS+=("${MIDDLEOPTIONSIMX[@]}")
elif [ "${HEIGHT}" -eq "512" -a "${WIDTH}" -eq "720" ] ;then
_add_video_filter "setsar=1/1"
_add_video_filter "setdar=4/3"
MIDDLEOPTIONS+=("${MIDDLEOPTIONSIMX[@]}")
else
_add_video_filter "scale=720:480"
_add_video_filter "pad=720:512:0:24"
_add_video_filter "setsar=1/1"
_add_video_filter "setdar=4/3"
MIDDLEOPTIONS+=("${MIDDLEOPTIONSIMX[@]}")
fi
_add_video_filter "format=yuv422p"
_add_video_filter "lut=y=if(gt(val\,235)\,235\,val):u=if(gt(val\,235)\,235\,val):v=if(gt(val\,235)\,235\,val)"
_add_video_filter "lut=y=if(lt(val\,16)\,16\,val):u=if(lt(val\,16)\,16\,val):v=if(lt(val\,16)\,16\,val)"
_add_video_filter "lutyuv=clipval"
elif [[ "${OUTPUT_TYPE}" == "broadcast_copy" ]] ; then
MIDDLEOPTIONS+=(-map 0:v)
MIDDLEOPTIONS+=(-c:v copy)
Expand Down

0 comments on commit 3681e07

Please sign in to comment.