Skip to content

Instantly share code, notes, and snippets.

View tobiaspc's full-sized avatar

Tobi tobiaspc

  • Hochschule München
  • Munich
View GitHub Profile
@tobiaspc
tobiaspc / pretty_vainfo.py
Created July 22, 2023 13:56
VA-API (vainfo) pretty print script
import subprocess
def get_vaapi_info():
handle = subprocess.run(["vainfo"], capture_output=True)
result = handle.stdout.decode("utf-8")
return result.splitlines()
def append_to_map(map, profile_name, prefix, entry_point):
if profile_name.removeprefix(prefix) in map:
map[profile_name.removeprefix(prefix)].append(entry_point)
@tobiaspc
tobiaspc / video_check.sh
Created July 1, 2023 20:36
Parallel video corruption check for a whole folder with csv output
#!/bin/bash
folder="$1"
parallelism="$2" # No parallelism, i.e. set to 1, works best so far
results_file="${folder}/results.csv"
# Function to check if a video file is corrupt using ffmpeg
check_video_corruption() {
renice -n 19 $$ > /dev/null 2>&1
ionice -c 3 -p $$ > /dev/null 2>&1