Skip to content

Commit

Permalink
fix making video proxy for iPhone 16 Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Oct 8, 2024
1 parent fbd2c56 commit d626153
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/proxymanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ void ProxyManager::generateVideoProxy(Mlt::Producer &producer, bool fullRange, S
auto audioIndex = producer.property_exists(kDefaultAudioIndexProperty) ? producer.get_int(
kDefaultAudioIndexProperty) : producer.get_int("audio_index");
if (producer.get_int("video_index") < audioIndex) {
args << "-map" << "0:V?" << "-map" << "0:a?";
// iPhone 16 Pro has a 4 channel (spatial) audio stream with codec "apac" that causes failure.
// This is not limited to only iPhone 16 Pro, but I think most iPhones only record one usable audio track.
if (!::qstrcmp(producer.get("meta.media.1.stream.type"), "audio")
&& QString(producer.get("meta.attr.com.apple.quicktime.model.markup")).contains("iPhone"))
args << "-map" << "0:V?" << "-map" << "0:a:0";
else
args << "-map" << "0:V?" << "-map" << "0:a?";
} else {
args << "-map" << "0:a?" << "-map" << "0:V?";
}
Expand Down

0 comments on commit d626153

Please sign in to comment.