AnimeSuki.com Forum

AnimeSuki Forum (http://forums.animesuki.com/index.php)
-   Fansub Groups (http://forums.animesuki.com/forumdisplay.php?f=17)
-   -   [Question] Regarding Video Encoding (http://forums.animesuki.com/showthread.php?t=112215)

HauntingShock 2012-05-12 02:24

[Question] Regarding Video Encoding
 
Hello guys! I'm just new here :D so please bear with me :)


I recently started to try subbing animes.. but I encountered a problem.

I can already make subtitle files with aegisub but I don't know how to encode them, so I searched the net for guides and tutorials and saw many methods...

So I downloaded MeGUI, avysinth, etc etc.

I tried to run the avysinth script which contains this code:
Code:

LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\VSFilter.dll")
AVISource("C:\Users\Documents\video1.avi")
TextSub("C:\Users\Documents\subs.ass")

and I could see the subs shown on the video preview. But when I click "Queue", it only creates 2 files with files extensions .STATS and .MBTREE instead of mp4 or mkv...

Is this normal? If yes, what should I do next to get the mp4 or mkv...

sneaker 2012-05-12 02:34

.STATS and .MBTREE are created by the h.264 video encoder (x264) on the first pass of a 2 pass encode.
What "Encoding Mode" did you set in the encoder settings? "2pass - 1st pass" is not enough. I recommend "Const. Quality".

HauntingShock 2012-05-12 02:36

So that means I really did do something wrong? I see....



by the way, sorry for posting on the wrong section :D
I'm just new so I didn't see the other sections

Edit: Thanks!!! It worked!!! :D *Click +Rep*

HauntingShock 2012-05-12 03:31

Another question here...


What's the best settings used by most fansub groups? and what file container do they use?

JEEB 2012-05-12 04:03

Quote:

Originally Posted by HauntingShock (Post 4156611)
What's the best settings used by most fansub groups? and what file container do they use?

Not related to only fansubbing, but this is where most encoders that are not encoding for some specific size limitation (like people used to in the beginning/middle of the 2000s) ended up (since that way of encoding had more to do with 'we want it to fit X' rather than 'we want it to be of quality X').
  • CRF rate control ("highest CRF value that still looks good to you", which will basically mean you get the least bit rate used to keep that quality you wanted for that set of settings).
  • Preset and possibly tune setting set accordingly accordingly to the source and the "how slow do I want this to go" (as the preset setting controls the compression VS speed set-up you want).
    • Generally everything but the fastest and slowest presets are used (ultrafast is usually for speed benchmarks, and placebo is just gaining you very little while turning every knob 'to eleven'), but the choice is yours.
  • Read more here.
.
You might as well just use x264 from the command line (with batch files, for example), as it's literally only a couple of settings; Also AvsPmod is recommended as an Avisynth script editor/preview application.

Matroska is the container of choice (d'oh) for most people, because they do not need the possible extra information that a raw H.264 bit stream might contain (HRD info, extra headers and such, useful for muxing into MPEG-TS for broadcast/blu-ray mastering), while letting you use the output file even if your encode should be disrupted. Not to mention that for muxing in video/audio/subtitles/chapters/attachments the matroska format is the most versatile, as well as has one of the best graphical muxing applications with mkvtoolnix toolset's mmg (mkvmergegui).

Also, for <insert deity>'s sake, do softsubbing since you can. Re-encoding because of typos and similar is just derp in 2012.

HauntingShock 2012-05-12 20:59

Quote:

Originally Posted by JEEB (Post 4156630)
Not related to only fansubbing, but this is where most encoders that are not encoding for some specific size limitation (like people used to in the beginning/middle of the 2000s) ended up (since that way of encoding had more to do with 'we want it to fit X' rather than 'we want it to be of quality X').
  • CRF rate control ("highest CRF value that still looks good to you", which will basically mean you get the least bit rate used to keep that quality you wanted for that set of settings).
  • Preset and possibly tune setting set accordingly accordingly to the source and the "how slow do I want this to go" (as the preset setting controls the compression VS speed set-up you want).
    • Generally everything but the fastest and slowest presets are used (ultrafast is usually for speed benchmarks, and placebo is just gaining you very little while turning every knob 'to eleven'), but the choice is yours.
  • Read more here.
.
You might as well just use x264 from the command line (with batch files, for example), as it's literally only a couple of settings; Also AvsPmod is recommended as an Avisynth script editor/preview application.

Matroska is the container of choice (d'oh) for most people, because they do not need the possible extra information that a raw H.264 bit stream might contain (HRD info, extra headers and such, useful for muxing into MPEG-TS for broadcast/blu-ray mastering), while letting you use the output file even if your encode should be disrupted. Not to mention that for muxing in video/audio/subtitles/chapters/attachments the matroska format is the most versatile, as well as has one of the best graphical muxing applications with mkvtoolnix toolset's mmg (mkvmergegui).

Also, for <insert deity>'s sake, do softsubbing since you can. Re-encoding because of typos and similar is just derp in 2012.

Thanks too!

Got another question :D

What's the best alternative for "that one" which allows me to use the "AVIsource='' " in an avysinth script?(I don't know what you call that...was it plug-in?) I want it changed because mine only supports .avi files... I want ones that could support .mp4 too..

Quarkboy 2012-05-13 01:26

Quote:

Originally Posted by HauntingShock (Post 4157630)
Thanks too!

Got another question :D

What's the best alternative for "that one" which allows me to use the "AVIsource='' " in an avysinth script?(I don't know what you call that...was it plug-in?) I want it changed because mine only supports .avi files... I want ones that could support .mp4 too..

See the avisynth wiki for a list of source filters for various types: http://avisynth.org/mediawiki/Importing_media

for mp4 (and actually almost anything else decodable by ffmpeg) I'd recommend using ffms2 https://code.google.com/p/ffmpegsource/

DreGon45 2012-05-13 18:18

Do what Quarkboy says. ffms2 or FFMpegSource can load just about anything you have. Make sure you read on how to use the commands for it so you can go a little further then just loading a source. Not that you'd always need to use the extra strings, but should the need ever arise you'd at least know how to use them instead of loading in other filters that you wouldn't be needing.

HauntingShock 2012-05-13 18:34

How do I load a filter? xD

Do I put it inside the folder of MeGUI or avysinth? and in what specific folder?

Quarkboy 2012-05-13 21:09

Quote:

Originally Posted by HauntingShock (Post 4159108)
How do I load a filter? xD

Do I put it inside the folder of MeGUI or avysinth? and in what specific folder?

Put the dll inside the Avisynth plugins directory for automatic loading, or use the LoadPlugin command:
http://avisynth.org/mediawiki/Plugins
in the script itself.

HauntingShock 2012-05-14 18:09

Quote:

Originally Posted by Quarkboy (Post 4159294)
Put the dll inside the Avisynth plugins directory for automatic loading, or use the LoadPlugin command:
http://avisynth.org/mediawiki/Plugins
in the script itself.

I need to put it in the avisynth folder inside the avisynth directory? not in the MeGUI avisynth folder?

and what do you mean by automatic loading? I thought you would always need to use the LoadPlugin command or whatever that is...

jfs 2012-05-14 19:53

Avisynth will automatically try to load all plugins in a particular folder, usually something like c:\program files\avisynth 2.5\plugins\. Do not use that, it's a wonderful way to get strange behaviour because some plugins do unexpected things or interfere with each other or whatever else. (The Avisynth installation automatically places DirectShowSource and TcpDeliver there, it's fine to keep those in place.)
Always LoadPlugin() what you need, and only what you actually need.

HauntingShock 2012-05-14 21:17

Quote:

Originally Posted by jfs (Post 4160686)
Avisynth will automatically try to load all plugins in a particular folder, usually something like c:\program files\avisynth 2.5\plugins\. Do not use that, it's a wonderful way to get strange behaviour because some plugins do unexpected things or interfere with each other or whatever else. (The Avisynth installation automatically places DirectShowSource and TcpDeliver there, it's fine to keep those in place.)
Always LoadPlugin() what you need, and only what you actually need.

Oh I see... Thanks :)

