Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello i am trying to make the below code work... but i am getting the error at conv.convertmedia line Value of type 'String' cannot be converted to 'FFMpegInput()'
VB
Dim conv = New NReco.VideoConverter.FFMpegConverter()
    AddHandler conv.ConvertProgress, AddressOf converter_progress
    Dim settings As New OutputSettings
    settings.SetVideoFrameSize(320, 320)
    settings.VideoCodec = "h264"
    Dim inputpath = TextBox1.Text
    conv.ConvertMedia(inputpath, "c:\temp\1.mkv", NReco.VideoConverter.Format.matroska, settings)


What I have tried:

i tried to declare inputpath As FFMpegInput() but i couldnt manage to use it properly with convertmedia.
Posted
Updated 11-Sep-18 22:12pm
v2
Comments
jaket-cp 12-Sep-18 4:31am    
what is the value of inputpath (TextBox1.Text)
and is the value of inputpath a local path to input media file
https://www.nrecosite.com/doc/NReco.VideoConverter/html/M_NReco_VideoConverter_FFMpegConverter_ConvertMedia_3.htm
fuujinn 12-Sep-18 4:34am    
i guess it is not the problem what value inputpath is.. when i use convertmedia with settings first value must be FFMpegInput() not string.here the link how to use convertmedia with settings.

https://www.nrecosite.com/doc/NReco.VideoConverter/html/M_NReco_VideoConverter_FFMpegConverter_ConvertMedia.htm
jaket-cp 12-Sep-18 4:40am    
not used vb.net for some time
When assigning variable as string, should it be as follows:
Dim inputpath As String = TextBox1.Text
fuujinn 12-Sep-18 4:43am    
found the solution

Dim inputpaths As FFMpegInput() = {New FFMpegInput("video.mp4")}

conv.ConvertMedia(inputpaths, "c:\temp\1.mkv", NReco.VideoConverter.Format.matroska, settings)
jaket-cp 12-Sep-18 4:57am    
ok that's good :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900