Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for av1 in webm and mkv container #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ RUN \
python3-setuptools \
python3-wheel \
python3-tk \
python3-venv \
yasm \
pkg-config \
libdav1d-dev \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists
Expand Down Expand Up @@ -50,7 +52,7 @@ RUN \
mkdir /tmp/ffmpeg \
&& cd /tmp/ffmpeg \
&& git clone https://git.ffmpeg.org/ffmpeg.git . \
&& ./configure --enable-libvmaf --enable-version3 --pkg-config-flags="--static" \
&& ./configure --enable-libdav1d --enable-libvmaf --enable-version3 --pkg-config-flags="--static" \
&& make -j 8 install \
&& rm -r /tmp/ffmpeg

Expand Down
15 changes: 12 additions & 3 deletions videobench.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,18 @@ def manage_input_files(all_input, loglevel):
input_obj.filename = filename
input_obj.path = input_path
input_obj.name, ext = os.path.splitext(filename)

input_obj.duration = float(ffprobe_json['streams'][0]['duration'])

#input_obj.duration = float(ffprobe_json['streams'][0]['duration'])
try:
input_obj.duration = float(ffprobe_json['streams'][0]['duration'])
except(KeyError, ValueError):
try:
duration_tag = ffprobe_json['streams'][0]['tags']['DURATION']
# Assuming DURATION is in the format 'hh:mm:ss.sssssssss'
duration_parts = duration_tag.split(':')
hours, minutes, seconds = map(float, duration_parts)
input_obj.duration = hours * 3600 + minutes * 60 + seconds
except(KeyError, ValueError):
input_obj["duration"] = None # Or handle the case when duration is not found
fps_str = ffprobe_json['streams'][0]['r_frame_rate']
num,den = fps_str.split( '/' )
input_obj.r_frame_rate = round((float(num)/float(den)),0)
Expand Down
4 changes: 2 additions & 2 deletions videobench_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def setupConnections(self):

def get_refFileName(self):

self.ref_path = QtWidgets.QFileDialog.getOpenFileName(self, ("Open Reference File"),self.currentPath,("Video files (*.mp4 *.ts *.ismv *.mov *.mp2 *.mxf *.h264 *.h265);; All files (*.*)"))[0]
self.ref_path = QtWidgets.QFileDialog.getOpenFileName(self, ("Open Reference File"),self.currentPath,("Video files (*.mp4 *.ts *.ismv *.mov *.mp2 *.mxf *.h264 *.h265 *.webm *.mkv);; All files (*.*)"))[0]
self.create_refCheckBox()

def create_refCheckBox(self):
Expand All @@ -90,7 +90,7 @@ def create_refCheckBox(self):
self.refCheckbox_dict[filename].clicked.connect(partial(self.add_lineSeries, self.refCheckbox_dict[filename]))

def get_inputFileNames(self):
list_input = QtWidgets.QFileDialog.getOpenFileNames(self, ("Open Test Files"),self.currentPath,("Video files (*.mp4 *.ts *.ismv *.mov *.mp2 *.mxf *.h264 *.h265);; All files (*.*)"))[0]
list_input = QtWidgets.QFileDialog.getOpenFileNames(self, ("Open Test Files"),self.currentPath,("Video files (*.mp4 *.ts *.ismv *.mov *.mp2 *.mxf *.h264 *.h265 *.webm *.mkv);; All files (*.*)"))[0]

for input_file in list_input:
if input_file not in self.inputPath_list:
Expand Down