AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > Anime Related Topics > General Anime > Fansub Groups

Notices

Reply
 
Thread Tools
Old 2009-02-03, 11:34   Link #321
Kristen
Senior Member
*Author
 
 
Join Date: Jul 2007
Location: Virginia Tech
The problem is that you are setting the subs to be variable frame rate, and then are converting the video to CFR 23.976. The reason for VFR is so that some areas have different frame rates as compared to the others.

instead of doing Directshowsource, you're going to want something like this:

LoadPlugin(C:\Program Files\AviSynth 2.5\plugins\FFMPEGSource.dll)
FFMPEGSource("D:\JSM_01.mp4", timecodes="timecodes.txt")

This will produce a video that is CFR 23.976 but does not drop any frames. So, the result should be like 27 minutes long instead of 24.

Then you hardsub the subs that you exported to variable frame rate to that video. Again, no convertfps or anything. When you export, you want to use the timecodes.txt that appears once you load that script into AVSP or VDub or VDubMod or Megui or whatever you use. Again, the result will be like 27 minutes long, or 5, or something that is not right.

Once it's all hardsubbed, open MKVMerge, drag in the video, select it, and then where it says "timecodes" on the bottom, select the timecodes you got before. Mux it together, and you'll get a VFR MKV file, synched.



Alternatively, you can do DirectShowSource("a.mp4", fps=23.976, convertfps=true) and then just hardsub the typesetting as you got it, no VFR conversion. It should be in synch with it like that. However, by convertingfps, you are going to be dropping some frames which can possibly cause panning issues.
__________________
Kristen is offline   Reply With Quote
Old 2009-02-03, 11:56   Link #322
t4ke5hi
Junior Member
 
Join Date: Jan 2009
Thanks for helping! I will try this part first:

Quote:
Originally Posted by Kristen View Post
instead of doing Directshowsource, you're going to want something like this:

LoadPlugin(C:\Program Files\AviSynth 2.5\plugins\FFMPEGSource.dll)
FFMPEGSource("D:\JSM_01.mp4", timecodes="timecodes.txt")
Can I apply resizers in the same AVS before this line? Or I have to run two diferent scripts?

As you notice I'm new at encoding
t4ke5hi is offline   Reply With Quote
Old 2009-02-03, 12:01   Link #323
D404
Banned
 
Join Date: Aug 2006
Quote:
Originally Posted by t4ke5hi View Post
Thanks for helping! I will try this part first:



Can I apply resizers in the same AVS before this line? Or I have to run two diferent scripts?

As you notice I'm new at encoding
uh... its kind of hard to resize anything before you even have video loaded...

i want you to think of the logic behind: load video -> resize
D404 is offline   Reply With Quote
Old 2009-02-03, 12:30   Link #324
t4ke5hi
Junior Member
 
Join Date: Jan 2009
Quote:
Originally Posted by D404 View Post
uh... its kind of hard to resize anything before you even have video loaded...

i want you to think of the logic behind: load video -> resize
I know that! I'm not such newbie .

I was asking if I have to do this:

Code:
LoadPlugin(C:\Program Files\AviSynth 2.5\plugins\FFMPEGSource.dll)
FFMPEGSource("D:\JSM_01.mp4", timecodes="timecodes.txt")

Lanczos4Resize(848, 480)

TextSub("D:\Subs.ass")
Or n one AVS the video load and the resize and then in another script the video load and the hardsub, I think it won't be a problem but I don't like to especulate .
t4ke5hi is offline   Reply With Quote
Old 2009-02-03, 12:39   Link #325
Kristen
Senior Member
*Author
 
 
Join Date: Jul 2007
Location: Virginia Tech
Quote:
Originally Posted by t4ke5hi View Post
I know that! I'm not such newbie .

I was asking if I have to do this:

Code:
LoadPlugin(C:\Program Files\AviSynth 2.5\plugins\FFMPEGSource.dll)
FFMPEGSource("D:\JSM_01.mp4", timecodes="timecodes.txt")

Lanczos4Resize(848, 480)

TextSub("D:\Subs.ass")
Or n one AVS the video load and the resize and then in another script the video load and the hardsub, I think it won't be a problem but I don't like to especulate .
If the subs are at 848x480 resolution, it should have no problem. For the most part, at most resolutions it'll work. Only if it's like a karaoke or some super-complicated typeset will the script resolution pose issues. This you have to talk about with your typesetter/karaoke maker. You may want to go into aegisub, hit the blue box on the top, and check the script resolution there. If it's the same as what you're resizing to, it's no problem. If not, talk to the person who made the script. If you made the script, resize the subs to that size, and then check to make sure the typeset is working.