HauntingShock 2012-05-15 01:51

I still can't make it work :(

I'm only a beginner so I don't really understand much about this...

Could someone give me an example code?
Let's say I have a video named video1.mp4 and a subtitle file named subs1.ass, then I need to make an avs script with notepad...and import it to MeGUI right?

What's supposed to be the code?

Quarkboy 2012-05-15 05:32

Quote:

Originally Posted by HauntingShock (Post 4161047)
I still can't make it work :(

I'm only a beginner so I don't really understand much about this...

Could someone give me an example code?
Let's say I have a video named video1.mp4 and a subtitle file named subs1.ass, then I need to make an avs script with notepad...and import it to MeGUI right?

What's supposed to be the code?

Basically something like

LoadPlugin(" ") ffms dll
LoadPlugin(" ") vsfilter.dll
vid = FFVideoSource("video1.mp4")
aud = FFAudioSource("video1.mp4")
Audiodub(vid,aud)
textsub("subs1.ass")

Note, the first time this script is loaded the mp4 will be indexed and an ffindex file will get saved.

DreGon45 2012-05-15 11:51

Make sure you put the path in there, i.e.

"c:\user\mydocuments\video1.mp4"

HauntingShock 2012-05-15 22:45

Quote:

Originally Posted by Quarkboy (Post 4161213)
Basically something like

