@@ -139,16 +139,6 @@ private async Task ProcessOneItem(Video item, CancellationToken cancellationToke
139139 File . Delete ( outputPath ) ;
140140 }
141141
142- // profile 7.6 can be converted to profile 8.1, with some special handling.
143- // This will be presented as a second input to FFmpeg, and it will copy that
144- // converted video stream instead of our original MKV's.
145- string ? downmuxedVideoPath = null ;
146- if ( streams . Any ( s => s . DvProfile == 7 && s . DvLevel == 6 ) && configuration . DownmuxProfile7 )
147- {
148- _logger . LogInformation ( "Downmuxing {Id} {Name} to Profile 8.1 first" , item . Id , item . Name ) ;
149- downmuxedVideoPath = await _downmuxWorkflow . Downmux ( ourSource , cancellationToken ) ;
150- }
151-
152142 // truehd isn't supported by many consumer MP4 decoders even though ffmpeg can do it.
153143 // it's found on a lot of DoVi media (cough particularly hybrid remuxes cough),
154144 // but media like Bluray is required to have an AAC/AC3/whatever fallback stream for compatibility
@@ -173,6 +163,16 @@ private async Task ProcessOneItem(Video item, CancellationToken cancellationToke
173163 . Select ( ( subtitle , i ) => new { subtitle . Index , OutputIndex = i , Codec = "mov_text" , Lang = subtitle . Language } )
174164 . ToList ( ) ;
175165
166+ // profile 7.6 can be converted to profile 8.1, with some special handling.
167+ // This will be presented as a second input to FFmpeg, and it will copy that
168+ // converted video stream instead of our original MKV's.
169+ string ? downmuxedVideoPath = null ;
170+ if ( streams . Any ( s => s . DvProfile == 7 && s . DvLevel == 6 ) && configuration . DownmuxProfile7 )
171+ {
172+ _logger . LogInformation ( "Downmuxing {Id} {Name} to Profile 8.1 first" , item . Id , item . Name ) ;
173+ downmuxedVideoPath = await _downmuxWorkflow . Downmux ( ourSource , cancellationToken ) ;
174+ }
175+
176176 var remuxRequest = new StreamState ( _sourceManager , TranscodingJobType . Progressive , _transcodeManager ) ;
177177
178178 remuxRequest . MediaSource = ourSource ;
0 commit comments