Though, I have some preferences seperate from what you are doing, in that my first script would not have any subs, just video, resize, and filters. Then I'd encode that to lagarith lossless. Then take that lossless and apply the subs, encode to h.264.
In addition, I hate the 848x480 resolution, so I'd be doing 720x480 and then set the anamorphic tag in mkvmerge. If you want to do that, that's easy to do too.
__________________
Kristen is offline   Reply With Quote
Old 2009-02-03, 12:53   Link #326
t4ke5hi
Junior Member
 
Join Date: Jan 2009
Thanks again. I don't like 16:9 too, but the raw it's 16:9 and I want to keep the AR. If I've understood wel what you said, mkvmerge can fix it. I'll try that too.
t4ke5hi is offline   Reply With Quote
Old 2009-02-03, 13:56   Link #327
Kristen
Senior Member
*Author
 
 
Join Date: Jul 2007
Location: Virginia Tech
Quote:
Originally Posted by t4ke5hi View Post
Thanks again. I don't like 16:9 too, but the raw it's 16:9 and I want to keep the AR. If I've understood wel what you said, mkvmerge can fix it. I'll try that too.
848x480 is actually 53:30 ratio, so 15.9:9. Proper 16:9 is 853.33333(Repeating)x480. But 853.33333 is not mod16, much less mod2, so it is bad for compression. So to get proper 16:9, you encode to a lower resolution and put on an anamorphic flag on it. You can go to 848x480 and anamorphicize it, but it will probably look no different than 720x480 with the anamorphic flag. 720x480 is less pixels to encode, so it'll be more compressible, AKA, more bang for the file size you ask.

If you don't mind the 15.9:9 ratio, then 848x480 is the way to go. If you do, then set an anamorphic flag on it.
__________________
Kristen is offline   Reply With Quote
Old 2009-02-03, 16:39   Link #328
martino
makes no files now
 
 
Join Date: May 2006
704x480 is also an option, when you have border noise and want to crop it off without resizing back up.
__________________
"Light and shadow don't battle each other, because they're two sides of the same coin"
martino is offline   Reply With Quote
Old 2009-02-03, 22:51   Link #329
t4ke5hi
Junior Member
 
Join Date: Jan 2009
I'm here and with a new problem!

I'm using this to open the mp4 raw:

LoadPlugin(C:\Program Files\AviSynth 2.5\plugins\FFMPEGSource.dll)
LoadPlugin(path to tweak)
LoadPlugin(path to vsfilter)
Import(path to LimitedSharpenFaster)

FFMPEGSource("D:\JSM_01.mp4", timecodes="timecodes.txt")

Tweak("parameters here")

LimitedSharpenFaster("another parameters here")

Lanczos4Resize(848, 480)

TextSub("D:\Subs.ass")

But when I load this AVS into MeGUI, it tells me that I have to use ConvertToYV12() because my colorspace is in I420, and even if I add this command, MeGUI keeps telling that no matter what I do if I add ConvertToYV12() the colorspace will be in I420.

What can I do?
t4ke5hi is offline   Reply With Quote
Old 2009-02-04, 09:43   Link #330
Kristen
Senior Member
*Author
 
 
Join Date: Jul 2007
Location: Virginia Tech
Quote:
Originally Posted by t4ke5hi View Post
I'm here and with a new problem!

I'm using this to open the mp4 raw:

LoadPlugin(C:\Program Files\AviSynth 2.5\plugins\FFMPEGSource.dll)
LoadPlugin(path to tweak)
LoadPlugin(path to vsfilter)
Import(path to LimitedSharpenFaster)

FFMPEGSource("D:\JSM_01.mp4", timecodes="timecodes.txt")
Tweak("parameters here")
LimitedSharpenFaster("another parameters here")
Lanczos4Resize(848, 480)
TextSub("D:\Subs.ass")

But when I load this AVS into MeGUI, it tells me that I have to use ConvertToYV12() because my colorspace is in I420, and even if I add this command, MeGUI keeps telling that no matter what I do if I add ConvertToYV12() the colorspace will be in I420.

What can I do?
Did you try adding it between FFMPEGSource and Tweak, or at the end of the script? Because it was probably 2 colorspace issues, the first being the lack of YV12 for h.264, the second being that some of your filters require YV12.

Try it like this:

