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

in #utopian-io6 years ago

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

Sort:  
  • Great achievement to have gotten code merged on such a great project.
  • I would suggest you use these posts to show off you code, new functions. Don't be afraid to geek out.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @helo!

So far this week you've reviewed 5 contributions. Keep up the good work!

Hi @nleseul!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.032
BTC 63585.64
ETH 3035.86
USDT 1.00
SBD 3.84