changed folder structure
This commit is contained in:
parent
2019a4c62f
commit
f197ac9dde
3 changed files with 57 additions and 1 deletions
36
to_opus/README.md
Normal file
36
to_opus/README.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# to_vp9
|
||||
This Script is unfinished and not usable.
|
||||
|
||||
# to_opus
|
||||
converting all audiostreams in all files with given file extension in your current working directory and all subdirectories to opus.
|
||||
The Script will choose an automatic bitrate for every audiostream dependent on the number of channels and the original bitrate.
|
||||
See https://wiki.xiph.org/Opus_Recommended_Settings for more information about this.
|
||||
|
||||
If used on containers with video- or multiple audiostreams, this skript will only convert the audiostream and copy all streams in a Matroska container.
|
||||
|
||||
### Flags
|
||||
```-e``` defines the extension of the files that should be converted<br>
|
||||
```-d``` deletes original files after conversion<br>
|
||||
```-h``` show help (not implemented)
|
||||
|
||||
### Examples
|
||||
|
||||
convert all files to opus<br>
|
||||
```bash to_opus.sh -e "*"```
|
||||
|
||||
convert all files with .mp3-extension and .flac-extension to opus and deletes original files after that<br>
|
||||
```bash to_opus.sh -e mp3 -e flac```
|
||||
|
||||
convert the audiostream of an movie<br>
|
||||
```bash to_opus.sh -e mp4```
|
||||
|
||||
### Dependencies
|
||||
- ffmpeg
|
||||
- Bash 4^
|
||||
|
||||
### Why opus?
|
||||
|
||||
Opus is an open format and royalty free. It is FOSS.
|
||||
It is supported on most platforms and has a better quality per bitrate then formats like mp3 or Vorbis.
|
||||
|
||||
![Opus Quality comparison with other formats](https://upload.wikimedia.org/wikipedia/commons/0/01/Opus_quality_comparison.svg)
|
0
to_opus.sh → to_opus/to_opus.sh
Normal file → Executable file
0
to_opus.sh → to_opus/to_opus.sh
Normal file → Executable file
22
to_vp9.sh → to_vp9/to_vp9.sh
Normal file → Executable file
22
to_vp9.sh → to_vp9/to_vp9.sh
Normal file → Executable file
|
@ -44,10 +44,12 @@ while :; do
|
|||
encoder=$(echo ${encoders[$encoder]} | awk '{print $2}')
|
||||
break
|
||||
else
|
||||
echo "number out of range, try again"
|
||||
echo "Not a valid encoder, try again"
|
||||
fi
|
||||
done
|
||||
|
||||
# Choose an GPU, if encoder is GPU accelerated
|
||||
|
||||
# write array into string
|
||||
extension="${extension[*]}"
|
||||
# change separator
|
||||
|
@ -55,4 +57,22 @@ extension=${extension// /|}
|
|||
|
||||
for file in **/*.@($extension); do
|
||||
echo $encoder
|
||||
|
||||
#https://wiki.archlinux.org/title/Hardware_video_acceleration
|
||||
|
||||
#VP9_vaapi
|
||||
#Hardware video acceleration enabled
|
||||
#https://ffmpeg.org/ffmpeg-all.html#VAAPI-encoders
|
||||
#https://trac.ffmpeg.org/wiki/Hardware/VAAPI
|
||||
#ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD129 -i "$file" -map 0 -c copy -c:v vp9_vaapi -rc_mode CQP -look_ahead 1 -bf 2 -bsf:v vp9_raw_reorder,vp9_superframe -compression_level 0 -vf 'hwupload' Der\ VornameCqpLA.mkv
|
||||
|
||||
#VP9_qsv
|
||||
#--enable-libmfx or --enable-libvpl and Hardware video acceleration enabled
|
||||
#libvpl vs. libmfx: https://www.intel.com/content/www/us/en/developer/articles/technical/onevpl-in-ffmpeg-for-great-streaming-on-intel-gpus.html
|
||||
#https://ffmpeg.org/ffmpeg-codecs.html
|
||||
#https://trac.ffmpeg.org/wiki/Hardware/QuickSync
|
||||
#https://www.intel.com/content/www/us/en/developer/articles/technical/common-bitrate-control-methods-in-intel-media-sdk.html
|
||||
#https://www.intel.com/content/www/us/en/developer/articles/technical/advanced-bitrate-control-methods-in-intel-media-sdk.html
|
||||
#ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD129 -i "$file" -c:v av1_qsv -vf 'hwupload' output.mkv
|
||||
|
||||
done
|
Loading…
Reference in a new issue