Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th November 2010, 01:33   #1  |  Link
Metroidn1f
Registered User
 
Join Date: Aug 2010
Location: Hamilton, Ontario, Canada
Posts: 15
AviSynth Subtitles Idea

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++?
Metroidn1f is offline   Reply With Quote
Old 8th November 2010, 18:50   #2  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
I've read your post twice and I'm still not sure on what you are trying to do. If you want to open a mkv file in avisynth without loading subtitles you can use the ffmpegsource plugin. A script would then look like this:
audio=FFAudioSource("file.mkv")
video=FFVideoSource("file.mkv")
AudioDub(video, audio)

Also, VLC does not use DirectVobSub.
But honestly, I still don't really get what you're trying to do. If you want to play your file in a video player but without subtitles, why don't you deactivate subtitles in your player? You can deinstall DirectVobSub if you don't need it: start > cmd > "regsvr32 /u vsfilter.dll" (in the directory of vsfilter.dll)

I don't know if you can program such a plug-in. AviSynth filter usually pass on raw pictures and raw audio, not filenames.
sneaker_ger is offline   Reply With Quote
Old 11th November 2010, 03:44   #3  |  Link
Metroidn1f
Registered User
 
Join Date: Aug 2010
Location: Hamilton, Ontario, Canada
Posts: 15
I get this error. "No function named FFAUdioSource". What is causing this?
Metroidn1f is offline   Reply With Quote
Old 11th November 2010, 04:09   #4  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
You have to download (see link in my last post), extract and copy the plugin into your avisynth plugin directory as it is not part of the core avisynth package.
sneaker_ger is offline   Reply With Quote
Reply

Tags
avisynth, new filter, programming, subtitles, visual basic


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:57.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.