fix ffmpeg command

fix ffmpeg command for merged audio (whitelist) #950
This commit is contained in:
hama3254 2024-05-07 21:24:41 +02:00
parent b94628dfc3
commit 536c0b3dfd
4 changed files with 8 additions and 61 deletions

Binary file not shown.

View File

@ -485,24 +485,6 @@ Public Class CRD_List_Item
HistoryDL_Pfad = DL_Pfad
HistoryFilename = Filename
'GlobalLogfile = DL_Pfad.Replace(".mkv", ".txt").Replace(Chr(34), "")
'Debug.WriteLine(GlobalLogfile)
'If (Me.InvokeRequired) Then
' Me.Invoke(Sub()
' 'MsgBox(True.ToString)
' Label_percent.Text = "selected subtiles have been dowloaded"
' Canceld = True
' End Sub)
'Else
' ' MsgBox(False.ToString)
' Label_percent.Text = "selected subtiles have been dowloaded"
' Canceld = True
'End If
'Exit Sub
If CBool(InStr(DL_URL, "-i [Subtitles only]")) Then
Me.Invoke(New Action(Function() As Object
@ -516,12 +498,16 @@ Public Class CRD_List_Item
Return Nothing
End Function))
ElseIf DownloadHybridMode = True Then
DL_URL = DL_URL.Replace("-protocol_whitelist file,http,https,tcp,tls,crypto,data", "") 'remove whitelist for hybrid mode
HistoryDL_URL = DL_URL
Dim Evaluator = New Thread(Sub() DownloadHybrid(DL_URL, DL_Pfad, Filename))
Evaluator.Start()
HybridMode = True
HybridRunning = True
Else
DownloadFFMPEG("-protocol_whitelist file,http,https,tcp,tls,crypto,data " + DL_URL, DL_Pfad, Filename)
DownloadFFMPEG(DL_URL, DL_Pfad, Filename) 'DownloadFFMPEG("-protocol_whitelist file,http,https,tcp,tls,crypto,data " + DL_URL, DL_Pfad, Filename)
End If
End Sub
@ -1000,45 +986,6 @@ Public Class CRD_List_Item
End If
m3u8FileContent = m3u8FileContent + KeyLine + vbLf
ElseIf CBool(InStr(textLenght(i2), "#EXT-X-ENDLIST")) Then
' ElseIf textLenght(i) = Then 'And my.Settings.FixCRStream = True Then
Try
Dim StringCount As String = Count.ToString
Dim StringCount_1 As String = (Count + 1).ToString
Debug.WriteLine("old: " + LastUrl)
Dim NewUrl As String = Nothing
Me.Invoke(New Action(Function() As Object
NewUrl = LastUrl.Replace("-" + StringCount + "-", "-" + StringCount_1 + "-")
Return Nothing
End Function))
Debug.WriteLine("new: " + NewUrl)
Dim File As String = Folder + String.Format("{0:00000}", Count) + ".ts"
Dim curi As String = GetFullUri(url, NewUrl)
WC_TS = New WebClient
WC_TS.DownloadFile(New Uri(curi), File)
HybrideLog = HybrideLog + vbNewLine + Date.Now.ToString + ": " + File + " - " + curi
m3u8FileContent = m3u8FileContent + "#EXTINF:4.048," + vbLf 'dummy line
m3u8FileContent = m3u8FileContent + File + vbLf
Dim FragmentsFinised = Count * 100 / FragmentsInt
'Dim Update = New Thread(Sub() Me.TS_StatusAsync(CInt(FragmentsFinised), di, PauseTime))
'Update.Start()
RaiseEvent UpdateUI(CInt(FragmentsFinised), di, PauseTime)
Count = Count + 1
m3u8FileContent = m3u8FileContent + textLenght(i) + vbLf
Catch ex As Exception
HybrideLog = HybrideLog + vbNewLine + Date.Now.ToString + ": CR fix failed to access unlisted file #882"
m3u8FileContent = m3u8FileContent + textLenght(i) + vbLf
End Try
Else
m3u8FileContent = m3u8FileContent + textLenght(i) + vbLf
End If

View File

@ -1648,7 +1648,7 @@ Public Class Main
sink.WriteLine(localm3u8)
End Using
ffmpegInput = "-allowed_extensions ALL " + "-i " + Chr(34) + localfile + Chr(34)
ffmpegInput = "-protocol_whitelist file,http,https,tcp,tls,crypto,data -allowed_extensions ALL " + "-i " + Chr(34) + localfile + Chr(34) 'add whitelist to the stream input directly #950
End If

View File

@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.23.2")>
<Assembly: AssemblyFileVersion("3.23.2")>
<Assembly: AssemblyVersion("3.23.3")>
<Assembly: AssemblyFileVersion("3.23.3")>
<Assembly: NeutralResourcesLanguage("en")>