LoadPlugin(C:\Program Files\AviSynth 2.5\plugins\FFMPEGSource.dll)
LoadPlugin(path to tweak)
LoadPlugin(path to vsfilter)
Import(path to LimitedSharpenFaster)
FFMPEGSource("D:\JSM_01.mp4", timecodes="timecodes.txt")
ConverttoYV12()
Tweak("parameters here")
LimitedSharpenFaster("another parameters here")
Lanczos4Resize(848, 480)
TextSub("D:\Subs.ass")

Otherwise, you will be applying your filters to I420 colorspace, which may cause one of them to create an exception.
__________________
Kristen is offline   Reply With Quote
Old 2009-02-04, 11:29   Link #331
TheFluff
Excessively jovial fellow
 
 
Join Date: Dec 2005
Location: ISDB-T
Age: 28
Quote:
Originally Posted by Kristen View Post
Did you try adding it between FFMPEGSource and Tweak, or at the end of the script? Because it was probably 2 colorspace issues, the first being the lack of YV12 for h.264, the second being that some of your filters require YV12.

Try it like this:

LoadPlugin(C:\Program Files\AviSynth 2.5\plugins\FFMPEGSource.dll)
LoadPlugin(path to tweak)
LoadPlugin(path to vsfilter)
Import(path to LimitedSharpenFaster)
FFMPEGSource("D:\JSM_01.mp4", timecodes="timecodes.txt")
ConverttoYV12()
Tweak("parameters here")
LimitedSharpenFaster("another parameters here")
Lanczos4Resize(848, 480)
TextSub("D:\Subs.ass")

Otherwise, you will be applying your filters to I420 colorspace, which may cause one of them to create an exception.
No. Avisynth doesn't even support I420 (which is exactly the same thing as YV12, just with the order of the U and V planes swapped), it's an MeGUI bug. No idea how to fix it though since I never use MeGUI.

edit: Myrsloik informs me that Avisynth actually does support I420 internally, but it's never exposed to the user.
__________________
| ffmpegsource
17:43:13 <~deculture> Also, TheFluff, you are so fucking slowpoke.jpg that people think we dropped the DVD's.
17:43:16 <~deculture> nice job, fag!

01:04:41 < Plorkyeran> it was annoying to typeset so it should be annoying to read

Last edited by TheFluff; 2009-02-04 at 20:53.
TheFluff is offline   Reply With Quote
Old 2009-02-04, 11:37   Link #332
t4ke5hi
Junior Member
 
Join Date: Jan 2009
Yep, I tried that but MeGUI still shows that message. I thought that LimitedSharpenFaster was the problem so I deleted it from the AVS, then I deleted tweak but the message didn't disappear. After that I found the documentation of LimitedSharpenFaster and Tweak, the first one accept many colorspaces that includes YV12 and the second one only YV12. So I added ConvertToYV12 after FFMpegSource and between the filters and the TextSub command but the message still appears.


EDiTeD:

Quote:
Originally Posted by TheFluff View Post
No. Avisynth doesn't even support I420 (which is exactly the same thing as YV12, just with the order of the U and V planes swapped), it's an MeGUI bug. No idea how to fix it though since I never use MeGUI.
I posted before reading TheFluff answer. What a silly bug! If it's only bug I supose that my script is ok and if I encode it with MeGUI this bug will not affect the result.

Thanks for helping again.

Last edited by t4ke5hi; 2009-02-04 at 11:48.
t4ke5hi is offline   Reply With Quote
Old 2009-02-04, 11:41   Link #333
Plorkyeran
Member
 
Join Date: Dec 2007
There's no problems other than that MeGUI is buggy. Just disable the warning and run the encode.
Plorkyeran is offline   Reply With Quote
Old 2009-02-04, 19:09   Link #334
neothe0ne
Senior Member
 
 
Join Date: Mar 2008
ConvertToRGB and then ConvertToYV12

At least I killed a bug that way when encoding an eyecancer XviD video.
__________________
neothe0ne is offline   Reply With Quote
Old 2009-02-05, 21:32   Link #335
t4ke5hi
Junior Member
 
Join Date: Jan 2009
It's me! Again

Now I'm getting a kind of blur around the hardsub. I don't know why because in the preview this is not happening (in fact in the preview of AvsP the video looks better). Do I have to use a filter to removing that blur? Or could it be a wrong x264 setting?

AVS
Code:
Lanczos4Resize(848, 480)
vmtoon(sharpen=false, thinning=0, strength=48, luma_cap=190, threshold=8)
LimitedSharpenFaster(ss_x=1.6, ss_y=1.6, dest_x=848, dest_y=480, 
                        \Smode=4, strength=100, wide=true, soft=8, edgemode=0 )
Tweak(sat=1.24, cont=1.09, bright=-6) ## sat=1.24, cont=1.09, bright=-8

# hardsubb
TextSub("D:\Subs.ass")
x264 (MeGUI)
Code:
program --pass 2 --bitrate 836 --stats ".stats" --level 5.1 --ref 8
--mixed-refs --no-fast-pskip --bframes 3 --b-adapt 2 --b-pyramid --weightb
--direct auto --trellis 2 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh
--merange 32 --threads auto --thread-input --progress --no-psnr --no-ssim
--output "output" "input"
Thanks again for helping.
t4ke5hi is offline   Reply With Quote
Old 2009-02-05, 22:03   Link #336
TheFluff
Excessively jovial fellow
 
 
Join Date: Dec 2005
Location: ISDB-T
Age: 28
Quote:
Originally Posted by t4ke5hi View Post
It's me! Again

Now I'm getting a kind of blur around the hardsub. I don't know why because in the preview this is not happening (in fact in the preview of AvsP the video looks better). Do I have to use a filter to removing that blur? Or could it be a wrong x264 setting?

AVS
Code:
Lanczos4Resize(848, 480)
vmtoon(sharpen=false, thinning=0, strength=48, luma_cap=190, threshold=8)
LimitedSharpenFaster(ss_x=1.6, ss_y=1.6, dest_x=848, dest_y=480, 
                        \Smode=4, strength=100, wide=true, soft=8, edgemode=0 )
Tweak(sat=1.24, cont=1.09, bright=-6) ## sat=1.24, cont=1.09, bright=-8

# hardsubb
TextSub("D:\Subs.ass")
x264 (MeGUI)
Code:
program --pass 2 --bitrate 836 --stats ".stats" --level 5.1 --ref 8
--mixed-refs --no-fast-pskip --bframes 3 --b-adapt 2 --b-pyramid --weightb
--direct auto --trellis 2 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh
--merange 32 --threads auto --thread-input --progress --no-psnr --no-ssim
--output "output" "input"
Thanks again for helping.
define "a kind of blur" (screenshot)
in general though if you want problems like that one solved, the solution is to softsub instead
__________________
| ffmpegsource
17:43:13 <~deculture> Also, TheFluff, you are so fucking slowpoke.jpg that people think we dropped the DVD's.
17:43:16 <~deculture> nice job, fag!

01:04:41 < Plorkyeran> it was annoying to typeset so it should be annoying to read
TheFluff is offline   Reply With Quote
Old 2009-02-05, 22:19   Link #337
t4ke5hi
Junior Member
 
Join Date: Jan 2009
Sorry, I forgot to put the screenshot. Here it is:



It's just around the subs (in spanish ). You can see it better in the black part of the screen, I recommend you to download the screenshot and zoom in. Thanks.
t4ke5hi is offline   Reply With Quote
Old 2009-02-06, 02:41   Link #338
Daiz
Pioneer in Fansub 2.0
 
 
Join Date: Aug 2007
It's called "ringing" and is caused by the fact that you are burning the subs to the image, making it more complex and harder to compress. You need to a) softsub (this is the preferred option) or b) increase the bitrate if you want to get rid of it.
__________________
"A good user is remembered from his posts, not from his 160px tall animated 'pink flying unicorns' signature picture."
---
The Guide for best H.264 playback
Daiz is offline   Reply With Quote
Old 2009-02-06, 10:32   Link #339
t4ke5hi
Junior Member
 
Join Date: Jan 2009
Quote:
Originally Posted by Daiz View Post
It's called "ringing" and is caused by the fact that you are burning the subs to the image, making it more complex and harder to compress. You need to a) softsub (this is the preferred option) or b) increase the bitrate if you want to get rid of it.
I will try option B first. Thanks!
t4ke5hi is offline   Reply With Quote
Old 2009-02-06, 22:42   Link #340
Dark Shikari
x264 Developer
 
 
Join Date: Feb 2008
You can also try decreasing the AQ strength; by default x264 will try to take a lot of bits away from sharp-edged subtitles to use somewhere else (as subtitles use so many bits, often a significant % of the total video's size).
Dark Shikari is offline   Reply With Quote
Reply

Thread Tools

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 -5. The time now is 21:43.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2015, vBulletin Solutions, Inc.
We use Silk.