refined parsing
This commit is contained in:
parent
3488542308
commit
c50ccff6c4
2 changed files with 13 additions and 3 deletions
|
@ -2,9 +2,10 @@
|
||||||
|
|
||||||
for i in `fdfind video.mp4`; do
|
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
|
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" && \
|
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"
|
# && \ rm --verbose "$i" ; mv --verbose "${i}_30.mp4" "$i"
|
||||||
|
else
|
||||||
|
echo " << no edit for $i"
|
||||||
fi
|
fi
|
||||||
echo " << no edit for $i"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
9
scripts/server_bin/fps_cut_local.sh
Executable file
9
scripts/server_bin/fps_cut_local.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
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
|
Loading…
Add table
Add a link
Reference in a new issue