mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	enable h264_cuvid decoder
This commit is contained in:
		
							parent
							
								
									9907f47a9b
								
							
						
					
					
						commit
						2c54390c38
					
				@ -1806,6 +1806,20 @@ namespace MediaBrowser.Controller.MediaEncoding
 | 
			
		||||
                            break;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                else if (string.Equals(encodingOptions.HardwareAccelerationType, "nvenc", StringComparison.OrdinalIgnoreCase))
 | 
			
		||||
                {
 | 
			
		||||
                    switch (state.MediaSource.VideoStream.Codec.ToLower())
 | 
			
		||||
                    {
 | 
			
		||||
                        case "avc":
 | 
			
		||||
                        case "h264":
 | 
			
		||||
                            if (_mediaEncoder.SupportsDecoder("h264_cuvid"))
 | 
			
		||||
                            {
 | 
			
		||||
                                return "-c:v h264_cuvid ";
 | 
			
		||||
                            }
 | 
			
		||||
                            break;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // leave blank so ffmpeg will decide
 | 
			
		||||
 | 
			
		||||
@ -90,7 +90,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
 | 
			
		||||
                "h264_qsv",
 | 
			
		||||
                "hevc_qsv",
 | 
			
		||||
                "mpeg2_qsv",
 | 
			
		||||
                "vc1_qsv"
 | 
			
		||||
                "vc1_qsv",
 | 
			
		||||
                "h264_cuvid"
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            foreach (var codec in required)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user