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

add astream and vstream properties to avformat producer #941

Merged
merged 6 commits into from
Aug 25, 2023

Conversation

ddennedy
Copy link
Member

@ddennedy ddennedy commented Aug 22, 2023

I am still testing this, and there are Shotcut changes required to take advantage of it that shows it basically working. But I want to give you a chance to review it. This is usable from the command line using astream=1 on the melt command line, for example, to choose the second audio stream (much easier than figuring out or guessing the absolute stream index when you do not know the order of streams - or in the case of a Google Pixel video where the first stream is a data stream). The Pixel video breaks exporting with a proxy in Shotcut because the absolute stream indexes between the source and proxy do not match since the proxy transcode process drops the data stream.

I added this private Pixel video to our shared S3 folder in Google Pixel folder. I also added a video with 2 video streams and 2 audio streams (as well as some data streams, as created by a GoPro MAX 360 video camera) to a folder multiple video and audio streams.

@ddennedy ddennedy added this to the v7.20.0 milestone Aug 22, 2023
@ddennedy ddennedy requested a review from bmatherly August 22, 2023 05:07
Copy link
Member

@bmatherly bmatherly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not download/test this change. But the approach looks sound to me. Some minor nits for your consideration. Feel free to ignore.

src/modules/avformat/producer_avformat.c Outdated Show resolved Hide resolved
src/modules/avformat/producer_avformat.c Show resolved Hide resolved
src/modules/avformat/producer_avformat.c Show resolved Hide resolved
@ddennedy ddennedy force-pushed the relative-stream-index branch from 08d57a9 to 4b5a3ed Compare August 23, 2023 21:17
ddennedy and others added 2 commits August 23, 2023 14:32
video_index can be used to index the streams array when it has a value
of -1.

This is a regression caused by 35402e6
When opening an existing project that has only audio_index and
video_index using the avformat-novalidate producer these properties are
not set in producer init. This makes Shotcut unable to locate the
relative stream indices in its Properties.
@ddennedy ddennedy merged commit 52c5bde into master Aug 25, 2023
@ddennedy ddennedy deleted the relative-stream-index branch August 25, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants