Compare commits

..

4 Commits

Author SHA1 Message Date
ea9a77a14a Neue Wallpapers 3840x1600 2022-03-08 16:09:34 +01:00
da7c0123fd Fixing Errors 2022-02-03 00:37:52 +01:00
943309a8de workaround trace 2022-02-02 22:54:08 +01:00
16ea482323 Batchconvert 2022-02-02 18:00:05 +01:00
4 changed files with 207 additions and 2 deletions

View File

@ -0,0 +1,110 @@
#!/bin/bash
GPU=nv #Which Hardware to use? nv = nvidia, amd = amdgpu; intel = intel qsv; cpu = CPU encoding
BASEFOLDER_SOURCE="/path/to/source"
BASEFOLDER_DESTIN="/path/to/destination"
FOLDERS_TO_SCAN=(
"Folder"
"Folder 2"
"Also a Folder"
)
#---------- DO NOT EDIT BELOW HERE EXCEPT YOU KNOW WHAT YOU ARE DOING ----------
BFSL=$(expr length ${BASEFOLDER_SOURCE})
BFSL=$((BFSL + 1))
ffmpeg_input_opts_amd=(
-init_hw_device vaapi=amdgpu:/dev/dri/renderD128
-hwaccel vaapi
-hwaccel_output_format vaapi
-hwaccel_device amdgpu
-nostdin
-stats
)
ffmpeg_output_opts_amd=(
-vaapi_device /dev/dri/renderD128
-map 0
-c:v hevc_vaapi
-c:a copy
-c:s copy
-vtag hvc1
)
ffmpeg_input_opts_nv=(
-nostdin
-stats
)
ffmpeg_output_opts_nv=(
-map 0
-c:s copy
-c:a copy
-c:v hevc_nvenc
)
ffmpeg_input_opts_intel=(
-hwaccel qsv
-nostdin
-stats
)
ffmpeg_output_opts_intel=(
-map 0
-c:v hevc_qsv
-c:a copy
-c:s copy
)
ffmpeg_input_opts_cpu=(
-nostdin
-stats
)
ffmpeg_output_opts_cpu=(
-map 0
-c:v libx265
-c:a copy
-c:s copy
)
for i in "${FOLDERS_TO_SCAN[@]}"; do
find ${BASEFOLDER_SOURCE}/"${i}" -type f >temp.txt
while IFS= read -r LINE; do
SPATH=$(dirname "${LINE}")
DPATH="${BASEFOLDER_DESTIN}$(cut -c${BFSL}- <<<${SPATH})"
FILE="$(basename "${LINE}")"
if [ ! -d "${DPATH}" ]; then mkdir -p "${DPATH}"; fi
case ${GPU} in
nv)
echo -n "Using nVidia cuda"
echo "Encoding file ${FILE}"
ffmpeg ${ffmpeg_input_opts_nv[@]} -i "${SPATH}/${FILE}" ${ffmpeg_output_opts_nv[@]} "${DPATH}/${FILE}"
echo -e "------------------\n\n"
;;
amd)
echo -n "using AMDGPU"
echo "Encoding file ${FILE}"
ffmpeg ${ffmpeg_input_opts_amd[@]} -i "${SPATH}/${FILE}" ${ffmpeg_output_opts_amd[@]} "${DPATH}/${FILE}"
echo -e "------------------\n\n"
;;
intel)
echo -n "Using Intel QSV"
echo "Encoding file ${FILE}"
ffmpeg ${ffmpeg_input_opts_intel[@]} -i "${SPATH}/${FILE}" ${ffmpeg_output_opts_intel[@]} "${DPATH}/${FILE}"
echo -e "------------------\n\n"
;;
*)
echo -n "Using CPU encoding"
;;
echo -n "Using CPU"
echo "Encoding file ${FILE}"
ffmpeg ${ffmpeg_input_opts_cpu[@]} -i "${SPATH}/${FILE}" ${ffmpeg_output_opts_cpu[@]} "${DPATH}/${FILE}"
echo -e "------------------\n\n"
esac
done < temp.txt
rm temp.txt
done

View File

