Metroidn1f
8th November 2010, 01:33
I have this idea on how to remove subtitles with AviSynth. But first about me. I am an alright programmer. I use Visual Basic 2010, and I have no clue on how to program filters for AviSynth, but I have tried.
Okay, now on to my Idea. I tried to make a filter for AviSynth that would re-mux a video but disabling the subtitles with ffmpeg. The Avs Script would like like this.
F = DirectShowSource("File.mkv", fps=23.976, audio=true, video=true)
LoadPlugin("Myplugin.dll")
MyPlugin(F)
What I believe that script would do is send the file name to my plugin and just use the command for ffmpeg like this.
public Sub MyPlugin(byval a)
using p as new process
p.StartInfo.FileName = "ffmpeg.exe"
p.StartInfo.Arguments = "-i """ & a & """ -vcodec copy -acodec copy -sn ""C:\test.mkv"""
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardError = False
p.StartInfo.CreateNoWindow = True
p.Start()
end using
But that did not end up working and even if it did, I don't think it would of worked because it did not return a value or the video what ever way it should.
I then tried made an Avs Script with a file that was not yet created but will be created with ffmpeg doing the same thing. So first I would run the same command as I did abouve but instead of using the carried variable I use the actual file that I want to take the subtitles. I set the output to "C:\test.mkv" just as the source is set in the Avs Script.
First I run that command, and it create the test.mkv file and updates every frame. While the command is being ran, I then run the Avs Script in any video player, and it played the file that was being created by ffmpeg and it did not have subtitles. It did it just what I wanted it to do.
It still is not efficient because when I load the Avs Script into a video player, it only plays that length that it had when it was opened, even though it is changing ever second.
Does anyone see where I am going at? I have a feeling that this is actually already implemented with something else, but I am just not aware of it. Because I have no idea on how a video player such as the awesome VLC Media Player disables the subtitles if you specify it to. I know it uses DirectVobSub but I just don't know how to implement it into my program and how to do use, or even how it works with video players such as that one.
Do you think at what I am saying is a possible filter to be made?
Is it possible to use Visual Basic to create a AviSynth FIlter, or does it have to be C++?
Okay, now on to my Idea. I tried to make a filter for AviSynth that would re-mux a video but disabling the subtitles with ffmpeg. The Avs Script would like like this.
F = DirectShowSource("File.mkv", fps=23.976, audio=true, video=true)
LoadPlugin("Myplugin.dll")
MyPlugin(F)
What I believe that script would do is send the file name to my plugin and just use the command for ffmpeg like this.
public Sub MyPlugin(byval a)
using p as new process
p.StartInfo.FileName = "ffmpeg.exe"
p.StartInfo.Arguments = "-i """ & a & """ -vcodec copy -acodec copy -sn ""C:\test.mkv"""
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardError = False
p.StartInfo.CreateNoWindow = True
p.Start()
end using
But that did not end up working and even if it did, I don't think it would of worked because it did not return a value or the video what ever way it should.
I then tried made an Avs Script with a file that was not yet created but will be created with ffmpeg doing the same thing. So first I would run the same command as I did abouve but instead of using the carried variable I use the actual file that I want to take the subtitles. I set the output to "C:\test.mkv" just as the source is set in the Avs Script.
First I run that command, and it create the test.mkv file and updates every frame. While the command is being ran, I then run the Avs Script in any video player, and it played the file that was being created by ffmpeg and it did not have subtitles. It did it just what I wanted it to do.
It still is not efficient because when I load the Avs Script into a video player, it only plays that length that it had when it was opened, even though it is changing ever second.
Does anyone see where I am going at? I have a feeling that this is actually already implemented with something else, but I am just not aware of it. Because I have no idea on how a video player such as the awesome VLC Media Player disables the subtitles if you specify it to. I know it uses DirectVobSub but I just don't know how to implement it into my program and how to do use, or even how it works with video players such as that one.
Do you think at what I am saying is a possible filter to be made?
Is it possible to use Visual Basic to create a AviSynth FIlter, or does it have to be C++?