LoadPlugin(" ") ffms dll
LoadPlugin(" ") vsfilter.dll
vid = FFVideoSource("video1.mp4")
aud = FFAudioSource("video1.mp4")
Audiodub(vid,aud)
textsub("subs1.ass")

Note, the first time this script is loaded the mp4 will be indexed and an ffindex file will get saved.


I tried this code, and I got an Error "There is no fuction FFVideoSource"


Edit:
I was just wondering, besides using MeGUI for re-encoding videos to add subtitles, does video re-encoding with MeGUI produce better results than re-encoding with video editors like Vegas Pro? or nothing really special?

and

How come people still bother to download and use MKVmerge when there is already a built-in muxer with MeGUI?

Edit2:

Follow-up Question. I saw you could mux a subtitle file with a video to .mkv using MeGUI's MKV muxer... why bother doing this ffmpeg thing?

I got a lot of questions -_-"

DreGon45 2012-05-16 07:39

Quote:

Originally Posted by HauntingShock (Post 4162297)
I tried this code, and I got an Error "There is no fuction FFVideoSource"

Did you load the plug-in first?

Here I have a suggestion: Copy everything with in your .avs script and paste it here so we can see it and show you what you're doing wrong.


Quote:

Originally Posted by HauntingShock (Post 4162297)
Edit:
I was just wondering, besides using MeGUI for re-encoding videos to add subtitles, does video re-encoding with MeGUI produce better results than re-encoding with video editors like Vegas Pro? or nothing really special?


It's hard to understand what you mean by better, but I guess I'll just take it as a general term. It depends on what you're looking for, and what you're using it for. If you're trying to encode some animes to go on, let's say, you're Iphone, then stick with MeGUI. If you need to edit a video of some of you're gameplay footage off of you're xbox or ps3 and you want to upload it to youtube, then Sony Vegas or AE is your best bet. Though you could use a combination of the two.

What is it that you are trying to encode, or accomplish for that matter?

Quote:

Originally Posted by HauntingShock (Post 4162297)
How come people still bother to download and use MKVmerge when there is already a built-in muxer with MeGUI?

I could give you an answer, but your brain would probably explode from the answer. Not trying to insult your intelligence, but with the the very little amount of encoding you know, I'd only be confusing you more then you are now.

Quote:

Originally Posted by HauntingShock (Post 4162297)
Edit2:
Follow-up Question. I saw you could mux a subtitle file with a video to .mkv using MeGUI's MKV muxer... why bother doing this ffmpeg thing?

I got a lot of questions -_-"


Because if you want to "hard sub"(make the subs permanent), then it's best to load the subtitle with-in your .avs script to hard code them on to the video. When you use the muxer from MeGUI or use MKVmerge, they are soft coded, meaning they can be toggled on and off of the video and extracted. If you prefer hardsubs, keep using the .avs script. If you like soft subs, then I'm sure you can figure out that part ;).

But why use the FFMpeg, because it's great at loading .mkv, .mp4, .avi, and even the rare sources of h264 avi's.(This has been done with virtual dub, friend of mine did it. I don't recommend doing it,they can be quite finicky.) And I personally think that it's better then Directshowsource and dss2, some other media loaders. If you use MeGUI's AVSscript creator, then it'll use one of those two as a default media loader.

HauntingShock 2012-05-16 18:54

Here's the code:

Code:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ffms-2.17-cplugin\ffms2.dll")
LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\VSFilter.dll")
vid = FFVideoSource("C:\Users\HauntingShock\Documents\video1.mp4")
aud = FFAudioSource("C:\Users\HauntingShock\Documents\video1.mp4")
Audiodub(vid,aud)
textsub("Testing.ass")


DreGon45 2012-05-16 20:17

Well with Text sub you also need to string the file path as well so make sure you put that in there as well.
Try loading the video as
vid= FFMpegSource(" ")
Then do the audio the same way you've already done it, then see if that works.


All times are GMT -5. The time now is 11:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.