NLeseul avatar

[utopian-io] Improved remux dialog for OBS Studio, with batch operation support and drag/drop support

nleseul

Published: 22 Sept 2018 › Updated: 22 Sept 2018[utopian-io] Improved remux dialog for OBS Studio, with batch operation support and drag/drop support

[utopian-io] Improved remux dialog for OBS Studio, with batch operation support and drag/drop support

Background

OBS Studio is a widely-used free/open-source application for streaming and recording video.

The maintainers of OBS Studio strongly recommend that users record in MKV format for efficiency reasons. However, because many video editing applications do not support MKV, OBS Studio provides a convenience feature to remux recordings from an MKV container to an MP4 container.

Shortcomings

obs remux before.png

The original dialog for remuxing recordings only had the ability to remux one file at a time. It also does not allow the user to drag files from an Explorer window, requiring them to use the "Browse..." button to navigate to the desired recording.

The ability to remux multiple files at the same time has been requested several times by users on the support forum.

Design requirements

  • Must allow the user to queue multiple files
  • Must allow items to be removed from the queue
  • Must populate the queue with dropped files/directories
  • Must indicate the status of each queue item, in case of errors
  • Must provide a convenient way to clear completed items from the queue
  • Must display a progress bar
  • Must do work on a background thread to avoid blocking the main UI
  • Must support cancellation in the middle of an operation
  • Must block modification of the queue during an operation

obs remux after.png

Implementation notes

A Qt QTableView is used for presenting the queue. This required adding handling for QTableView in the included style sheets to ensure it fits in with the rest of the UI. A custom itemdelegate is also used for providing editable cells in the table, including "browse" and "delete" toolbar items in each. Standard Qt icons are used for indicating the state of each entry in a column to the left.

Data is provided to the tableview by a subclassed QAbstractTableModel. The tablemodel is used to store the state of the queue and enforce business rules about how the states of entries change.

The existing worker thread from the old dialog is reused in more or less the same form and continues to handle only one file at a time. The main window is responsible for receiving a signal from the worker thread on completion and starting the next queue entry from the model if necessary.

Links

OBS Studio repository
Pull request
Accepted commit

My GitHub account

Leave [utopian-io] Improved remux dialog for OBS Studio, with batch operation support and drag/drop support to:

Written by

I play video games, wear shorts, and think about stuff.

Read more #utopian-io posts


Best Posts From NLeseul

We have not curated any of nleseul's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From NLeseul