fps purge process
This commit is contained in:
parent
3bb1d80b23
commit
f975d68bd9
3 changed files with 8 additions and 3 deletions
|
@ -3,9 +3,8 @@
|
|||
for i in `fdfind video.mp4`; do
|
||||
if [[ (( $(ffprobe -show_streams $i 2>&1 | grep fps | awk '{split($0,a,"fps")}END{print a[1]}' | awk '{print $NF}') > 30 )) ]]; then
|
||||
snap run ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i "$i" -c:a copy -c:v h264_nvenc -filter:v fps=30 "${i}_30.mp4"
|
||||
# && \ rm --verbose "$i" ; mv --verbose "${i}_30.mp4" "$i"
|
||||
else
|
||||
echo " << no edit for $i"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Dont forget to run the purge program! fps_purge.sh"
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
for i in `fdfind -d=1 --extension=mp4`; do
|
||||
if [[ (( $(ffprobe -show_streams "$i" 2>&1 | grep fps | awk '{split($0,a,"fps")}END{print a[1]}' | awk '{print $NF}') > 30 )) ]]; then
|
||||
snap run ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i "$i" -c:a copy -c:v h264_nvenc -filter:v fps=30 "${i}_30.mp4"
|
||||
# rm --verbose "$i" ; mv --verbose "${i}_30.mp4" "$i"
|
||||
else
|
||||
echo " << no edit for "$i""
|
||||
fi
|
||||
done
|
||||
echo "Dont forget to run the purge program! fps_purge.sh"
|
||||
|
|
6
scripts/server_bin/fps_purge.sh
Executable file
6
scripts/server_bin/fps_purge.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
for i in `fdfind _30.mp4`; do
|
||||
j=${i/_30.mp4/}
|
||||
rm --verbose "$j"
|
||||
mv --verbose "$i" "$j"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue