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

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th November 2019, 10:35   #1041  |  Link
Rumbah
Registered User
 
Join Date: Mar 2003
Posts: 480
I have a script that converts a video with x264 and splits the source to X parts to encode the parts in parallel.
I found the performance to be better with less threads and more parts than with straight 36 threads per encode (a Ryzen 3900X with 12cores/24threads).

So I create the parts via Vapoursynth and L-Smash to get the cutting frame accurate so I have
Code:
video = core.lsmas.LWLibavSource(source=r"%Source%", cachefile=r"Q:\%directory%\video.lwi")
in more than one part of the script.

First it was just
Code:
video = core.lsmas.LWLibavSource(source=r"%Source%")
but I wanted all the temp files in one directory for easier cleaning after finishing. And I just forgot one place to change it so the lwi file got created in both places.
Rumbah is offline   Reply With Quote
Old 26th November 2019, 11:04   #1042  |  Link
fg118942
Registered User
 
Join Date: Aug 2018
Posts: 10
Quote:
Originally Posted by kedautinh12 View Post
Your build very good with many .ts but with some .ts duration of video doesn't match with duration of audio
Example:
https://drive.google.com/a/my.smccd....w?usp=drivesdk
Not patched FFmpeg, the Repeat First Field flags will not work, so you need to use the following patch.
https://gist.github.com/maki-rxrz/5a...853b5358fb8a29
__________________
I use machine translation because I am not good at English.
fg118942 is offline   Reply With Quote
Old 26th November 2019, 12:35   #1043  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Rumbah, thanx for the explanation.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 26th November 2019, 13:55   #1044  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by fg118942 View Post
Not patched FFmpeg, the Repeat First Field flags will not work, so you need to use the following patch.
https://gist.github.com/maki-rxrz/5a...853b5358fb8a29
Oh, but how i can use this??
kedautinh12 is offline   Reply With Quote
Old 26th November 2019, 15:27   #1045  |  Link
fg118942
Registered User
 
Join Date: Aug 2018
Posts: 10
Quote:
Originally Posted by kedautinh12 View Post
Oh, but how i can use this??
We'll have to wait for HolyWu to upload a new version with this patch applied.
After that, write the following avs.

LWLibavVideoSource("***.ts",repeat=true)
__________________
I use machine translation because I am not good at English.
fg118942 is offline   Reply With Quote
Old 27th November 2019, 00:51   #1046  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by fg118942 View Post
We'll have to wait for HolyWu to upload a new version with this patch applied.
After that, write the following avs.

LWLibavVideoSource("***.ts",repeat=true)
Nice, waiting for HolyWu
kedautinh12 is offline   Reply With Quote
Old 27th November 2019, 22:20   #1047  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
Thanks HolyWu.
Forteen88 is offline   Reply With Quote
Old 28th November 2019, 09:39   #1048  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by HolyWu View Post
https://github.com/HolyWu/L-SMASH-Wo...ks_20191127.7z
  • Fix MPEG-2 decoding issue with RFF flags. (maki-rxrz)
  • Fix interlaced H.264 decoding issue in some files.
Wow, thanks so much
kedautinh12 is offline   Reply With Quote
Old 28th November 2019, 10:18   #1049  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by HolyWu View Post
https://github.com/HolyWu/L-SMASH-Wo...ks_20191127.7z
  • Fix MPEG-2 decoding issue with RFF flags. (maki-rxrz)
  • Fix interlaced H.264 decoding issue in some files.
when i decoding LWLibavVideoSource("***.ts",repeat=true) with repeat=true can Fix MPEG-2 decoding issue with RFF flags (maki-rxrz) and Fix interlaced H.264 decoding issue in some files. Very nice
kedautinh12 is offline   Reply With Quote
Old 4th December 2019, 09:16   #1050  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
I found an MP4 video provided by the Mediathek of the German broadcaster ZDF. MediaInfo reports a framerate of 50 fps (720p50), AviSynth's Info() reports the same when using FFVideoSource or LwLibavVideoSource. But LSMASHVideoSource reports 0.0246 fps (1798/73073).

I wonder how to send you a sample. If I use any tool to cut out a small scene, it would create completely new headers, possibly fixing this issue. So I fear I would have to upload ~680 MB. And if you tried to download it using MediathekView, it might be geoblocked if you are outside Germany. (direct URL, may or may not work in a web browser)
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 4th December 2019 at 09:18.
LigH is offline   Reply With Quote
Old 4th December 2019, 12:11   #1051  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by HolyWu View Post
Well, I don't recommmend using LSMASHVideoSource as it's not frame accurate when random seeking even though it has the advantage of not requiring an index file. I once even considered dropping this filter from my fork.
Hmm I only encountered inaccurate frame seeking once with LSMASHVideoSource. I use it sometimes with big (40gb+) lossless avc+mp4 files, so it would be nice to keep it in this fork :-)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 4th December 2019, 15:01   #1052  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
I wanted to try updating 32 bit MeGUI 2525's lsmash that's on the wiki page in the hopes it'll stop the "Access Violation" thing it receives after indexing several m2ts files in a row and the program accumulates high memory MB's causing it to give errors only correcting when restarting the program plus I also noticed that as I frequently use film.trim sometimes the frame will be off by 1 frame but it'll still fit the frame cut amount which is really strange but doesn't happen often thankfully.

However, I'm receiving errors after it finishes idx then goes to oneclick and stops or continues to the next job. Thought of restarting MeGUI would fix that as it does when receiving the "Access Violation" but nope.

Used L-SMASH-Works_20191127 and used all previous versions with nothing.

The error says this:

Code:
--[Error] [12/4/2019 5:28:47 AM] An error occurred
---[Error] [12/4/2019 5:28:47 AM] Exception message: [Fatal]: Failed to avformat_open_input.
---[Error] [12/4/2019 5:28:47 AM] Stacktrace
----[NoImage]    at MeGUI.AviSynthClip..ctor(String func, String arg, AviSynthColorspace forceColorspace)
----[NoImage]    at MeGUI.AvsFile..ctor(String script, Boolean parse)
----[NoImage]    at MeGUI.lsmashFile..ctor(String fileName, String indexFile)
----[NoImage]    at MeGUI.OneClickPostProcessing.createAVSFile(String indexFile, String inputFile, Nullable`1 AR, Int32 desiredOutputWidth, 
Boolean signalAR, LogItem _log, AviSynthSettings avsSettings, 
Boolean autoDeint, VideoCodecSettings settings, Nullable`1& dar, Boolean autoCrop, Boolean keepInputResolution, Boolean useChaptersMarks)
----[NoImage]    at MeGUI.OneClickPostProcessing.StartPostProcessing()
Won't let me encode either

Code:
--[Error] [12/4/2019 6:04:14 AM] Error starting job
---[Error] [12/4/2019 6:04:14 AM] Exception message
----[NoImage] Calling setup of processor failed with error 'The file Z:\projectbackup\megui\work\02lfrdg1.uif\00002.m2ts.avs cannot be opened.
----[NoImage] Error message for your reference: [Fatal]: Failed to avformat_open_input.
----[NoImage] (Z:\projectbackup\megui\work\02lfrdg1.uif\00002.m2ts.avs, line 2)'
---[Error] [12/4/2019 6:04:14 AM] Stacktrace:    at MeGUI.core.gui.JobWorker.startEncoding(TaggedJob job)
---[Error] [12/4/2019 6:04:14 AM] Inner exception: null
Line 2 is simply this: LWLibavVideoSource("Z:\projectbackup\megui\work\02lfrdg1.uif\00002.m2ts.lwi")

I have no issues when using r929 version except for the above mentioned. Maybe I'm doing something wrong but reading the log from what little I understand perhaps its at my end and I don't know how to solve it in MeGUI since it asked me awhile back to end the avs script with YV12 and its coming back to haunt me or I'm also using HBD with fake lsb with SetFilterMTMode + Prefetch(1) with 720p 4:4:4 HEVC 10 bit or a combination of it all.

As mentioned the pipeline for the fake lsb uses that too to both get around having to use --y4m and I dunno how to go about it for my script without it as HEVC won't let me as I don't know any other method or I just am not aware of it.

If anybody can let me know if I am doing something wrong. If I can't update I'll be fine using r929 version. I don't wanna change my script if possible.

Last edited by dREV; 4th December 2019 at 15:14. Reason: stuff
dREV is offline   Reply With Quote
Old 4th December 2019, 16:07   #1053  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Nice catch HW
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 4th December 2019, 20:09   #1054  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
possible regression on AV1 in webm container

It was my own stupid fault :
I used LibavSMASHSource instead of LWLibavSource : this can never work for a webm container !!

My apologies for my mistake.

Last edited by Pat357; 4th December 2019 at 20:28. Reason: post deleted: was my mistake
Pat357 is offline   Reply With Quote
Old 5th December 2019, 05:53   #1055  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by HolyWu View Post
Don't append .lwi in your source.
Can you help me understand what you mean? Because this 00002.m2ts.lwi is created by the MeGUI program itself.

The MeGUI program has a avisynth configuration dialog field that has already <input> then under it is where I place my script and the program does the rest all via one-click.

I don't know if I can do anything within the <input> code.

From the Wiki I've tried all previous version I was able to download and ver r935+26-20190712 or whatever version this is was able to work. The rest do the same error as the current version but with some difference.

Last edited by dREV; 5th December 2019 at 08:00. Reason: stuff
dREV is offline   Reply With Quote
Old 5th December 2019, 08:15   #1056  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Always use the name of the media file in LwLibavVideoSource. In MeGUI, open the media file in the dialog, not the index file.

If MeGUI prefers to load the index file instead of the media file in a specific operation mode, it is an issue in MeGUI and should be discussed in its related threads, with all possibly relevant details, how you use it, step by step, click by click...

You can still manually edit the generated AviSynth script in MeGUI before you add a task to its queue, to possibly walk around this issue, if you don't use it in a fully automated mode.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 5th December 2019, 20:15   #1057  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
A quick guess is the plugin used to read the media file inside lwi. Now the field is gone (why not), it's not possible to find the media file by index file.

So please always use media file as the source. lwi is just an index.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 6th December 2019, 10:35   #1058  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by LigH View Post
Always use the name of the media file in LwLibavVideoSource. In MeGUI, open the media file in the dialog, not the index file.

If MeGUI prefers to load the index file instead of the media file in a specific operation mode, it is an issue in MeGUI and should be discussed in its related threads, with all possibly relevant details, how you use it, step by step, click by click...

You can still manually edit the generated AviSynth script in MeGUI before you add a task to its queue, to possibly walk around this issue, if you don't use it in a fully automated mode.
The programs seems to want to load the index file instead then starts encoding from the source. I've tried to edit the avs script to target the source but not sure if I did it wrong or if MeGUI won't budge. The latest version of MeGUI still uses the same version from 2017 which takes a while to index compared to both HolyWu and MeteorRain's versions. The one that worked as noted above takes almost a minute which is way better but would like to use HolyWu for that 1 frame fix.

I'll ask the author of MeGUI and see if any replies.

Quote:
Originally Posted by MeteorRain View Post
A quick guess is the plugin used to read the media file inside lwi. Now the field is gone (why not), it's not possible to find the media file by index file.

So please always use media file as the source. lwi is just an index.
I can't do anything on that. I do everything via One-Click.

There is another method to encode using that program but I have zero experience how to go about it which is the first image on the official site https://sourceforge.net/projects/megui/ I have no idea how to encode without MeGUI doing its thing with the indexing in One-Click. If I can be given an example for me to try it out.

Is it just: Load l-smash > LWLibavVideoSource("path\00002.m2ts") ? Then the rest of my script?
Thanks for the replies.

Last edited by dREV; 6th December 2019 at 10:40. Reason: stuff
dREV is offline   Reply With Quote
Old 6th December 2019, 15:39   #1059  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Having read the last few posts....

MeGUI has been using the index file as the source for LWLibavVideoSource for as long as I can remember, just as it does for d2v index files. The Lsmash index file previously contained the path to the source file, so using it as the source in MeGUI's script creator worked as it does for DGIndex.
That's no doubt the issue, because MeGUI hasn't caught up to the change yet, which in my opinion is a step backwards. In the case of MeGUI, the working directory can be different to the directory where the source file is located, so opening the index file directly has always allowed the source to be re-opened in a new script by opening the index file, without MeGUI wanting to index it again, no matter where the index file is located (existing DGIndex index files can be used as the source for the same reasons). There's no way to manually type the source name/location when creating a new script via the script creator. You have to open a source file or an existing index file, and MeGUI creates a script using the index file as the source after indexing with Lsmash, or it expects to be able to open an existing one. It's a pity newer Lsmash versions don't work the same way, IMHO.

For ffms2, the path to the source isn't saved to the index file, but MeGUI still allows you to open the index file directly, however I think it must have the same name as the source file including the original extension, followed by the ffindex extension (that's how MeGUI creates the index file anyway). MeGUI then knows to create a script using the original file name for the source with the ffms2 cachefile argument pointing to the existing index file, rather than having to repeat the indexing process. It's not as convenient as indexing with DGIndex or Lsmash (once) was though, if you want to create a new script from scratch, because the index file has to be located in the same directory as the source file for it to work.
Does the newer Lsmash have the same cachefile argument, or is MeGUI going to be forced to re-index a source file to open it it in a new script (or maybe taught to check for an existing index file)?

One disadvantage of indexing with Lsmash in the past is it hasn't been possible for MeGUI to tell Lsmash not to index the audio when it's not necessary, which it can for ffms2. I also recall reading that this can now be done for newer LSmash versions, so it's no doubt another change that will require MeGUI to be updated for in the future.

PS I assume MeGUI always includes the original extension in the script and index file names to avoid conflicts when the output directory and the source directory are the same. ie for a source file named video.mkv the script would be named video.mkv.avs, the index file video.mkv.lwi, and the output file video.mkv.mkv.

Last edited by hello_hello; 6th December 2019 at 17:37.
hello_hello is offline   Reply With Quote
Old 7th December 2019, 03:02   #1060  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
Quote:
Originally Posted by hello_hello View Post
You have to open a source file or an existing index file, and MeGUI creates a script using the index file as the source after indexing with Lsmash, or it expects to be able to open an existing one.
I don't use MeGUI and I never thought this was even a problem. During my life I never tried putting lwi in the source position, hence I had the wrong assumption.

So how does it index the source then. Usually I put the media in the source position, you know, lwlibavvideosource(media), load it in some sort of GUI and the indexing is done. You say that MeGUI creates index first and then creates the script? I'm very confused now.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 14:37.


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