diff --git a/to_vp9/README.md b/to_vp9/README.md index 46585dc..6992a41 100644 --- a/to_vp9/README.md +++ b/to_vp9/README.md @@ -9,7 +9,7 @@ If used on containers with subtitles or audiostreams, this skript will only conv ## Flags ```-e``` defines the extension of the files that should be converted
-```-d``` deletes original files after conversion (not implemented)
+```-d``` deletes original files after conversion
```-h``` show help (not implemented) ## Examples diff --git a/to_vp9/to_vp9.sh b/to_vp9/to_vp9.sh index a20e08d..4095132 100755 --- a/to_vp9/to_vp9.sh +++ b/to_vp9/to_vp9.sh @@ -72,13 +72,15 @@ for file in **/*.@($extension); do #there are problems with the -global_quality:v/-q:v settings only being able to make quality worse. Help is appreciated #not enough tested. So it is still experimental if [[ $encoder == "vp9_vaapi" ]]; then - ffmpeg -hide_banner -hwaccel vaapi -vaapi_device $gpu -i "$file" -map 0 -c copy -c:v vp9_vaapi -rc_mode CQP -bf 1 -bsf:v vp9_raw_reorder,vp9_superframe -vf 'hwupload' "$file_out" + ffmpeg -hide_banner -hwaccel vaapi -vaapi_device $gpu -i "$file" -map 0 -c copy -c:v vp9_vaapi -rc_mode CQP -bf 1 -bsf:v vp9_raw_reorder,vp9_superframe -vf 'hwupload' "$file_out" && + if [[ "$delete" = true ]]; then rm "$file"; fi fi #VP9_qsv #was not able to test it. So it is still experimental if [[ $encoder == "vp9_qsv" ]]; then - ffmpeg -hide_banner -hwaccel qsv -qsv_device $gpu -i "$file" -c:v vp9_qsv -vf 'hwupload' "${file%.*}.mkv" + ffmpeg -hide_banner -hwaccel qsv -qsv_device $gpu -i "$file" -c:v vp9_qsv -vf 'hwupload' "${file%.*}.mkv" && + if [[ "$delete" = true ]]; then rm "$file"; fi fi #libvpx-vp9