@ -0,0 +1,83 @@
https://pics.jhml.de/images/2022/03/08/a_male_lion_sleeping_on_its_back-wallpaper-3840x160091bc1ef0b3e2cc95.jpg
https://pics.jhml.de/images/2022/03/08/adorable_snow_leopard_cubs_wild_animals-wallpaper-3840x1600a1817228ce72373f.jpg
https://pics.jhml.de/images/2022/03/08/african_young_male_lion-wallpaper-3840x16000deea3d0cce0817b.jpg
https://pics.jhml.de/images/2022/03/08/alaska_range_beautiful_mountain_landscape-wallpaper-3840x1600ca64db50c81cfcc7.jpg
https://pics.jhml.de/images/2022/03/08/amazing_space_2-wallpaper-3840x160036beb1faa519eef9.jpg
https://pics.jhml.de/images/2022/03/08/arch_linux_glass_logo-wallpaper-3840x1600379e5045ed0132ac.jpg
https://pics.jhml.de/images/2022/03/08/armenia_khustup_k13_annihilation_hayk-wallpaper-3840x16005b6d09145dec2115.jpg
https://pics.jhml.de/images/2022/03/08/armenia_syunik_khustup_k7_hayk-wallpaper-3840x1600611985b1a736b004.jpg
https://pics.jhml.de/images/2022/03/08/autumn_trees_forest_path-wallpaper-3840x160051ff7134864e23b3.jpg
https://pics.jhml.de/images/2022/03/08/bad_wolf-wallpaper-3840x1600e9ed8af8a072cf8f.jpg
https://pics.jhml.de/images/2022/03/08/bamboo_forest_kyoto_japan-wallpaper-3840x1600c20cb9fbf1e7af8f.jpg
https://pics.jhml.de/images/2022/03/08/beast_2-wallpaper-3840x1600b29807798d4a36f8.jpg
https://pics.jhml.de/images/2022/03/08/beautiful_autumn_landscape_4-wallpaper-3840x1600bb39ee5503386788.jpg
https://pics.jhml.de/images/2022/03/08/beautiful_autumn_scenery_2-wallpaper-3840x16006f9d17a0815c5cd6.jpg
https://pics.jhml.de/images/2022/03/08/beautiful_autumn_scenery_gorges_de_la_jogne_switzerland-wallpaper-3840x1600d9b8f2b6a53556b1.jpg
https://pics.jhml.de/images/2022/03/08/beautiful_lion_4-wallpaper-3840x1600bb8c963fd6686589.jpg
https://pics.jhml.de/images/2022/03/08/beautiful_moon_in_the_sky-wallpaper-3840x1600c22847a0dffe4294.jpg
https://pics.jhml.de/images/2022/03/08/beautiful_snow_leopard_wild_animal_snowflakes_winter-wallpaper-3840x160095b2606f56b25bbd.jpg
https://pics.jhml.de/images/2022/03/08/beautiful_spring_nature_background-wallpaper-3840x1600b6b78bfc62c07e48.jpg
https://pics.jhml.de/images/2022/03/08/cat_108-wallpaper-3840x16003db295d7f4cbf718.jpg
https://pics.jhml.de/images/2022/03/08/cheetah_cubs_running-wallpaper-3840x16003aa2bd0a69ce6994.jpg
https://pics.jhml.de/images/2022/03/08/clouded_leopard-wallpaper-3840x1600b09714a0d312db57.jpg
https://pics.jhml.de/images/2022/03/08/coding-wallpaper-3840x16007919820819b52568.jpg
https://pics.jhml.de/images/2022/03/08/cool_lion-wallpaper-3840x16005180daaf1eed9c52.jpg
https://pics.jhml.de/images/2022/03/08/cute_red_panda-wallpaper-3840x16004c571d90ae9d62a8.jpg
https://pics.jhml.de/images/2022/03/08/cute_snow_leopard_cubs_wild_animals-wallpaper-3840x1600b4eedc5074f28564.jpg
https://pics.jhml.de/images/2022/03/08/dark_hedges_beech_trees_northern_ireland-wallpaper-3840x16007ba93acb9cdcb25d.jpg
https://pics.jhml.de/images/2022/03/08/devil_s_bridge-wallpaper-3840x1600666c4b2d9fa19f0a.jpg
https://pics.jhml.de/images/2022/03/08/dragon_fantasy_art-wallpaper-3840x160050a4f30ae1d796c1.jpg
https://pics.jhml.de/images/2022/03/08/earth_4k-wallpaper-3840x16004af5f224c76ad00e.jpg
https://pics.jhml.de/images/2022/03/08/earth_sunrise_from_space-wallpaper-3840x16001f0c4916e6f106a3.jpg
https://pics.jhml.de/images/2022/03/08/fall_autumn_colors_travel_road_trees_foliage-wallpaper-3840x1600f404acbf1b355711.jpg
https://pics.jhml.de/images/2022/03/08/fallout_vault_boy_2-wallpaper-3840x1600f15441afb0465acc.jpg
https://pics.jhml.de/images/2022/03/08/green_code-wallpaper-5120x21600db060c63f4e25b0.jpg
https://pics.jhml.de/images/2022/03/08/green_coneflowers-wallpaper-3840x1600fbe56f660336be96.jpg
https://pics.jhml.de/images/2022/03/08/green_matrix_code_world_map-wallpaper-3840x1600cb4e5ce4e2f0ea95.jpg
https://pics.jhml.de/images/2022/03/08/hand_of_fire-wallpaper-3840x160039b83e5287709187.jpg
https://pics.jhml.de/images/2022/03/08/high_mountain_lynx-wallpaper-3840x16000e25dcad4ac0ff2b.jpg
https://pics.jhml.de/images/2022/03/08/horizon_zero_dawn_2017_video_game-wallpaper-3840x160046e09acbae052bed.jpg
https://pics.jhml.de/images/2022/03/08/kehnwa_plane-wallpaper-3840x16001858150c9e3c6c1e.jpg
https://pics.jhml.de/images/2022/03/08/leopard_17-wallpaper-3840x160061364ac73aab5bc2.jpg
https://pics.jhml.de/images/2022/03/08/lion_46-wallpaper-3840x16005355ab30609275f0.jpg
https://pics.jhml.de/images/2022/03/08/lion_black_and_white_2-wallpaper-3840x1600befb56b6f672d0b2.jpg
https://pics.jhml.de/images/2022/03/08/lion_face_male-wallpaper-3840x1600026ce41a1d01ae2d.jpg
https://pics.jhml.de/images/2022/03/08/lion_king_2-wallpaper-3840x16007991cb3a21c14563.jpg
https://pics.jhml.de/images/2022/03/08/love_10-wallpaper-3840x1600d29bd7d0f1cc149b.jpg
https://pics.jhml.de/images/2022/03/08/mass_effect_andromeda_video_game_fan_art-wallpaper-3840x1600480dcea9b0d00df7.jpg
https://pics.jhml.de/images/2022/03/08/mountains_lofoten_islands_norway-wallpaper-3840x1600f4b707a114d1abcf.jpg
https://pics.jhml.de/images/2022/03/08/neeko_lol_league_of_legends-wallpaper-3840x16005e6733bfd2e90249.jpg
https://pics.jhml.de/images/2022/03/08/nice_illustration-wallpaper-3840x1600a6852be1e10cc330.jpg
https://pics.jhml.de/images/2022/03/08/path_forest_bluebells_spring-wallpaper-3840x1600efacdbdb718fcd79.jpg
https://pics.jhml.de/images/2022/03/08/photo_2022-03-07_19-28-456a5982275fd09a39.jpg
https://pics.jhml.de/images/2022/03/08/pixels_art-wallpaper-3840x1600664922af3a1dd362.jpg
https://pics.jhml.de/images/2022/03/08/red_fox_cold_weather_winter-wallpaper-3840x16004995f21fc9fc1e33.jpg
https://pics.jhml.de/images/2022/03/08/red_panda_2-wallpaper-3840x160032aaa8e2d1ee807f.jpg
https://pics.jhml.de/images/2022/03/08/relaxing_tiger-wallpaper-3840x1600c0b32dc64a395a15.jpg
https://pics.jhml.de/images/2022/03/08/ring_tailed_lemur_2-wallpaper-3840x160095e35b63a3f06c07.jpg
https://pics.jhml.de/images/2022/03/08/road_aspens_trees_in_colorado_summer-wallpaper-3840x1600b7753382faf1710e.jpg
https://pics.jhml.de/images/2022/03/08/servers_room-wallpaper-3840x1600e78da2633b74a017.jpg
https://pics.jhml.de/images/2022/03/08/siberian_tiger-wallpaper-3840x1600fb3d01551ce43cb6.jpg
https://pics.jhml.de/images/2022/03/08/snow_fox_animal-wallpaper-3840x1600051f2da2e4a699e6.jpg
https://pics.jhml.de/images/2022/03/08/snow_leopard_11-wallpaper-3840x160054259fc3fb279b51.jpg
https://pics.jhml.de/images/2022/03/08/snow_leopard_wild_animal_on_the_stone-wallpaper-3840x1600efd1a673b46566e5.jpg
https://pics.jhml.de/images/2022/03/08/star_horizon-wallpaper-3840x1600f50445fd896f5a54.jpg
https://pics.jhml.de/images/2022/03/08/the_batman_2021_robert_pattinson-wallpaper-3840x160084361a033edc08d3.jpg
https://pics.jhml.de/images/2022/03/08/the_lion_king_2019_5k-wallpaper-3840x16000a96259bc9fefaf5.jpg
https://pics.jhml.de/images/2022/03/08/the_lion_king_mufasa_simba-wallpaper-3840x1600fd4507ef14beb616.jpg
https://pics.jhml.de/images/2022/03/08/the_most_beautiful_road_in_the_world_2-wallpaper-3840x1600c28af450559918db.jpg
https://pics.jhml.de/images/2022/03/08/tiger_11-wallpaper-3840x16005a5a60b5a9233022.jpg
https://pics.jhml.de/images/2022/03/08/tiger_13-wallpaper-3840x1600b74f87f2831820d4.jpg
https://pics.jhml.de/images/2022/03/08/tiger_23-wallpaper-3840x160010bf465402e5bcca.jpg
https://pics.jhml.de/images/2022/03/08/tiger_51-wallpaper-3840x1600900f6e0001a9c5d0.jpg
https://pics.jhml.de/images/2022/03/08/tiger_drinking-wallpaper-3840x16009b4bc468bf72d39c.jpg
https://pics.jhml.de/images/2022/03/08/tigers_2-wallpaper-3840x1600b16fd38cfce0254f.jpg
https://pics.jhml.de/images/2022/03/08/undercover_cat-wallpaper-3840x1600a366abffc3100d7a.jpg
https://pics.jhml.de/images/2022/03/08/united_states_from_space-wallpaper-3840x1600aa5266dc189123b0.jpg
https://pics.jhml.de/images/2022/03/08/urban_night_5-wallpaper-3840x1600b6c1efe669c829ba.jpg
https://pics.jhml.de/images/2022/03/08/white_tiger_8-wallpaper-3840x1600be686616eafa7904.jpg
https://pics.jhml.de/images/2022/03/08/white_wolves_forest_autumn-wallpaper-3840x16003b2496e7ba075bc7.jpg
https://pics.jhml.de/images/2022/03/08/wild_tiger_animal-wallpaper-3840x1600536c8a6a5121a8c4.jpg
https://pics.jhml.de/images/2022/03/08/wolf_winter-wallpaper-3840x160099ef75d4017be221.jpg
https://pics.jhml.de/images/2022/03/08/young_tiger_animal-wallpaper-3840x160045ba59b896f649fe.jpg
https://pics.jhml.de/images/2022/03/08/ziva_maine_coon_cat-wallpaper-3840x16005da86f3291f4d68d.jpg

View File

@ -1,8 +1,10 @@
# Linux Scrips
Scripte zur automatisierung von Linux
Scripte zur Automatisierung von Linux
Dies ist eine samlung von halbfertigen, Quick&Dirty scripten..
Dies ist eine Sammlung von halbfertigen, Quick&Dirty Scripten...
Use at your own risk!
Sprachen:
- Bash
- Python

10
test.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
VARIABLES=("Deine Mudda" "path/to/heacehn" "/mimiu haha/ficköön")
for i in "${VARIABLES[@]}"; do
echo ${i}
echo ${i/'path/to'/nix} | cut -c5-
done