VIDEO LINES MAX IS 720p

This commit is contained in:
fred 2023-01-01 23:35:19 +01:00
parent f6e8962f32
commit 18de36cb17
2 changed files with 16 additions and 3 deletions

View File

@ -55,7 +55,7 @@ header {
<br>
<input type='hidden' name='salt' value='0'></br></br>
<input type='hidden' name='pepper' value='0'></br></br>
<h2><span>ENREGISTREZ VOS VIDEOS FAVORITES</span></h2><input type="hidden" name=g1pub value='https://www.youtube.com/playlist?list=LL'></br>
<h2><span>Partagez vos vidéos favorites, et bien plus encore...</span></h2><input type="hidden" name=g1pub value='https://www.youtube.com/playlist?list=LL'></br>
<span>Email : </span><input name=email value=''></br></br>
<input type='submit' value='[(♥‿‿♥)]'>
</form>
@ -75,11 +75,11 @@ header {
<div class="row justify-center">
<h1 class="video-title">
<center>
<a href="https://twitch.com/zicmama" target="twitch">COCODING TWITCH TW</a><br><br>
<a href="https://twitch.com/zicmama" target="twitch">Ğ1 COCODING sur TWITCH</a><br><br>
<a href="https://astroport.com">Astroport.ONE</a>
<a href="https://opencollective.com/monnaie-libre/projects/coeurbox" target="funding">- ♥BOX Edition - </a>
<a href="https://olympe.network">Olympe.Network</a><br>
</center>
</center>
<a target="gchange" href="https://gchange.fr">Recopiez les vidéos que vous aimez dans les capsules de votre TW!
<br>Une fois votre G1Visa obtenu, direction https://gchange.fr !</a>
</h1>

View File

@ -14,6 +14,16 @@ MIME=$(file --mime-type -b "${path}${file}")
FILE_RES=$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "${path}${file}" | cut -d "x" -f 2)
RES=${FILE_RES%?}0p
#################################################################################################################
############# VIDEO LINES MAX IS 720p
LINES=$(echo $RES | tr -dc '0-9')
[ $LINES -gt 720 ] \
&& ffmpeg -loglevel quiet -i "${path}${file}" -vf "scale=iw/2:ih/2" "${path}2${file}" \
&& [[ -s "${path}2${file}" ]] && rm "${path}${file}" && mv "${path}2${file}" "${path}${file}" \
&& echo "VIDEO RESIZED" \
&& FILE_RES=$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "${path}${file}" | cut -d "x" -f 2) && RES=${FILE_RES%?}0p
#################################################################################################################
FILE_BSIZE=$(du -b "${path}${file}" | awk '{print $1}')
DURATION=$(ffprobe -v error -i "${path}${file}" -show_entries format=duration -v quiet -of csv="p=0" | cut -d '.' -f 1)
@ -25,6 +35,9 @@ PROBETIME=$(echo "0.618 * $DURATION" | bc -l | cut -d '.' -f 1)
## How many seconds are encoded by Mo ?
VTRATIO=$(echo "$DURATION / $FILE_BSIZE * 1024 * 1024" | bc -l | xargs printf "%.2f")
## CREATE SOME INDEX HOOKS
# ffmpeg -skip_frame nokey -i ${path}${file} -vsync 0 -r 30 -f image2 thumbnails-%02d.jpeg