View Full Version : StaxRip 2.0 Support Thread
Atlantis
23rd June 2020, 20:02
Oh, Avisynth is portable now in staxrip? I remember it installed Avisynth. Mine is still global, pointing to C:. Any advantages, disadvantages?
Atlantis
23rd June 2020, 20:08
What benefits do you get from extracting DTS to core during the demuxing stage vs extracting DTS to core via the muxing process?
Because as I explained, some people want to encode the 5.1 DTS core. Some people do not want to keep the DTS core. They want to encode it to AAC 5.1 for example.
jlw_4049
23rd June 2020, 20:10
Because as I explained, some people want to encode the 5.1 DTS core. Some people do not want to keep the DTS core. They want to encode it to AAC 5.1 for example.You can do that without extracting it. You can right click the bottom audio#1 in staxrip and encode aac or ac3 5.1 or what ever you want from the higher quality DTS HD track.
Sent from my SM-G986U1 using Tapatalk
Atlantis
23rd June 2020, 20:16
I don't understand, doesn't that encode the DTS HD track? I do not want that. DTS HD track can be 6.1 or 7.1. I want to encode the core which is 5.1. I want only 5.1.
UPDATE: If you say to it to convert the DTS HD 7.1 to 5.1. It is not the original mix. It is modifying and mixing the channels. God knows what happens in the final mix. But if you encode the original 5.1 mix, the channels and the mix will be the original untouched.
What happens when it is downmixing 7.1 to 5.1?
Atlantis
23rd June 2020, 20:30
It's supported in the eac3to demuxer, there is a menu preset for it.
If it's possible what is the step by step to do this inside staxrip GUI?
I want to encode a video in staxrip. I open it in staxrip.
I want to encode the video and only the DTS core. Is there a step by step to do it all in staxrip GUI without leaving?
jlw_4049
23rd June 2020, 20:44
I don't understand, doesn't that encode the DTS HD track? I do not want that. DTS HD track can be 6.1 or 7.1. I want to encode the core which is 5.1. I want only 5.1.
UPDATE: If you say to it to convert the DTS HD 7.1 to 5.1. It is not the original mix. It is modifying and mixing the channels. God knows what happens in the final mix. But if you encode the original 5.1 mix, the channels and the mix will be the original untouched.
What happens when it is downmixing 7.1 to 5.1?That's something someone with a lot more knowledge on audio would have to explain.
As far as I know StaxRip doesn't support this on demux. Maybe stax76 can add it in.
Im assuming you know that you can extract core with ffmpeg and ea3cto.
EDIT: Upon some testing mkvextract CLI (That I'm 99% sure StaxRip uses to demux) doesn't support extracting DTS to core. It only extracts it to raw data that is the full DTS-HD file. I'll do some more digging and see if it's possible.
stax76
23rd June 2020, 21:07
The eac3to demuxing dialog is typically used for BD folder demuxing and for M2TS demuxing, it can also be used to demux other things like mkv, probably not a good idea to change the default mkv demuxer from mkvmerge to eac3to. There is however a decoupled demuxing feature under:
Tools > Advanced > Demux.
eac3to does unlike mkvextract support Core only demuxing, maybe somebody should request it for mkvextract which extracts dtshd even when the dts file extension is used, I don't see how that makes sense.
If you open a mkv file with default settings then you have either dtshd in mkv or you have it demuxed, in both cases the audio processing is a two-step process not directly supported by staxrip. You've two options:
1. Instead of using the GUI audio encoder you can use the CLI audio encoder, this is somehow advanced, ideally for people that like working with command line.
2. You can create an GUI audio profile that does nothing but extracting the core. Directly after you opened the source you can choose this audio profile, go into the audio dialog and choose the option Execute Command Line, while this is processing you can do other things like choosing video filters etc., when extracting completes, right-click the audio track in the main dialog and select the extracted DTS Core file as audio source, then choose your aac or opus profile.
jlw_4049
23rd June 2020, 21:17
@Atlantis
I asked if it was possible in the proper thread for this. https://forum.doom9.org/showthread.php?p=1916504#post1916504
If the author adds the feature to the program then I'm sure Stax76 can easily add it to the Demuxer GUI.
JKyle
23rd June 2020, 22:52
2. You can create an GUI audio profile that does nothing but extracting the core.
Two methods are possible.
1. Create a new audio profile based on Copy/Mux with Extract DTS Core feature.
Or
2. Create a new command line audio profile that uses ffmpeg.
A screenshot for this:
https://i.imgur.com/aMRZ2yd.jpg
The command line:
"%app:ffmpeg%" -analyzeduration 100M -probesize 50M -i "%input%" -bsf:a dca_core -c:a copy -y -hide_banner "%output%"
You can create either of these audio profiles by launching an empty StaxRip session and clicking Audio > Edit Profiles... > Add > Copy/Mux or Command Line.
(I guess these two are basically the same though.)
And the rest is as @stax76 explained:
After the source file is opened, choose either of these two profiles in the corresponding DTS-HD audio track, right-click the track, and run "Execute".
After the core is successfully extracted, right-click the audio track again and choose the extracted dts audio file for re-encoding.
44vince44
24th June 2020, 07:45
JKyle, the following command is enough to extract DTS Core
"%app:ffmpeg%" -i "%input%" -bsf:a dca_core -c:a copy -y -hide_banner "%output%"
Is there a specific reason you would need -analyzeduration and -probesize ?
For the rest I think you gave the best solution possible !
JKyle
24th June 2020, 08:10
Is there a specific reason you would need -analyzeduration and -probesize ?
They are for ensuring more accurate stream info detection.
Some containers, esp. MPEG-2 transport streams like ts, m2ts, and mts, have a very tiny packet size, and therefore are more prone to stream probe failure.
In those cases, ffmpeg yields the following error message and comes up with the -analyzeduration and -probesize options.
Could not find codec parameters for stream 0: unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
44vince44
24th June 2020, 11:45
Thanks JKyle I didnt know that. i'll update my profiles accordingly.
jlw_4049
24th June 2020, 12:20
They are for ensuring more accurate stream info detection.
Some containers, esp. MPEG-2 transport streams like ts, m2ts, and mts, have a very tiny packet size, and therefore are more prone to stream probe failure.
In those cases, ffmpeg yields the following error message and comes up with the -analyzeduration and -probesize options.
Could not find codec parameters for stream 0: unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' optionsThanks for the information
Sent from my SM-G986U1 using Tapatalk
hevron
24th June 2020, 20:42
StaxRip-x64-2.1.3.5-beta, demuxing problem :(
Failed to create soft link.
G:\...\StaxRip-x64-2.1.3.5-beta\Apps\Encoders\ffmpeg\AviSynth.dll
And so every time...
17394
JKyle
25th June 2020, 01:55
Failed to create soft link.
G:\...\StaxRip-x64-2.1.3.5-beta\Apps\Encoders\ffmpeg\AviSynth.dll
In order to create a symbolic link on Windows 10, you need to launch a Command Prompt with admin rights.
1) Click Win+r
2) Type cmd
3) Ctrl + Shift + Enter
4) cd to the folder where ffmpeg.exe is located.
5) Create a symbolic link to AviSynth.dll there like this (full path should be specified):
mklink AviSynth.dll G:\...\StaxRip-x64-2.1.3.5-beta\Apps\FrameServer\AviSynth\AviSynth.dll
For further info, refer to this post (https://www.maketecheasier.com/create-symbolic-links-windows10/).
...
But on second thought, do we even need to do this for StaxRip?
I see similar reports of failure to create symlinks for AviSynth.dll here and there, but as for me, I'm not experiencing this problem as of now for both installed and portable AviSynth implementations in fresh start of StaxRip.
Is it something that happens when ffmpeg is employed for preprocessing?
AFAIK, Patman's ffmpeg is built with AviSynth support. Does ffmpeg require AviSynth.dll when it takes an avs input in this case?
But wait. Patman's ffmpeg is static, which means it doesn't depend on external dlls. What am I missing here?
Someone with knowledge please enlighten me. :confused:
hevron
25th June 2020, 13:08
mklink AviSynth.dll G:\...\StaxRip-x64-2.1.3.5-beta\Apps\FrameServer\AviSynth\AviSynth.dll
Did not help…
Unable to create file because it already exists
P.S. Why do I need a Command Prompt if I use software???
stax76
25th June 2020, 13:43
@JKyle
On my system which is pretty much default Win 10, soft link creation does not require elevated privileges.
If soft link creation of staxrip fails then maybe starting staxrip as admin once for soft link creation might help.
Creating the links manually will not work however, staxrip uses absolute paths for soft link creation, it saves the location in the settings only if the creation succeeds and verifies that the staxrip location hasn't changed, if the creation did not succeed or the location has changed then staxrip will recreate the links.
It's probably not working in Win 7, even with elevated privileges Win 7 might not allow creation without changing permissions.
If avisynth 3.6.1 x64 is installed then users can go into the staxrip settings dialog and disable portable mode, after staxrip is restarted it will use the installed avisynth and don't create any soft links.
hevron
25th June 2020, 14:11
It's probably not working in Win 7, even with elevated privileges Win 7 might not allow creation without changing permissions.
If avisynth 3.6.1 x64 is installed then users can go into the staxrip settings dialog and disable portable mode, after staxrip is restarted it will use the installed avisynth and don't create any soft links.
Win 10 x64, avisynth not installed.
Probably now you need to run only with administrator rights.
JKyle
25th June 2020, 14:15
Creating the links manually will not work however, staxrip uses absolute paths for soft link creation, it saves the location in the settings only if the creation succeeds and verifies that the staxrip location hasn't changed, if the creation did not succeed or the location has changed then staxrip will recreate the links.
I see.
But as I mentioned in the other thread (https://forum.doom9.org/showthread.php?p=1916701#post1916701), you need Developer Mode enabled to avoid elevation. As a Windows 10 Home user who has updated Windows 10 since before the Creators Update was released, I myself didn't realize this mode was disabled by default. I was able to create symlinks without admin privileges only after I enabled this mode.
I think many users are in the same situation. And that's why they're experiencing soft link creation failure issues when they don't have an installed AviSynth version on their system.
hevron
25th June 2020, 15:29
2.1.3.6 Beta
Incorrect command line using VapourSynth
Thank you, works good
Atlantis
27th June 2020, 04:06
What site should I use to post a sample video? It's 35MB.
JKyle
27th June 2020, 06:56
What site should I use to post a sample video? It's 35MB.
AFAIK, any file share service such as Dropbox, OneDrive, Google Drive, Mega, WeTransfer, Smash(https://fromsmash.com/) etc. will serve the purpose at no charge.
On Google Drive, for example, upload the video file to your Google Drive, create a shareable link to the file (so that anyone with the link can get access to it), and paste the link in your post.
The quota for a free Google Drive account is 15GB, so it's more than enough for your file.
If you have a Gmail account, you're already having a Google Drive account at your Gmail address.
theincognito
27th June 2020, 17:24
...
@stax76
StaxRip-x64-2.1.3.7-beta
2 pass x265 encode seems to be broken.
Log:
Error Video encoding (2.1.3.7)
Video encoding returned error exit code: -1073741819 (0xC0000005)
--------------------------- Video encoding ---------------------------
x265 3.4.0.7
avs2pipemod[info]: writing 31025 frames of 24000/1001 fps, 1920x1080,
sar 0:0, YUV-420-planar-8bit progressive video.
avs2pipemod[info]: finished, wrote 5 frames [0%].
avs2pipemod[info]: total elapsed time is 0.251 sec.
avs2pipemod[error]: only wrote 5 of 31025 frames.
StaxRip.ErrorAbortException: Video encoding returned error exit code: -1073741819 (0xC0000005)
--------------------------- Video encoding ---------------------------
x265 3.4.0.7
avs2pipemod[info]: writing 31025 frames of 24000/1001 fps, 1920x1080,
sar 0:0, YUV-420-planar-8bit progressive video.
avs2pipemod[info]: finished, wrote 5 frames [0%].
avs2pipemod[info]: total elapsed time is 0.251 sec.
avs2pipemod[error]: only wrote 5 of 31025 frames.
at StaxRip.Proc.Start() in D:\Projekte\VB\staxrip\General\Proc.vb:line 372
at StaxRip.x265Enc.Encode(String passName, String commandLine, ProcessPriorityClass priority) in D:\Projekte\VB\staxrip\Encoding\x265Enc.vb:line 120
at StaxRip.x265Enc.Encode() in D:\Projekte\VB\staxrip\Encoding\x265Enc.vb:line 43
at System.Threading.Tasks.Parallel.<>c__DisplayClass4_0.<Invoke>b__0()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at StaxRip.GlobalClass.ProcessJob(String jobPath) in D:\Projekte\VB\staxrip\General\GlobalClass.vb:line 312
jlw_4049
27th June 2020, 17:27
@stax76
StaxRip-x64-2.1.3.7-beta
2 pass x265 encode seems to be broken.
Log:
Error Video encoding (2.1.3.7)
Video encoding returned error exit code: -1073741819 (0xC0000005)
--------------------------- Video encoding ---------------------------
x265 3.4.0.7
avs2pipemod[info]: writing 31025 frames of 24000/1001 fps, 1920x1080,
sar 0:0, YUV-420-planar-8bit progressive video.
avs2pipemod[info]: finished, wrote 5 frames [0%].
avs2pipemod[info]: total elapsed time is 0.251 sec.
avs2pipemod[error]: only wrote 5 of 31025 frames.
StaxRip.ErrorAbortException: Video encoding returned error exit code: -1073741819 (0xC0000005)
--------------------------- Video encoding ---------------------------
x265 3.4.0.7
avs2pipemod[info]: writing 31025 frames of 24000/1001 fps, 1920x1080,
sar 0:0, YUV-420-planar-8bit progressive video.
avs2pipemod[info]: finished, wrote 5 frames [0%].
avs2pipemod[info]: total elapsed time is 0.251 sec.
avs2pipemod[error]: only wrote 5 of 31025 frames.
at StaxRip.Proc.Start() in D:\Projekte\VB\staxrip\General\Proc.vb:line 372
at StaxRip.x265Enc.Encode(String passName, String commandLine, ProcessPriorityClass priority) in D:\Projekte\VB\staxrip\Encoding\x265Enc.vb:line 120
at StaxRip.x265Enc.Encode() in D:\Projekte\VB\staxrip\Encoding\x265Enc.vb:line 43
at System.Threading.Tasks.Parallel.<>c__DisplayClass4_0.<Invoke>b__0()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at StaxRip.GlobalClass.ProcessJob(String jobPath) in D:\Projekte\VB\staxrip\General\GlobalClass.vb:line 312What was your source file?
I had this issue before when I was using the wrong settings for a source file.
Sent from my SM-G986U1 using Tapatalk
stax76
27th June 2020, 19:24
I just tried and it's generally working. Your log file says:
avs2pipemod[error]: only wrote 5 of 31025 frames.
So avs2pipemod has problems with your script, if it's reproducible then please post the full log to pastebin, relevant info in there is:
- source file media info
- avisynth script.
- command line
Possible workaround is:
x265 dialog > Input/Output > Pipe > ffmpeg
Or just enter pipe in the search field in the left bottom of the dialog.
theincognito
27th June 2020, 19:36
What was your source file?
I had this issue before when I was using the wrong settings for a source file.
Sent from my SM-G986U1 using Tapatalk
No, the setting is the same which worked previously. It wasn't that.
I just tried and it's generally working. Your log file says:
avs2pipemod[error]: only wrote 5 of 31025 frames.
So avs2pipemod has problems with your script, if it's reproducible then please post the full log to pastebin, relevant info in there is:
- source file media info
- avisynth script.
- command line
Possible workaround is:
x265 dialog > Input/Output > Pipe > ffmpeg
Or just enter pipe in the search field in the left bottom of the dialog.
Well, you both pointed me in the right direction. It wasn't the settings. And it didn't need the pipe change. The filename was too long. I renamed it and voila! It works now. :) Thanks a lot :)
jlw_4049
27th June 2020, 19:54
No, the setting is the same which worked previously. It wasn't that.
Well, you both pointed me in the right direction. It wasn't the settings. And it didn't need the pipe change. The filename was too long. I renamed it and voila! It works now. :) Thanks a lot :)Leave the program at the default 150 character and you'll avoid this problem.
I believe stax said it was a limitation of .net and windows.
However I could be wrong.
Sent from my SM-G986U1 using Tapatalk
stax76
27th June 2020, 22:59
My favorite problem again :), what's planned next for this is shortening temp file paths, there is a tracker issue marked with high priority, it will be addressed after the summer break.
jlw_4049
27th June 2020, 23:09
My favorite problem again :), what's planned next for this is shortening temp file paths, there is a tracker issue marked with high priority, it will be addressed after the summer break.I would love if you could increase the limit haha [emoji14]
Sent from my SM-G986U1 using Tapatalk
Atlantis
29th June 2020, 01:16
I want to test new avs filters in staxrip [Neo] FFT3D / DFTTest (https://forum.doom9.org/showthread.php?t=181294) which are supposed to be a lot faster.
How am I supposed to do it? I need to write for example
LoadPlugin("neo-fft3d.dll")
neo_fft3d(sigma=2.0, bt=3)
Can I add it in the profiles
neo_fft3d(sigma=2.0, bt=3)
and when selected the
LoadPlugin("neo-fft3d.dll")
be added automatically at the beginning? Is that in the hands of the user?
For the moment I add in the edit code
LoadPlugin("Z:\..........................................\StaxRip\Apps\Plugins\AVS\FFT3DFilter\neo-fft3d.dll")
neo_fft3d(sigma=2.0, bt=3)
interestingly, staxrip also automatically adds
LoadPlugin("Z:\..........................................\StaxRip\Apps\Plugins\AVS\FFT3DFilter\fft3dfilter.dll")
Any idea why? I have copied the neo-fft3d.dll in the same folder as fft3dfilter.dll
JKyle
29th June 2020, 04:08
I want to test new avs filters in staxrip [Neo] FFT3D / DFTTest (https://forum.doom9.org/showthread.php?t=181294) which are supposed to be a lot faster.
How am I supposed to do it?
■ If you're using installed versions of AVS and VS,
follow these steps:
Since Neo FFT3D supports both AVS and VS, I think you better put the dll file in the Dual plugins folder.
I assume you put it in %startup_dir%Apps\Plugins\Dual\Neo FFT3D.
[AviSynth+]
Because this new plugin is not registered internally in StaxRip yet, you need to add LoadPlugin(...) line in the Profiles code.
Since FFT3DFilter and FFT3DGPU are registered as sub-items under FFT3DFilter, you better put Neo FFT3D as another sub-item under the same main item FFT3DFilter like this:
FFT3DFilter | FFT3D (Neo) =
LoadPlugin("%startup_dir%Apps\Plugins\Dual\Neo FFT3D\neo-fft3d.dll")
neo_fft3d(sigma=2.0, bt=3, y=3, u=3, v=3)
(Put an empty line before and after.)
[VapourSynth]
Almost the same as with avs except for some adjustments in order to meet the syntax.
Since no FFT3D related filters are registered in the default VS Profiles (weird :confused:), you can add it as a main item in the Profiles like this:
FFT3D (Neo) =
core.std.LoadPlugin(r"%startup_dir%Apps\Plugins\Dual\Neo FFT3D\neo-fft3d.dll")
clip = core.neo_fft3d.FFT3D(clip, sigma=2.0, bt=3, planes=[0,1,2])
Again, you need to put an empty line before and after.
-------------------
As for Neo DFTTest, it's already registered internally, but only for VS although it supports both AVS and VS.
And its code exists in the Profiles but only for VS.
(However, it calls unnecessary DFTTest.dll along with neo-dfttest.dll, which is kind of redundant.)
//
Note for @stax76:
I guess Neo DFTTest folder needs to be relocated to under Dual in order to avoid clutter.
//
Anyway, if you'd like to put it in AVS Profiles as well, insert the following code under DFTTest in Profiles:
DFTTest (Neo) =
LoadPlugin("%startup_dir%Apps\Plugins\VS\DFTTest Neo\neo-dfttest.dll")
neo_dfttest(ftype=0, sigma=2.0, y=3, u=3, v=3)
Again, you need to put an empty line before and after.
(But LoadPlugin("...\dfttest.dll") is inserted unnecessarily in the script code just as in VS, and you have to live with it unless @stax76 fixes this problem or you delete the line manually in the avs file. :()
===============================================
<Note>
Per @stax76's advice (https://forum.doom9.org/showpost.php?p=1917053&postcount=2039), I suggest you better put custom filters somewhere under %settings_dir%Plugins instead of %startup_dir%Apps\Plugins for maintenance of the app itself.
In that case, you need to modify the code a little bit accordingly.
===============================================
■ If you're using portable versions of AVS and VS,
just put the plugins in Tools > Folers > Plugins folder, and they will autoload.
(See this post (https://forum.doom9.org/showpost.php?p=1917028&postcount=2036) by @44vince44.)
In this case, you just need to add the filters in AVS/VS profiles without LoadPlugin lines.
JKyle
29th June 2020, 05:11
@stax76:
Currently, calling Neo f3kdb and DFTTest Neo filters invokes unnecessary old dlls. (flash3kyuu_deband.dll in AVS for Neo f3kdb, DFTTest.dll in VS for DFTTest Neo).
I think you need to clean up this mess.
And for future addition of Neo plugins, please keep consistency in naming the plugins (Neo ~ vs ~ Neo).
:thanks: in advance.
# I put these as issues on the official StaxRip GitHub repo.
44vince44
29th June 2020, 08:01
Well just be careful, since there are still major issues (multithreading, leaking) being adressed in these plugins. Keep watching the releases. I would't advise to make the switch right now.
44vince44
29th June 2020, 08:03
And remember that Staxrip has now a structure for external plugins, if you are using portable AVS and portable VS: open Menu Tools > Folders > Plugins, there you can put the AVS and VS external plugins. They will autoload. This folder is in the settings folder, so the plugins are kept along with your settings.
Plugins in those folders are autoloaded.
JKyle
29th June 2020, 08:40
Well just be careful, since there are still major issues (multithreading, leaking) being adressed in these plugins. Keep watching the releases. I would't advise to make the switch right now.
I see. Noted.
And remember that Staxrip has now a structure for external plugins, if you are using portable AVS and portable VS: open Menu Tools > Folders > Plugins, there you can put the AVS and VS external plugins. They will autoload.
I updated my post accordingly. :thanks:
Atlantis
29th June 2020, 09:57
Thanks. Yes my staxrip is using the global installed AviSynth. How can I tell it to use the portable version?
Tools > Folders > Plugins goes here for me.
C:\Program Files\AviSynth+\plugins64+
It's a mess. If I uninstall the main AviSynth, it will point to the portable?
Also I have no experience with the portable version, will I be able to use avs scripts on my system out of staxrip?
stax76
29th June 2020, 13:25
@JKyle
Wouldn't it be easier putting custom filters in the settings folder? A customized startup folder cannot be replaced with a new staxrip version without loosing customized files.
Currently, calling Neo f3kdb and DFTTest Neo filters invokes unnecessary old dlls. (flash3kyuu_deband.dll in AVS for Neo f3kdb, DFTTest.dll in VS for DFTTest Neo).
The dependencies are loaded automatically, possibly this detection can be improved or replaced with another design. It's probably still more efficient than using the plugin auto load feature because as far as I know it loads all plugins contained in the auto load folder into memory, I don't know much about it but this approach appears inefficient to me compared to a delay load approach where manifest data is loaded first.
Thanks. Yes my staxrip is using the global installed AviSynth. How can I tell it to use the portable version?
I suggest using the last beta because it fixes portable mode issues. Portable mode is enabled by default in the last beta, there is a setting:
Tools > Settings > General > Use included portable AviSynth
Tools > Settings > General > Use included portable VapourSynth
Plugin auto loading is supported in portable mode and in non-portable mode, the folder for each mode are different and can be opened at:
Tools > Folders > Plugins
In non-portable mode the regular auto load folder is used, in portable mode the auto load folder is located in the settings folder and the regular auto load folder is ignored.
Atlantis
29th June 2020, 19:20
Suggestions: Add the ability to play a sound when an encode is finished. You can have settings for it to play after each file or at the end of the job list.
JKyle
29th June 2020, 20:40
Wouldn't it be easier putting custom filters in the settings folder? A customized startup folder cannot be replaced with a new staxrip version without loosing customized files.
Sounds reasonable.
But there's one thing I propose you need to consider in designing the %settings_dir%Plugins folder structure.
There's no folder under it for filters supporting dual mode.
Neo filters support both AVS and VS. Where am I supposed to put them?
If I put, for example, Neo FFT3D under %settings_dir%Plugins\AviSynth, isn't it NOT possible to use it for VapourSynth if I run VS in the portable mode because StaxRip loads only %settings_dir%Plugins\VapourSynth and its subfolders?
Since I'm running installed AVS and VS only, I'm not sure about this.
Anyway, I decided to make a subfolder named 'Dual' under %settings_dir%Plugins and put all dual mode plugins there, including DGDecNV itself. Although I need to modify AVS/VS Profiles code and DGIndexNV command code, I think it's very worth it.
The dependencies are loaded automatically, possibly this detection can be improved or replaced with another design.
Got it. :thanks:
JKyle
29th June 2020, 21:54
Suggestions: Add the ability to play a sound when an encode is finished. You can have settings for it to play after each file or at the end of the job list.
You can use Event Command... in Tools > Advanced menu.
See this (https://forum.doom9.org/showthread.php?p=1914283#post1914283) for an example.
Atlantis
30th June 2020, 04:15
Thank you so much. Very useful.
crystalfunky
30th June 2020, 09:59
I don't know if this has been posted or asked already:
Can you implement Neo_FFT3D and Neo_DFTest in the next build?
https://forum.doom9.org/showthread.php?t=181294&page=7
Atlantis
30th June 2020, 12:23
Yes. Please add this. It's faster and works well. I have already switched to this and encoded with it. It works.
Neo FFT3D (https://github.com/HomeOfAviSynthPlusEvolution/neo_FFT3D)
This seems is already in but needs integrated with avisynth
Neo DFTTest (https://github.com/HomeOfAviSynthPlusEvolution/neo_DFTTest)
Z'Hadum
3rd July 2020, 15:18
Has anyone else trouble to use the portable version of avisynth with a networkshare?
I mapped the networkshare to an drive letter to use the same settings/job queue on different computers.
but I cant set the symlinks on the networkshare, because as normal user I'M not allowed to set the links,
as Administrator (UAC) I'm in another context and can't see the mapped drive letter from the user....
Has anyone any suggestion how to circumvent this? Many thanks in advance!
At the moment I switched back to the installed version of avisynth.
Disturbance
4th July 2020, 12:09
Hello, bit of a strange thing happening, all of a sudden my encodes using the latest 2.1.3.0 Stable build have started having the frame rate messed with.
Instead of the input:
Framerate : 23.976023 (24000/1001) FPS
The output instead now reading as:
Frame rate : 23.976 (23976/1000) FPS
Original frame rate : 23.976 (24000/1001) FPS
I have even removed and then reinstalled the stable build making sure to have removed the settings and it still does it, I have tested also on another machine with a fresh copy of the stable build all on just the default encoder settings and also does it. It is not just this file but any file I try to encode (I have even tried to encode video that I have previously encoded just fine and the output fps was correct). I will even force the --fps 24000/1001 option to no avail. Attached is the log file in case there is anything anyone can spot causing this issue, stripped out everything besides the video on the source to make it easier and only encoded a clip for faster checking. I have also tested the files encoding with HandBreak as a sanity check and they come out at the right "23.976 (24000/1001) FPS"
https://pastebin.com/sBMWenNN - log
-QfG-
4th July 2020, 22:06
Hello, bit of a strange thing happening, all of a sudden my encodes using the latest 2.1.3.0 Stable build have started having the frame rate messed with.
Instead of the input:
Framerate : 23.976023 (24000/1001) FPS
The output instead now reading as:
Frame rate : 23.976 (23976/1000) FPS
Original frame rate : 23.976 (24000/1001) FPS
I have even removed and then reinstalled the stable build making sure to have removed the settings and it still does it, I have tested also on another machine with a fresh copy of the stable build all on just the default encoder settings and also does it. It is not just this file but any file I try to encode (I have even tried to encode video that I have previously encoded just fine and the output fps was correct). I will even force the --fps 24000/1001 option to no avail. Attached is the log file in case there is anything anyone can spot causing this issue, stripped out everything besides the video on the source to make it easier and only encoded a clip for faster checking. I have also tested the files encoding with HandBreak as a sanity check and they come out at the right "23.976 (24000/1001) FPS"
Sometimes it is a piping mistake. If u using Avisynth, add this in your Avisynth Script:
AssumeFPS(24000, 1001)
If the target is a x264/AVC Stream, you can change the framerate in the bitstream with mkvtoolnix after the encoding process.
Disturbance
4th July 2020, 22:18
Sometimes it is a piping mistake. If u using Avisynth, add this in your Avisynth Script:
AssumeFPS(24000, 1001)
If the target is a x264/AVC Stream, you can change the framerate in the bitstream with mkvtoolnix after the encoding process.
Hello, I have tried adding that to the script as well as post encoding muxing the video and setting it as 24000/1001 and it will still show the same thing. I have done that via Avisynth as well as VS and they both do the same thing, also have tried switching piping method between avspmod and ffmpeg with no change, I have also tried between x264 and x265 and nothing seems to help :/
JKyle
4th July 2020, 23:01
Has anyone else trouble to use the portable version of avisynth with a networkshare?
I mapped the networkshare to an drive letter to use the same settings/job queue on different computers.
but I cant set the symlinks on the networkshare, because as normal user I'M not allowed to set the links,
as Administrator (UAC) I'm in another context and can't see the mapped drive letter from the user....
Has anyone any suggestion how to circumvent this? Many thanks in advance!
At the moment I switched back to the installed version of avisynth.
Just a suggestion: have you tried enabling developer mode?
JKyle
4th July 2020, 23:09
Instead of the input:
Framerate : 23.976023 (24000/1001) FPS
The output instead now reading as:
Frame rate : 23.976 (23976/1000) FPS
Original frame rate : 23.976 (24000/1001) FPS
Well, my suggestions are
1) Try another source filter.
2) Try the latest beta if 1) doesn't work.
BTW, your attachment cannot be read because it's pending approval. Why don't you post it on https://pastebin.com/ and put the URL here?
Disturbance
5th July 2020, 00:12
Well, my suggestions are
1) Try another source filter.
2) Try the latest beta if 1) doesn't work.
BTW, your attachment cannot be read because it's pending approval. Why don't you post it on https://pastebin.com/ and put the URL here?
I have tried all of the source filters as well and they all seem to keep doing it, I have also tried the latest beta and it still occurs >_<
Versions I have tried - 2.0.8.0-stable, 2.1.3.0-stable, 2.1.3.7-Beta
also here is the paste for the log data - https://pastebin.com/sBMWenNN
JKyle
5th July 2020, 00:41
I have tried all of the source filters as well and they all seem to keep doing it, I have also tried the latest beta and it still occurs >_<
Versions I have tried - 2.0.8.0-stable, 2.1.3.0-stable, 2.1.3.7-Beta
also here is the paste for the log data - https://pastebin.com/sBMWenNN
According to the log, it seems like avs2pipemod/x265 pipes/encodes the video stream correctly at 24000/1001 but mkvmerge parses it arbitrarily and puts 23976/1000 in muxing.
Why don't you update mkvmerge to the latest version 48 (https://www.videohelp.com/download/mkvtoolnix-64-bit-48.0.0.7z) and give it a try again?
(Extract mkvtoolnix-64-bit-48.0.0.7z and put mkvextract.exe, mkvinfo.exe, mkvmerge.exe in <StaxRip folder>\Apps\Support\MKVToolNix. Of course you need to update the version info in Apps > Manage...)
If it fails, the issue is something to be addressed by mkvmerge.
But I guess it's highly probable that this kind of issue will be ignored or given low priority if the developers think it's not something of critical importance.
My suggestion is like this: use mp4 unless the audio streams are of peculiar types that cannot be muxed into mp4.
Disturbance
5th July 2020, 01:08
According to the log, it seems like avs2pipemod/x265 pipes/encodes the video stream correctly at 24000/1001 but mkvmerge parses it arbitrarily and puts 23976/1000 in muxing.
Why don't you update mkvmerge to the latest version 48 (https://www.videohelp.com/download/mkvtoolnix-64-bit-48.0.0.7z) and give it a try again?
(Extract mkvtoolnix-64-bit-48.0.0.7z and put mkvextract.exe, mkvinfo.exe, mkvmerge.exe in <StaxRip folder>\Apps\Support\MKVToolNix. Of course you need to update the version info in Apps > Manage...)
If it fails, the issue is something to be addressed by mkvmerge.
But I guess it's highly probable that this kind of issue will be ignored or given low priority if the developers think it's not something of critical importance.
My suggestion is like this: use mp4 unless the audio streams are of peculiar types that cannot be muxed into mp4.
It may be an mkvmerge issue, I changed the output to mp4 and it displays correctly as 24000/1001 in the info, however when I then try to use mkvmerge to mux the mp4 into an mkv with setting the video to 24000/1001 in the mkvmerge settings, the output video goes back to 23976/1000 like I mentioned before, this is also on v48 which I have updated to like you mentioned and it still does this, unfortunate because i need to use mkv for .ass subtitles >_<
Also if i remux a file that was encoded before this started happening (about 2 days ago) it will remux just fine and displays correctly. Just not anything that is encoded now.
Disturbance
5th July 2020, 12:33
Sometimes the resulting file has a video and audio desync. I can not solve this problem.
Checked, there is a problem with h.264 video demuxing.
I should mention that this is in x265 that I am encoding although I have tried in x264 and it still occurs. I have tried encoding files that have previously come out as intended to now on encoding again having the weird FPS showing. If I encode with no muxing and get just the .hevc video output and mediainfo it, it will show the 24000/1001 fps, it is only when I go to mux it and no matter which mkvtoolnix version I use it will bork and spit out the
Frame rate : 23.976 (23976/1000) FPS
Original frame rate : 23.976 (24000/1001) FPS
-QfG-
5th July 2020, 13:03
I have tried all of the source filters as well and they all seem to keep doing it, I have also tried the latest beta and it still occurs >_<
Versions I have tried - 2.0.8.0-stable, 2.1.3.0-stable, 2.1.3.7-Beta
also here is the paste for the log data - https://pastebin.com/sBMWenNN
Frame rate : 23.976 (23976/1000) FPS
Original frame rate : 23.976 (24000/1001) FPS
Original Framerate is the framerate, how the framerate is written in the HEVC Raw String. The Framerate is correct! You have only a muxing problem, i don't know why mkvtoolnix do this. Open the file with mkvtoolnix-gui and change the framerate in the video settings on the right side. Then this will be fixed.
https://s12.directupload.net/images/200705/temp/wezfkrxd.png (https://www.directupload.net/file/d/5871/wezfkrxd_png.htm)
Disturbance
5th July 2020, 13:13
Frame rate : 23.976 (23976/1000) FPS
Original frame rate : 23.976 (24000/1001) FPS
Original Framerate is the framerate, how the framerate is written in the HEVC Raw String. The Framerate is correct! You have only a muxing problem, i don't know why mkvtoolnix do this. Open the file with mkvtoolnix-gui and change the framerate in the video settings on the right side. Then this will be fixed.
https://s12.directupload.net/images/200705/temp/wezfkrxd.png (https://www.directupload.net/file/d/5871/wezfkrxd_png.htm)
Yes it is quite annoying, I have also set the framerate option in mkvmerge-gui every time I have tried manually muxing and it does nothing >_<
sneaker_ger
5th July 2020, 16:22
@Disturbance:
Unlike for mp4, Matroska timestamps aren't exact for 24/1.001 fps. So with a very short file like yours MediaInfo might display such unexpected fps. It is not a bug in mkvmerge. My guess is for files longer than a few seconds MediaInfo will show fps as you expect.
hevron
5th July 2020, 16:51
Open the file with mkvtoolnix-gui and change the framerate in the video settings on the right side. Then this will be fixed.
It will not help, there is an error in Video encoding.
Folder _temp before encoding:
00001.h264 - Frame rate: 23.976 (24000/1001) FPS
Folder _temp after encoding:
00001_out.h264 - Frame rate: 24.000 FPS
This is the reason for the desync.
The Godfather I,II,III \BDMV\STREAM\00001.m2ts
Tulitikkutehtaan tyttö \BDMV\STREAM\00001.m2ts
and other similar. I do it through NVEncC (x64) 5.06.
How to fix this?
lordalibaski
5th July 2020, 16:52
Why do I have this out of sync problem all the time when trying a new beta and this is a fresh install.
Small clip of the original file
https://fromsmash.com/QKXLk4kKHN-bt
Converted file out of sync (this is the full file conversion)
https://fromsmash.com/UumR.w.GNn-bt
No matter what format I try to convert it to it goes out of sync.
ok it will keep that small file in sync but won't keep the full file in sync!!
Here is the full file if anyone wants to see if they have the same problem I'm using the latest beta.
https://fromsmash.com/7clueZsqO.-bt
jlw_4049
5th July 2020, 18:19
Why do I have this out of sync problem all the time when trying a new beta and this is a fresh install.
Small clip of the original file
https://fromsmash.com/QKXLk4kKHN-bt
Converted file out of sync (this is the full file conversion)
https://fromsmash.com/UumR.w.GNn-bt
No matter what format I try to convert it to it goes out of sync.
ok it will keep that small file in sync but won't keep the full file in sync!!
Here is the full file if anyone wants to see if they have the same problem I'm using the latest beta.
https://fromsmash.com/7clueZsqO.-btSend me the file if you can and the process. Ill see what I can figure out.
Sent from my SM-G986U1 using Tapatalk
lordalibaski
5th July 2020, 18:36
Hi jlw
I've uploaded it mate it's in the above post bottom link that's the original file.
jlw_4049
5th July 2020, 19:06
Hi jlw
I've uploaded it mate it's in the above post bottom link that's the original file.
You need to extract the .mpg file from the VOB, encode that, then after words you can put it all back together in a .mkv or .mp4 or what ever else.
EDIT: I've encoded/muxed several different ways. EVERY way left the audio out of sync. For what ever reason, I'm assuming there is an issue with your source.
lordalibaski
5th July 2020, 22:28
That's my conclusion as well jlw
No matter what you do with the full show it sends it out of sync, though if you trim a 5min segment and convert it's perfectly fine it's only when you try to convert the whole show then it goes out of sync.
lordalibaski
5th July 2020, 22:59
Right I've just tried the exact same source in handbrake and the conversion was completely in sync so this is not a source fault.
JKyle
6th July 2020, 00:49
Right I've just tried the exact same source in handbrake and the conversion was completely in sync so this is not a source fault.
Well, it is a source fault. More specifically, the frame rate of the video stream is irregular: there are dropped frames in the video stream.
MediaInfo (and MediaInfo.NET) shows (incorrectly) that it has 23.976 (24000/1001) fps, but if you look into the file using ffprobe, you get the following info:
Input #0, mpeg, from 'Test.vob':
Duration: 00:19:20.00, start: 0.280633, bitrate: 4296 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 8:9 DAR 4:3], Closed Captions, 6000 kb/s, 29.58 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Side data:
cpb: bitrate max/min/avg: 6000000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Therefore, if you encode this file using FFmpeg (or other FFmpeg based apps like Handbrake, etc.), the video encoder automatically fills in the dropped frames by duplicating frames appropriately.
In reality, if you run the following simple FFmpeg command in CMD, you'll verify it in the real time log message of FFmpeg.
ffmpeg -hide_banner -i Test.vob -c:v libx264 -crf 22.0 -preset medium -c:a aac -ac 2 -b:a 128k -sn -map_metadata -1 -map_chapters -1 -y Test.mp4
[Log]
......
More than 1000 frames duplicated 20992kB time=00:02:45.60 bitrate=1038.4kbits/s dup=992 drop=0 speed=5.18x
frame=34796 fps=134 q=-1.0 Lsize= 156058kB time=00:19:20.92 bitrate=1101.2kbits/s dup=6953 drop=0 speed=4.47x
video:146096kB audio:9063kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.579034%
......
In StaxRip (and other AVS based apps), the video stream frame rate info differs depending on what kind of source filter you use for this file (29.97 for DGSource, 24 for FFVideoSource, etc.), and that's what makes the problem complicated in this case.
Then, how can we make StaxRip fill in dropped frames by duplicating frames?
Well, in theory, putting ChangeFPS(30000, 1001) in the AVS script is expected to solve this out-of-sync problem, but in reality, it doesn't. Since StaxRip splits video and audio and deals with them separately, video/audio sync is not tackled appropriately by this method.
In my experience, piping via FFmpeg along with a forced frame rate seems to be more effective for out-of-sync problems.
Suppose you want to encode an HEVC video stream via NVEnc, but you want to fix this dropped frame issue as well.
In this case, instead of piping via avs2pipemod, select Command Line encoder and edit the code like this:
"%app:ffmpeg%" -hwaccel dxva2 -i "%source_file%" -f yuv4mpegpipe -strict -1 -pix_fmt yuv420p -loglevel fatal -hide_banner -r 30000/1001 - | "%app:NVEnc%" --vbrhq 0 --codec h265 --preset quality --vbr-quality 30 --aq --ref 4 --lookahead 32 --y4m -i - -o "%temp_dir%%target_name%_out.h265"
You can force the frame rate by using this -r option in ffmpeg.
(This is why you need to create a Command Line encoder profile instead of choosing ffmpeg (DXVA2) decoder in NVEnc options.
Technically, choosing ffmpeg (DXVA2) decoder in NVEnc options is exactly the same as the above Command Line encoder code except for the -r option.
I think it'd be good if @stax76 implemented this additional item in NVEnc ffmpeg (DXVA2) decoder option. :))
Choose your own audio encoding.
After muxing is done, you will see the final sync is a little bit off: video is a little delayed behind audio. But as ffprobe tells us, the video starts at 0.280633 second, i.e., about 281 milliseconds.
So, you need to remux video (hevc) and audio by delaying the audio by 281 milliseconds.
https://i.imgur.com/qU5X4wq.jpg
Now you'll see the output is fully in sync.
Disturbance
6th July 2020, 03:43
@Disturbance:
Unlike for mp4, Matroska timestamps aren't exact for 24/1.001 fps. So with a very short file like yours MediaInfo might display such unexpected fps. It is not a bug in mkvmerge. My guess is for files longer than a few seconds MediaInfo will show fps as you expect.
I spent about 3 days working on this to try getting it to work and this ended up being the solution, that my clips needed to be longer and then they would display the correct fps, thank you to everyone else as well that commented and helped me. It is good to have the issue fixed, it just doesn't feel good it took me so long to realise it was as usual, user error.
jlw_4049
6th July 2020, 07:19
Well, it is a source fault. More specifically, the frame rate of the video stream is irregular: there are dropped frames in the video stream.
MediaInfo (and MediaInfo.NET) shows (incorrectly) that it has 23.976 (24000/1001) fps, but if you look into the file using ffprobe, you get the following info:
Therefore, if you encode this file using FFmpeg (or other FFmpeg based apps like Handbrake, etc.), the video encoder automatically fills in the dropped frames by duplicating frames appropriately.
In reality, if you run the following simple FFmpeg command in CMD, you'll verify it in the real time log message of FFmpeg.
ffmpeg -hide_banner -i Test.vob -c:v libx264 -crf 22.0 -preset medium -c:a aac -ac 2 -b:a 128k -sn -map_metadata -1 -map_chapters -1 -y Test.mp4
[Log]
In StaxRip (and other AVS based apps), the video stream frame rate info differs depending on what kind of source filter you use for this file (29.97 for DGSource, 24 for FFVideoSource, etc.), and that's what makes the problem complicated in this case.
Then, how can we make StaxRip fill in dropped frames by duplicating frames?
Well, in theory, putting ChangeFPS(30000, 1001) in the AVS script is expected to solve this out-of-sync problem, but in reality, it doesn't. Since StaxRip splits video and audio and deals with them separately, video/audio sync is not tackled appropriately by this method.
In my experience, piping via FFmpeg along with a forced frame rate seems to be more effective for out-of-sync problems.
Suppose you want to encode an HEVC video stream via NVEnc, but you want to fix this dropped frame issue as well.
In this case, instead of piping via avs2pipemod, select Command Line encoder and edit the code like this:
You can force the frame rate by using this -r option in ffmpeg.
(This is why you need to create a Command Line encoder profile instead of choosing ffmpeg (DXVA2) decoder in NVEnc options.
Technically, choosing ffmpeg (DXVA2) decoder in NVEnc options is exactly the same as the above Command Line encoder code except for the -r option.
I think it'd be good if @stax76 implemented this additional item in NVEnc ffmpeg (DXVA2) decoder option. :))
Choose your own audio encoding.
After muxing is done, you will see the final sync is a little bit off: video is a little delayed behind audio. But as ffprobe tells us, the video starts at 0.280633 second, i.e., about 281 milliseconds.
So, you need to remux video (hevc) and audio by delaying the audio by 281 milliseconds.
https://i.imgur.com/qU5X4wq.jpg
Now you'll see the output is fully in sync.This is good advice
Sent from my SM-G986U1 using Tapatalk
44vince44
6th July 2020, 08:32
to Lordalibaski:
Your source file is a VOB file. In Settings > Preprocessing, you can select which one will handle mpeg2 and vob:
- D2V Witch
- DGIndex
I bet D2V Witch is selected.
So select DG Index. And before importing file, you MUST delete the temp folder of your project, to make sure no trace of the older intermediate files is left, and also maybe restart Staxrip to make sure DGIndex will be used.
EDIT: TESTED your sample file, with the DGIndex selected, and the result gave Audio Video SYNCED!
JKyle
6th July 2020, 09:53
Yes, I verified that @44vince44's approach works.
The combination of DGIndex and MPEG2Source works good on this source and produces no out-of-sync problem.
(Although you need to delay audio by 281 milliseconds.)
This way you can avoid forcing a frame rate via FFmpeg introduced in my approach, which means you can make most of the affluent AVS filters.
The resulting frame rate is 24000/1001, same as the source frame rate detected by MediaInfo.
Interesting result. Only DGIndex generated d2v works OK whereas D2V Witch or DGIndexNV fails. Seems like oldies go well with each other. :)
videoh
6th July 2020, 14:22
Interesting result. Only DGIndex generated d2v works OK whereas D2V Witch or DGIndexNV fails. It works fine with DGDecNV when handled correctly.
The source VOB has the infamous black-frames-at-the-start-with-no-audio pathology. The timestamps reset after those frames and that is what causes the problem. You can see this by logging timestamps. Here's how to do it properly:
- Open the VOB in DGIndexNV.
- Skip forward 3 GOPs with the GOP forward button (it's only black video) and then set the project start there with the [ button.
- Save the project.
- Now the following script serves perfectly synced audio. I use 32-bit because my nicaudio.dll is 32-bit. You can play the script in VirtualDub32 for example.
loadplugin("dgdecodenv.dll")
loadplugin("nicaudio.dll")
vid=dgsource("Test.dgi",fieldop=1)
aud=NicAC3Source("Test T80 2_0ch 48KHz 192Kbps DELAY -90ms.ac3",2).DelayAudio(-0.09)
AudioDub(vid,aud) And Bob's yer uncle.
Note, the video also has field-order transitions. I won't get into that as it does not bear on the sync issue and here the video is progressive (with 3:2 pulldown) so it is inconsequential.
This is the pedal-to-the-metal way to handle this stream. I cannot comment on what 3rd-party transcoders are doing, nor how they differ in their handling with DGIndex versus DGIndexNV.
EDIT: You can get away with skipping only two GOPs also, but use the correct delay from the demuxed AC3 filename in your script. I didn't try skipping only one GOP.
44vince44
6th July 2020, 15:07
Thanks JKyle for confirming, and videoh for the information.
As a general rule, to people using vob sources, I recommend that they keep using DGIndex. It's better than D2V Witch, and it's not the first time a problem happens with D2V Witch..
Z'Hadum
6th July 2020, 19:21
Just a suggestion: have you tried enabling developer mode?
yes, so then I will stick at the installed avisynth version ....
thx
hevron
6th July 2020, 19:30
My choice is h264 NVEnc or h264 QSVEnc. I worked with files about which jlw_4049 wrote there are dropped frames in the video stream
I did so:
AviSynth/VapourSynth
The Godfather I,II,III \BDMV\STREAM\00001.m2ts
Folder _temp before encoding: 00001.h264 - Frame rate: 23.976 (24000/1001) FPS
Folder _temp after encoding: 00001_out.h264 - Frame rate: 24.000 FPS
desync
FFmpeg (Intel)
Folder _temp before encoding: 00001.h264 - Frame rate: 23.976 (24000/1001) FPS
Folder _temp after encoding: 00001_out.h264 - Frame rate: 23.976 (24000/1001) FPS
But the desync remained
I could try to do as -QfG- wrote Open the file with mkvtoolnix-gui and change the framerate in the video settings but I did not want to torment the video. I just changed the FPS audio for my new video (from 23. 976 to 24).The out of sync has disappeared. I have 15 audio streams, this is the main difficulty.
JKyle
6th July 2020, 20:12
It works fine with DGDecNV when handled correctly.
The source VOB has the infamous black-frames-at-the-start-with-no-audio pathology. The timestamps reset after those frames and that is what causes the problem. You can see this by logging timestamps. Here's how to do it properly:
- Open the VOB in DGIndexNV.
- Skip forward 3 GOPs with the GOP forward button (it's only black video) and then set the project start there with the [ button.
- Save the project.
- Now the following script serves perfectly synced audio. I use 32-bit because my nicaudio.dll is 32-bit. You can play the script in VirtualDub32 for example.
loadplugin("dgdecodenv.dll")
loadplugin("nicaudio.dll")
vid=dgsource("Test.dgi",fieldop=1)
aud=NicAC3Source("Test T80 2_0ch 48KHz 192Kbps DELAY -90ms.ac3",2).DelayAudio(-0.09)
AudioDub(vid,aud) And Bob's yer uncle.
Note, the video also has field-order transitions. I won't get into that as it does not bear on the sync issue and here the video is progressive (with 3:2 pulldown) so it is inconsequential.
This is the pedal-to-the-metal way to handle this stream. I cannot comment on what 3rd-party transcoders are doing, nor how they differ in their handling with DGIndex versus DGIndexNV.
EDIT: You can get away with skipping only two GOPs also, but use the correct delay from the demuxed AC3 filename in your script. I didn't try skipping only one GOP.
The fieldop=1 option in DGSource(...) was the magic key.
Just putting this extra option in it solved the out-of-sync problem.
I didn't even have to skip initial GOPs. :)
So all this fuss was about how to deal with 3:2 pulldown?
Thanks a lot for enlightening me, @videoh!
videoh
6th July 2020, 21:22
That cannot be correct, because the run time should not be affected by fieldop 0 versus 1. On the other hand, fieldop=2 can change the run time. And I definitely see the desync without skipping GOPs. Are you using direct manual stuff like I did or doing it through staxriip? I have to step out now but will come back to this.
JKyle
6th July 2020, 22:24
Are you using direct manual stuff like I did or doing it through staxriip?
I did it on StaxRip (2.1.3.7). As you know, StaxRip splits video and audio and deals with them separately.
And yes, I was mistaken. Audio out-of-sync problem does NOT occur with DGIndexNV as long as you delay audio by 281 milliseconds (video start time info gained by ffprobe), no matter whether you put fieldop=1 or not. (Maybe my temp files were messed up when I thought it did.)
But AviSynth+ 3.6.1 feeds source video (to NVEnc in my video encoding setting) at different frame rates depending on fieldop values, as is expected:
with fieldop=1, it feeds source video at 23.976fps (24000/1001fps), and without it, at 29.970fps (30000/1001fps).
(In both cases, I verified that audio sync problem did not occur.)
And as is intended, fieldop=1 tackles IVTC: there's combing with 29.970fps, and no combing with 23.976fps.
You can download those two videos from here (https://fromsmash.com/mP5XSckgE--gt) and compare them yourself.
Log for no fieldop (fieldop=0): https://pastebin.com/jpE9xkgH
Log for fieldop=1: https://pastebin.com/QSYJH8Hz
Thanks for the clarification, @videoh.
videoh
7th July 2020, 01:36
Audio out-of-sync problem does NOT occur with DGIndexNV as long as you delay audio by 281 milliseconds That's one way. I prefer to skip the weird GOPs and get the delay from the filename. But as they say, it's six of one and half a dozen of the other.
Thanks for the clarification, @videoh. My pleasure, Sir.
As you know, ... Don't assume that which is not in evidence. I don't know that much about staxrip and happily defer to you guys. Seems to be a very popular and well-executed application. We all hope to do as well.
Disturbance
8th July 2020, 01:23
@Stax76
Hello, I have been wondering if it was possible to implement a feature that allows you to cut a video by its Chapters. It is a feature from an old program I used to use called V.A.F.E. which is a program that stopped being supported or updated in 2015. As shown in the image it comes up in the preview page and you can select from the boxes which chapter chunks you want to select and what to cut out. After this it will also generate a "keyframes.qpf" for the encode to generate I frames for the start frame of the selected chapters that are selected. I am aware this is pretty niche, I am just asking the question is all :)
Failing that just a function that can generate a QPF file based on the current trimming/cutting functionality of Staxrip would be great (for inserting I frames).
Alternatively, if anyone else knows is there currently a way to generate a QPF file based on the cuts that already exists, just atm the current method I have for doing this is: cutting->preview code->paste code into AVSPmod->find frame numbers of the first frame of cut segments->manually put frames in a "keyframes.qpf" to import for encoding (eg "3000 I -1").
http://i.imgur.com/wPJ3LFK.jpg
44vince44
8th July 2020, 20:37
@Patman
Hi Patman, I just noticed there are no ffmeg builds in your repository... is there a problem (hope not!!)
Patman
8th July 2020, 23:31
@Patman
Hi Patman, I just noticed there are no ffmeg builds in your repository... is there a problem (hope not!!)
I have some problems with different libs. Compiling errors...
44vince44
9th July 2020, 01:14
I hope you'll have them sorted out ! if you need testers, i'm here ;-))))
Patman
10th July 2020, 21:10
Some tools have been updated. x265 hopefully this weekend with vapoursynth support.
44vince44
12th July 2020, 08:46
Thanks very much Patman!! I'l give them a try a bit later!
44vince44
12th July 2020, 20:27
@Patman,This is working very well. Thanks !!!
Of course for FFMPEG to work correctly, either Avisynth must be installed on the system, or you must create a soft link for Avisynth.
stax76
12th July 2020, 21:32
After summer, I'll make feature requests at all avs reading tools used by staxrip to allow a custom avisynth path via command line option.
These are the tools:
ffmpeg, x264, x265, NVEnc, QSVEnc, VCEEnc
44vince44
13th July 2020, 16:28
also Xvid_encraw ;-)
I hope the authors will cooperate!
44vince44
15th July 2020, 09:18
never mind, Xvid_encraw is not required since there is ffmpeg>xvid
Andy
16th July 2020, 19:08
Hello, this is a small thing, but StaxRip 2.1.3.0 after May Update incorrectly shows the usage of gpu:
https://abload.de/thumb/nvenczxjn1.jpg (https://abload.de/image.php?img=nvenczxjn1.jpg)
NVEnc UHD encoding, Win10 version 2004, NVEnc 5.03, Nvidia driver 451.48
almanteka
17th July 2020, 00:39
how i can transfer pending jobs from a previous version of staxrip to the latest one? in the past, i just copied the jobs.bat file to the new version! but in the last version, that didn't work! is there is any option to batch transfer the .srip files from the temp folder? i can add pending jobs from the .srip file, but one by one? i use batch for files that don't need any adjustments, but there are some videos that needs adjustments like cropping or replacing audio files that i added to the jobs list to process at later time! how i can transfer the job list to the newest version of staxrip? thanks in advance for any suggestions!
Mister XY
18th July 2020, 05:55
Hello, what is the best setting for QAAC sound? That mean, that i have the best filesize and the best audiosound.
Thx
44vince44
18th July 2020, 07:24
Mister XY it depends on what material you have as source (quality and type).
If audio is not very important (only speech and some backing music), q=45 is ok. Otherwise you should use above q=70.
Mister XY
18th July 2020, 07:39
I mean 2.0 stereo sound or 5.1 Dolby Sound. The Input is in most case dts.
craigpro
18th July 2020, 14:41
hi all, I'm encountering this error with StaxRip 2.1.3.7 beta and don't know what it means.
Error Audio encoding 1 (2.1.3.7)
Audio encoding 1 returned error exit code: 2 (0x2)
It's unclear what the exit code means, in case it's a Windows system error then it possibly means:
The system cannot find the file specified
-------------------------- Audio encoding 1 --------------------------
qaac 2.69
C:\Staxrip\Apps\Audio\qaac\qaac64.exe --tvbr 0 --delay 1 --normalize "C:\Temp\[KH] After the Rain - 01 - The Sound of Rain_temp\[KH] After the Rain - 01 - The Sound of Rain ID1 1000ms English.flac" -o "C:\Temp\[KH] After the Rain - 01 - The Sound of Rain_temp\[KH] After the Rain - 01 - The Sound of Rain ID1 English_a1.m4a"
qaac 2.69, CoreAudioToolbox 7.10.9.0
[KH] After the Rain - 01 - The Sound of Rain ID1 English_a1.m4a
Scanning maximum peak...
65902619/66242587 samples processed in 0:01.641
Peak value: 0.706535
AAC-LC Encoder, TVBR q0, Quality 96
ERROR: AudioConverterFillComplexBuffer(m_converter, staticInputDataProc, this, &npackets, abl, aspd): what
StaxRip.ErrorAbortException: Audio encoding 1 returned error exit code: 2 (0x2)
It's unclear what the exit code means, in case it's a Windows system error then it possibly means:
The system cannot find the file specified
-------------------------- Audio encoding 1 --------------------------
qaac 2.69
C:\Staxrip\Apps\Audio\qaac\qaac64.exe --tvbr 0 --delay 1 --normalize "C:\Temp\[KH] After the Rain - 01 - The Sound of Rain_temp\[KH] After the Rain - 01 - The Sound of Rain ID1 1000ms English.flac" -o "C:\Temp\[KH] After the Rain - 01 - The Sound of Rain_temp\[KH] After the Rain - 01 - The Sound of Rain ID1 English_a1.m4a"
qaac 2.69, CoreAudioToolbox 7.10.9.0
[KH] After the Rain - 01 - The Sound of Rain ID1 English_a1.m4a
Scanning maximum peak...
65902619/66242587 samples processed in 0:01.641
Peak value: 0.706535
AAC-LC Encoder, TVBR q0, Quality 96
ERROR: AudioConverterFillComplexBuffer(m_converter, staticInputDataProc, this, &npackets, abl, aspd): what
at StaxRip.Proc.Start() in D:\Projekte\VB\staxrip\General\Proc.vb:line 372
at StaxRip.GUIAudioProfile.Encode() in D:\Projekte\VB\staxrip\General\AudioProfile.vb:line 732
at StaxRip.GlobalClass._Closure$__._Lambda$__109-0() in D:\Projekte\VB\staxrip\General\GlobalClass.vb:line 271
at System.Threading.Tasks.Parallel.<>c__DisplayClass4_0.<Invoke>b__0()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at StaxRip.GlobalClass.ProcessJob(String jobPath) in D:\Projekte\VB\staxrip\General\GlobalClass.vb:line 312
is it a bug or an error with my filename being too long? thank you.
44vince44
19th July 2020, 05:31
No it's not a problem with filename.
65902619/66242587 samples processed in 0:01.641 => the total number of samples couldn't be processed so mo output (no resulting file)
Something is wrong with the intermediate streams.
Did you abort previously the processing? try deleting the flac file in the temporary folder and do the processing again.
craigpro
19th July 2020, 05:58
thanks for the reply 44vince44 - yeah I had manually deleted all files in the temp processing folder, same thing every time. One trick I've found which most of the time works is use mkvtoolnix gui and just process the file to a temp directory, if there any issues with headers etc. that usually seems to fix it.
I might try splitting the audio and video and then remuxing them - file plays fine but obviously there is an error in every episode from the original ripping.
44vince44
19th July 2020, 06:19
I had this every once in a while with some mp4 files. And remuxing with mkvtoolnix did fix the problem. I never new exactly what caused the problem...
What I did is convert all the suspicious files to mkv, then process the mkvs in staxrip.
If there is too many files, I can show you how to use a command line to convert all files of a folder to mkvs using mkvmerge (which is provided with mkvtoolnix)
Here is a suggestion you can try (i'll try it when i bump into one of those files): try to disable mp4box:
in SETTINGS > Preprocessing, just untick mp4box and see if it works. (and delete the project temp before retry)
Andy
19th July 2020, 19:15
Hello, what is the best setting for QAAC sound? That mean, that i have the best filesize and the best audiosound.
Thx
https://forum.doom9.org/archive/index.php/t-173974.html
almanteka
24th July 2020, 04:34
why the best feature of staxrip disappeared a long time ago and nothing was done to repair the issue, if any? i'm talking about the option of "Demux & Index before creating jobs" for the file batch! i'm using older versions of staxrip just to continue to use that feature & updating the apps manually! there is no way to add multiple files to the jobs list and fine tune some files after adding them to the list because the files are not demuxed automatically. the new way of adding files by batch don't let me fine tune any of the files on the list if it's not added manually one by one. not even the gui is populated with the file when you load them from list!!! so, why is this happened? if the option is never to return, why is there is no way to demux the file beforehand if i load it from the jobs list so i can fine tune it?
https://i.imgur.com/pfMPhDn.png
Mister XY
24th July 2020, 10:54
https://forum.doom9.org/archive/index.php/t-173974.html
Thx for the Thread
But i have a problem with 3.1 Sound.
If i use QAAC, than i get this error
[flac @ 000001fd4897c840] Channel layout not supported by Flac, output stream will have incorrect channel layout.
If i use FFMPEG, than i have a correct 3.1 sound layout.
44vince44
24th July 2020, 11:16
MisterXY I have no 3.1 source to test, but you can try to change the decoding method, in the settings of audio encoder: press the big button "More...", then in "General" use decoding method "Pipe" or "W64". Maybe it could work.
Mister XY
24th July 2020, 12:21
I have tested it with W64 and Pipe.
This is the Message with Pipe.
qaac 2.69, CoreAudioToolbox 7.10.9.0
Asterix in Amerika_t00 ID2 German {Surround 3.1}_a2.m4a
ERROR: No channel mapping to AAC defined
That is the Correct Channel Layout
C L R LFE
and that is the Layout after w64 ore FLAC
L R C Cb
44vince44
24th July 2020, 16:50
can you please tell me who is doing the conversion from original to flac or w64. I need to know if it's ffmpeg or another. It's in the log.
Mister XY
24th July 2020, 20:10
In Both case ffmpeg convert.
ffmpeg N-98276-g1d5d8a30b4-g842bc312ad-gcc10.1.0 Patman
This is with EAC3to
eac3to 3.34
"C:\Program Files\StaxRip\Apps\Audio\eac3to\eac3to.exe" "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}.dts" "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}.flac" -simple -progressnumbers
DTS, 3.1 channels, 1:24:16, 960kbps, 48kHz
Decoding with libDcaDec DTS Decoder...
Patching bitdepth to 24 bits...
Encoding FLAC with libFlac...
Creating file "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}.flac"...
eac3to processing took 5 minutes, 38 seconds.
Done.
Start: 21:23:10
End: 21:28:48
Duration: 00:05:37
General
Complete name : E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}.flac
Format : FLAC
Format/Info : Free Lossless Audio Codec
File size : 1.28 GiB
Duration : 1 h 24 min
Overall bit rate mode : Variable
Overall bit rate : 2 178 kb/s
Audio
Format : FLAC
Format/Info : Free Lossless Audio Codec
Duration : 1 h 24 min
Bit rate mode : Variable
Bit rate : 2 178 kb/s
Channel(s) : 4 channels
Channel layout : L R C LFE
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Compression mode : Lossless
Stream size : 1.28 GiB (100%)
Writing library : libFLAC 1.3.3 (UTC 2019-08-04)
----------------------- Error Audio encoding 1 -----------------------
Audio encoding 1 returned error exit code: 2 (0x2)
It's unclear what the exit code means, in case it's a Windows system error then it possibly means:
Das System kann die angegebene Datei nicht finden
-------------------------- Audio encoding 1 --------------------------
qaac 2.69
"C:\Program Files\StaxRip\Apps\Audio\qaac\qaac64.exe" --tvbr 75 "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}.flac" -o "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}_a1.m4a"
qaac 2.69, CoreAudioToolbox 7.10.9.0
Asterix in Amerika_t00 ID1 German {Surround 3.1}_a1.m4a
ERROR: No channel mapping to AAC defined
-------------------------- Audio encoding 1 --------------------------
qaac 2.69
"C:\Program Files\StaxRip\Apps\Audio\qaac\qaac64.exe" --tvbr 75 "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}.flac" -o "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}_a1.m4a"
qaac 2.69, CoreAudioToolbox 7.10.9.0
Asterix in Amerika_t00 ID1 German {Surround 3.1}_a1.m4a
ERROR: No channel mapping to AAC defined
Start: 21:28:48
End: 21:28:48
Duration: 00:00:00
This is with Pipe and Decoder automatic
---------------------- Media Info Audio Source 1 ----------------------
General
Complete name : E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}.dts
Format : DTS
Format/Info : Digital Theater Systems
File size : 579 MiB
Duration : 1 h 24 min
Overall bit rate mode : Constant
Overall bit rate : 960 kb/s
Audio
Format : DTS
Format/Info : Digital Theater Systems
Duration : 1 h 24 min
Bit rate mode : Constant
Bit rate : 960 kb/s
Channel(s) : 4 channels
Channel layout : C L R LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 579 MiB
---------------------- Media Info Audio Source 2 ----------------------
General
Complete name : E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID2 German {Surround 3.1}.dts
Format : DTS
Format/Info : Digital Theater Systems
File size : 577 MiB
Duration : 1 h 23 min
Overall bit rate mode : Constant
Overall bit rate : 960 kb/s
Audio
Format : DTS
Format/Info : Digital Theater Systems
Duration : 1 h 23 min
Bit rate mode : Constant
Bit rate : 960 kb/s
Channel(s) : 4 channels
Channel layout : C L R LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 577 MiB
----------------------- Error Audio encoding 1 -----------------------
Audio encoding 1 returned error exit code: 2 (0x2)
It's unclear what the exit code means, in case it's a Windows system error then it possibly means:
Das System kann die angegebene Datei nicht finden
-------------------------- Audio encoding 1 --------------------------
qaac 2.69
"C:\Program Files\StaxRip\Apps\Encoders\ffmpeg\ffmpeg.exe" -i "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}.dts" -loglevel fatal -hide_banner -f wav - | "C:\Program Files\StaxRip\Apps\Audio\qaac\qaac64.exe" --tvbr 75 - -o "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}_a1.m4a"
qaac 2.69, CoreAudioToolbox 7.10.9.0
Asterix in Amerika_t00 ID1 German {Surround 3.1}_a1.m4a
ERROR: No channel mapping to AAC defined
-------------------------- Audio encoding 1 --------------------------
qaac 2.69
"C:\Program Files\StaxRip\Apps\Encoders\ffmpeg\ffmpeg.exe" -i "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}.dts" -loglevel fatal -hide_banner -f wav - | "C:\Program Files\StaxRip\Apps\Audio\qaac\qaac64.exe" --tvbr 75 - -o "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID1 German {Surround 3.1}_a1.m4a"
qaac 2.69, CoreAudioToolbox 7.10.9.0
Asterix in Amerika_t00 ID1 German {Surround 3.1}_a1.m4a
ERROR: No channel mapping to AAC defined
Start: 21:32:30
End: 21:32:31
Duration: 00:00:00
----------------------- Error Audio encoding 2 -----------------------
Audio encoding 2 returned error exit code: 2 (0x2)
It's unclear what the exit code means, in case it's a Windows system error then it possibly means:
Das System kann die angegebene Datei nicht finden
-------------------------- Audio encoding 2 --------------------------
qaac 2.69
"C:\Program Files\StaxRip\Apps\Encoders\ffmpeg\ffmpeg.exe" -i "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID2 German {Surround 3.1}.dts" -loglevel fatal -hide_banner -f wav - | "C:\Program Files\StaxRip\Apps\Audio\qaac\qaac64.exe" --tvbr 70 - -o "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID2 German {Surround 3.1}_a2.m4a"
qaac 2.69, CoreAudioToolbox 7.10.9.0
Asterix in Amerika_t00 ID2 German {Surround 3.1}_a2.m4a
ERROR: No channel mapping to AAC defined
-------------------------- Audio encoding 2 --------------------------
qaac 2.69
"C:\Program Files\StaxRip\Apps\Encoders\ffmpeg\ffmpeg.exe" -i "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID2 German {Surround 3.1}.dts" -loglevel fatal -hide_banner -f wav - | "C:\Program Files\StaxRip\Apps\Audio\qaac\qaac64.exe" --tvbr 70 - -o "E:\BluRay\Temp\Asterix in Amerika_t00_temp\Asterix in Amerika_t00 ID2 German {Surround 3.1}_a2.m4a"
qaac 2.69, CoreAudioToolbox 7.10.9.0
Asterix in Amerika_t00 ID2 German {Surround 3.1}_a2.m4a
ERROR: No channel mapping to AAC defined
Start: 21:32:30
End: 21:32:31
Duration: 00:00:00
almanteka
25th July 2020, 01:42
still looking for a way to demux and index multiple files as batch on StaxRip!
stax76
25th July 2020, 09:54
still looking for a way to demux and index multiple files as batch on StaxRip!
It's documented here:
https://staxrip.readthedocs.io/usage.html#batch-processing
44vince44
25th July 2020, 11:34
Mister XY it seems a bug with staxrip when using FFPEG to decode to FLAC or w64, because:
- use FFMPEG to re-encode directly to AAC => works
- use FFMPEG tp decode to 3.1 channel FLAC => channels order is messed up, with message:
"[flac @ 000001fd4897c840] Channel layout not supported by Flac, output stream will have incorrect channel layout."
and instead of order C L R LFE, the output has order L R C Cb
This seems a bug, we have to post it on the bug tracker at github. Can you create a small sample by selecting a range and setting audio and video to copy/mux, please. And once I get a small sample, I can probably find and give you a temporary solution.
44vince44
25th July 2020, 11:46
@Stax76, I'm not sure that answers the question of Almanteka. Almanteka wants the files demuxed when the jobs are added from batch selection.
Currently when you add jobs from batch, the files are not demuxed in the adding stage. They are demuxed when the job is executed.
And the link you sent does not completely answer that!
So is there a way to have the files demuxed when batch jobs are ADDED, and NOT when jobs are EXECUTED. The answer is "NO, the files won't be demuxed until job processing starts the batch job"
@Almanteka: what the link shows you, is that if you simply need the files demuxed, and no further operation with it, you can use Copy/Mux for Video and audio.
In that case, you have got your solution. However, if your aim is different, it can be useful that you tell us why you need the files to be demuxed when added in the batch.
I miss that feature too, because it allowed me to see if there are files that fail demuxing before I begin processing jobs. So I can leave the computer processing knowing that no file will abort due to a trivial demuxing problem.
But then, it's not that catastrophic.
stax76
25th July 2020, 12:14
So is there a way to have the files demuxed when batch jobs are ADDED, and NOT when jobs are EXECUTED.
There was a way but it had to be removed after a redesign.
The CLI of staxrip would also work.
Mister XY
25th July 2020, 13:00
How can i make a sample with staxrip?
jlw_4049
25th July 2020, 15:24
How can i make a sample with staxrip?Multiple ways.
If using avisynth you could
trim(1000,6000)
This would go 1000 frames in and encode the next 5000 and give you that out put.
Sent from my SM-G986U1 using Tapatalk
jlw_4049
25th July 2020, 15:51
still looking for a way to demux and index multiple files as batch on StaxRip!You could demux using a batch script with mkvextract.
The index, staxrip has to do its own or it won't work.
Otherwise you could do a batch script to index the files as well.
Sent from my SM-G986U1 using Tapatalk
44vince44
25th July 2020, 15:54
Misterr XY you can do as JLW said, or another way, using the interface (i know steps 1,2,3 are obvious):
1. drag and drop the file in staxrip
2 click on the video encoder (usually it's x265), it will show a list, select "copy/mux"
3.click on the audio encoder, select "copy/mux"
4. if there is another audio track, also set to copy/mux
5. click on "PREVIEW", this opens the video preview, note that the current displayed frame number appears on the top bar.
6. use arrows to get to a frame, any frame, press "Home" on the keyboard this will mark the beginning of the range
7. use right arrow, to go 100 frames more (100 frames is more than enough) and press "End" on the keyboard. This marks end of range
8. close preview, create job (with Next, as usual), process job, this will create a sample.
Mister XY
25th July 2020, 16:08
Multiple ways.
If using avisynth you could
trim(1000,6000)
This would go 1000 frames in and encode the next 5000 and give you that out put.
Sent from my SM-G986U1 using Tapatalk
Thy, but with this code i have a greate samplefile becaus, the video is short but the audio is in original lengh.
jlw_4049
25th July 2020, 16:11
Thy, but with this code i have a greate samplefile becaus, the video is short but the audio is in original lengh.You could try something like
selectrangeevery(3000,50)
Im not 100% how to sync the audio.
Sent from my SM-G986U1 using Tapatalk
jlw_4049
25th July 2020, 16:18
Misterr XY you can do as JLW said, or another way, using the interface (i know steps 1,2,3 are obvious):
1. drag and drop the file in staxrip
2 click on the video encoder (usually it's x265), it will show a list, select "copy/mux"
3.click on the audio encoder, select "copy/mux"
4. if there is another audio track, also set to copy/mux
5. click on "PREVIEW", this opens the video preview, note that the current displayed frame number appears on the top bar.
6. use arrows to get to a frame, any frame, press "Home" on the keyboard this will mark the beginning of the range
7. use right arrow, to go 100 frames more (100 frames is more than enough) and press "End" on the keyboard. This marks end of range
8. close preview, create job (with Next, as usual), process job, this will create a sample.I didnt even know that was a feature myself. I get surprised by StaxRip constantly haha.
Sent from my SM-G986U1 using Tapatalk
Mister XY
25th July 2020, 16:20
Thx for the help.
@vince, i have send you a PM with sample file.
44vince44
25th July 2020, 19:43
Mister XY I couldn't downloaded it, because the upload site you have used fails with a download manager, and makes you wait 1 hour after the fail. :-(
I replied you with another upload site that is more flexible.
44vince44
25th July 2020, 22:20
@Mister XY,
I have your answers, after checking your file:
1- this is not a problem with staxrip - DEFINITELY. the syntax Staxrip uses is CORRECT
2- the dts file is not standard (4 ch DTS 960 is not DTS, official 48khz DTS is: 5.1channel, 768Kbps or 1536Kbps. This one would probably never be decoded by hardware)
official commercial dts encoder software (like Surcode) create always 5.1 streams leaving zero data in the unused channels
3- For some reason, using FFMPEG to re-encode to aac from this source works, but not to decode to flac. So at the most, it's a tool issue, relating to a non-standard file.
Therefore, if we report that to the FFMPEG team, we won't get any fix, imho.
Here is a workaround:
Did you know that you can intermediately process audio manually in staxrip before creating the job? well you can, and you're gonna use it
a) drag and drop source file to staxrip (preferably after cleaning up the temp folder, so you don't get confused later)
b) before doing anything, select for the audio stream, the encoder (blue link): FLAC ~3802
c) edit the encoder: REMOVE NORMALIZE tick, and type in the CUSTOM input: -icl 3.1 -ocl 5.1
you'll see appear below : ffmpeg -icl 3.1 -ocl 5.1 - so now, click OK
d) right-click on the audio stream name, and select "Execute" => this will generate the flac audio
e) right-click on the audio stream name again, now you'll see just below the current stream name (#1 sample etc..), the name of the flac file generated right now.
It's a 5.1 flac with the proper C L R LFE data and two added empty surround channels
SELECT this flac file
f) change the encoder preset to qaac, specify quality etc..., remember to preferably deactivate normalize because i don't know if it links the channels while calculating the normalizing factor.
g) set the options for your video encoder, create job, and launch it
The resulting video file has an AAC audio stream with 6 channels (the two surround channels are empty, so there is no additional data load), and the C L R LFE play as they should.
almanteka
27th July 2020, 05:49
@Stax76, I'm not sure that answers the question of Almanteka. Almanteka wants the files demuxed when the jobs are added from batch selection.
Currently when you add jobs from batch, the files are not demuxed in the adding stage. They are demuxed when the job is executed.
And the link you sent does not completely answer that!
So is there a way to have the files demuxed when batch jobs are ADDED, and NOT when jobs are EXECUTED. The answer is "NO, the files won't be demuxed until job processing starts the batch job"
@Almanteka: what the link shows you, is that if you simply need the files demuxed, and no further operation with it, you can use Copy/Mux for Video and audio.
In that case, you have got your solution. However, if your aim is different, it can be useful that you tell us why you need the files to be demuxed when added in the batch.
I miss that feature too, because it allowed me to see if there are files that fail demuxing before I begin processing jobs. So I can leave the computer processing knowing that no file will abort due to a trivial demuxing problem.
But then, it's not that catastrophic.
@44vince44 thanks for understand my question! ex: i add 50 files at once and some of them needs to be cropped (i cant use a template with cropping because the crop is not exactly always, i need to use autocrop). maybe i can create an autocrop template, is that possible?
@Stax76 any command to use the CLI for demuxing and indexing?
thanks for all your help in this issue!
stax76
27th July 2020, 13:14
command to use the CLI for demuxing and indexing?
Documentation is here:
https://staxrip.readthedocs.io/cli.html
StaxRip -LoadTemplate:"my template" "C:\my input file.mkv" -Exit
Spunkmeyer
27th July 2020, 18:57
Most likely an easy answer but how do I get Staxrip to use my Nvidia card as a decoder when I'm encoding x265, it just fails when I select anything other than Avisynth/Vapour. Exit Code 1 (x01)
stax76
27th July 2020, 20:32
@Spunkmeyer
https://postimg.cc/HV8SCNDC
almanteka
27th July 2020, 20:44
Documentation is here:
https://staxrip.readthedocs.io/cli.html
StaxRip -LoadTemplate:"my template" "C:\my input file.mkv" -Exit
thanks! any advice for the syntax to demux and index multiple files and add them to the job list? maybe:
StaxRip -LoadTemplate:"my template" "C:\my input file1.mkv" , "C:\my input file2.mkv" -AddBatchJob:sourcefile -Exit
or
StaxRip -LoadTemplate:"my template" "C:\my input file1.mkv" -AddJob:showConfirmation,templateName, "C:\my input file2.mkv" -AddJob:showConfirmation,templateName -Exit
EDIT:
also, i'm removing black bars from videos using auto crop, is there is any way to edit the crop filter or create a new one to enable auto crop at the template level? so i can use an specific template and forgot about demuxing & indexing just to do that? thanks!!!
stax76
27th July 2020, 23:32
@almanteka
Please provide more details, as clear as possible, preferable on the issue tracker.
Spunkmeyer
28th July 2020, 00:38
@Spunkmeyer
https://postimg.cc/HV8SCNDC
Thank you kindly sir, of course it was hidden in there. :stupid:
44vince44
28th July 2020, 10:07
@Almanteka, @Stax76
@Stax76, Almanteka is not pointing to a bug, he is only asking how to use CLI for multiple files, since his initial question was about processing many files. So he was guessing how the CLI syntax would be for multiple files.
@Almanteka
CLI does not work that way. If you want to process multiple files, you have to create a batch file with the "FOR %%" syntax that allows you to process many files. But this is intended for EXPERIENCED USERS in command lines and Batches. I will help you with it but this is not the best solution. I will also answer your crop question. So here are the two solutions:
1. Creating jobs with a CLI bat (batch) file, then editing all the jobs to tweak them:
First of all the command line you need is StaxRip "C:\my input file.mkv" -AddJob:"False" -Exit
- you don't need -loadtemplate because staxrip will use the template that loads on startup, automatically
- you need -AddJob:"False" because -Addjob is to create the job, and False is to not ask confirmation.
Also, you need to know that if ANYthing is not perfectly ok, then the automatic process will be interrupted for user input.
Example: if you have a "stupid" error like destination file already exist, then staxip will wait that you validate or fix the error and then continue this job manually, so the CLI batch resumes.
If there is already a temp file with same name, also you get an error. So make sure everything is cleaned up.
Let's begin. You must create a command line batch file in the root of Staxrip.exe. You need to have write permissions if staxrip's root inside in C:\Program Files.
To create the command line batch, you must create a text file in Staxrip's root (right-click, new text document), open the new text document, and copy the following command inside it:
for %%a in ("your_path_to_files\*.extension") do StaxRip.exe "%%a" -Addjob:"False" -Exit
replace your_path_to_files and extension.
Example: your files are mp4, located in folder D:\Files, then:
for %%a in ("D:\Files\*.mp4") do StaxRip.exe "%%a" -Addjob:"False" -Exit
Save the text file, close notepad, rename the file and change the extension from .txt to .bat
example: New Text Document.txt rename it to MyBatch.bat
Double click on MyBatch.bat, it opens a command line prompt, and launches the command lines one after one. Watch staxrip open, demux, create job, close, open, etc...
This requires to be an advanced user, and even though to be very careful with everything.
If anything is wrong, you could need to abort manually the batch file: inside the command line. press several times Ctrl+C, then if any error messages are open, close them. You'll get a prompt in the command line window: Terminate batch> type y, press enter.
2. Organizing files in several folders method
This is the recommended way to use Staxrip batch feature for the average user.
Create folders of files with the same properties. let's say if half of your files have black bars, isolate them and create a folder with them. Then you'll process all your files in two batches instead of one batch.
How to set fixed cropping values in a batch operation:
You can't use the cropping feature of staxrip because it is not intended for batches.
The Crop filter syntax is: Crop(%crop_left%, %crop_top%, -%crop_right%, -%crop_bottom%)
And you can't use the standard Crop filter in the Crop slot because Staxrip can alter it in the file loading process. Staxrip will turn it off or on.
So you need to create a new filter slot, under the standard Crop slot, insert Crop -> Crop. And call it Crop2 or whatever you want, and put inside it the filter:
Crop(%crop_left%, %crop_top%, -%crop_right%, -%crop_bottom%) replace the values with the numbers you want to crop with.
Example, if you want to remove 40 pixels from left and 42 pixels from right
Crop(40, 0, -42, 0)
values must be even. Remember the minus required for the right and bottom.
Also for safe operation, if you are not using filters that require Mod 8, in the image options, set Mod to 4.
Now you can use the fixed cropped values in a batch.
stax76
28th July 2020, 15:03
@Almanteka
@44vince44
I made changes today to allow for usage questions on the mpv.net and staxrip tracker.
Changelog:
- A new issue template for usage questions was created on the issue tracker and the docs were updated to describe that usage questions are welcome on the issue tracker.
https://github.com/staxrip/staxrip/issues/new/choose
https://github.com/stax76/mpv.net/issues/new/choose
For difficult issues that require a longer discussion I find it easier to use the issue tracker or a dedicated thread.
44vince44
28th July 2020, 22:02
Nice, It's better than this forum. At least every question will have its own entry.
BobbyBoberton
29th July 2020, 05:19
Having bit of an issue with this:
I setup a template for an x265 encode with options:
--crf 19 --output-depth 10 --hevc-aq --aq-mode 3 --me star --max-merge 4 --fades --frame-threads 3 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,500)" --hdr10 --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --range limited --max-cll "10000,1992" --hdr10-opt --repeat-headers --input-depth 10 --deblock -2:-3
and get:
x265 M-3.4+6-g73f96ff39-gcc11.0.0 Patman
"C:\Program Files\StaxRip-x64-2.1.3.0-stable\Apps\Encoders\ffmpeg\ffmpeg.exe" -threads 1 -hwaccel dxva2 -i "D:\Videos\TOS 2160p HDR.mkv" -f yuv4mpegpipe -strict -1 -loglevel fatal -hide_banner - | "C:\Program Files\StaxRip-x64-2.1.3.0-stable\Apps\Encoders\x265\x265.exe" --crf 19 --output-depth 10 --hevc-aq --aq-mode 3 --me star --max-merge 4 --fades --frame-threads 3 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50)" --hdr10 --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --range limited --max-cll "10000,1992" --hdr10-opt --repeat-headers --hrd --aud --input-depth 10 --deblock -2:-3 --frames 64297 --y4m --output "D:\Videos\TOS 2160p HDR_temp\TOS.Atmos.5.1.mkv_out.hevc" -
x265 [error]: unable to open input file <->
Mason1171
29th July 2020, 06:14
------------------------- System Environment -------------------------
StaxRip : 2.1.3.0
Windows : Windows 10 Home 1909
Language : English (United States)
CPU : AMD Ryzen 5 2600X Six-Core Processor
GPU : NVIDIA GeForce GTX 1650 SUPER
Resolution : 1920 x 1080
DPI : 96
----------------------- Media Info Source File -----------------------
\\M1171-NAS\Skip_Cache\Mand_tonemap_test.mkv
General
Complete name : \\M1171-NAS\Skip_Cache\Mand_tonemap_test.mkv
Format : Matroska
Format version : Version 4
File size : 121 MiB
Duration : 1 min 0 s
Overall bit rate : 16.8 Mb/s
Encoded date : UTC 2020-07-27 20:21:03
Writing application : mkvmerge v47.0.0 ('Black Flag') 64-bit
Writing library : libebml v1.3.10 + libmatroska v1.5.2
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5@High
Codec ID : V_MPEGH/ISO/HEVC
Duration : 1 min 0 s
Bit rate : 16.1 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.081
Stream size : 115 MiB (95%)
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Audio
ID : 2
Format : E-AC-3 JOC
Format/Info : Enhanced AC-3 with Joint Object Coding
Commercial name : Dolby Digital Plus with Dolby Atmos
Codec ID : A_EAC3
Duration : 1 min 0 s
Bit rate mode : Constant
Bit rate : 768 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Delay relative to video : 9 ms
Stream size : 5.50 MiB (5%)
Title : Inglés
Language : English
Service kind : Complete Main
Default : No
Forced : No
Complexity index : 16
Number of dynamic objects : 15
Bed channel count : 1 channel
Bed channel configuration : LFE
------------------------------ Demux MKV ------------------------------
mkvextract 48
F:\StaxRip-QfG-\StaxRip-x64-2.1.3.0-stable_tweaked_by_QfG\Apps\Support\MKVToolNix\mkvextract.exe \\M1171-NAS\Skip_Cache\Mand_tonemap_test.mkv tracks 1:"\\M1171-NAS\Skip_Cache\Mand_tonemap_test_temp\Mand_tonemap_test ID1 9ms English {Inglés}.eac3" --ui-language en
Extracting track 1 with the CodecID 'A_EAC3' to the file '\\M1171-NAS\Skip_Cache\Mand_tonemap_test_temp\Mand_tonemap_test ID1 9ms English {Inglés}.eac3'. Container format: Dolby Digital Plus (E-AC-3)
Start: 4:21:34 PM
End: 4:21:35 PM
Duration: 00:00:00
General
Complete name : \\M1171-NAS\Skip_Cache\Mand_tonemap_test_temp\Mand_tonemap_test ID1 9ms English {Inglés}.eac3
Format : E-AC-3 JOC
Format/Info : Enhanced AC-3 with Joint Object Coding
Commercial name : Dolby Digital Plus with Dolby Atmos
File size : 5.50 MiB
Duration : 1 min 0 s
Overall bit rate mode : Constant
Overall bit rate : 768 kb/s
Audio
Format : E-AC-3 JOC
Format/Info : Enhanced AC-3 with Joint Object Coding
Commercial name : Dolby Digital Plus with Dolby Atmos
Duration : 1 min 0 s
Bit rate mode : Constant
Bit rate : 768 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Stream size : 5.50 MiB (100%)
Service kind : Complete Main
Complexity index : 16
Number of dynamic objects : 15
Bed channel count : 1 channel
Bed channel configuration : LFE
------------------ Error DGIndexNV: Index, No Demux ------------------
--------------------- DGIndexNV: Index, No Demux ---------------------
"F:\StaxRip-QfG-\StaxRip-x64-2.1.3.0-stable_tweaked_by_QfG\Apps\Support\DGDecNV\DGIndexNV.exe" -i "\\M1171-NAS\Skip_Cache\Mand_tonemap_test.mkv" -o "\\M1171-NAS\Skip_Cache\Mand_tonemap_test_temp\Mand_tonemap_test.dgi" -h
--------------------- DGIndexNV: Index, No Demux ---------------------
"F:\StaxRip-QfG-\StaxRip-x64-2.1.3.0-stable_tweaked_by_QfG\Apps\Support\DGDecNV\DGIndexNV.exe" -i "\\M1171-NAS\Skip_Cache\Mand_tonemap_test.mkv" -o "\\M1171-NAS\Skip_Cache\Mand_tonemap_test_temp\Mand_tonemap_test.dgi" -h
Start: 4:21:35 PM
End: 4:21:37 PM
Duration: 00:00:02
------------------------------ Exception ------------------------------
StaxRip.ErrorAbortException: DGIndexNV: Index, No Demux returned error exit code: -1073741819 (0xC0000005)
--------------------- DGIndexNV: Index, No Demux ---------------------
"F:\StaxRip-QfG-\StaxRip-x64-2.1.3.0-stable_tweaked_by_QfG\Apps\Support\DGDecNV\DGIndexNV.exe" -i "\\M1171-NAS\Skip_Cache\Mand_tonemap_test.mkv" -o "\\M1171-NAS\Skip_Cache\Mand_tonemap_test_temp\Mand_tonemap_test.dgi" -h
at StaxRip.Proc.Start() in D:\Projekte\VB\staxrip\General\Proc.vb:line 372
at StaxRip.CommandLineDemuxer.Run(Project proj) in D:\Projekte\VB\staxrip\General\Demux.vb:line 151
at StaxRip.MainForm.Demux() in D:\Projekte\VB\staxrip\Forms\MainForm.vb:line 3210
at StaxRip.MainForm.OpenVideoSourceFiles(IEnumerable`1 files, Boolean isEncoding) in D:\Projekte\VB\staxrip\Forms\MainForm.vb:line 2050
I believe JKyle's solution was implemented properly but Im still unable to use DGIndexNV. Does anyone understand this issue?
JKyle
29th July 2020, 07:21
I believe JKyle's solution was implemented properly but Im still unable to use DGIndexNV. Does anyone understand this issue?
I suspect UNC path (network folder name) is the culprit. Copy the file to a local folder and give a try again.
If it succeeds, then you need to report this UNC path related issue to the DGDecNV developer.
almanteka
29th July 2020, 08:19
@44vince44
WOW! THANKS! method 1 worked perfectly!!! also, thanks for suggesting method 2 as an alternative, but the cropping of the black bars varies in size between files and are not fixed, that's why i use auto-cropping! but hey, with method 1 i just go to the job > load > crop > auto cropping and that's all! long time searching for a way to replace the option of Demux and Index before creating jobs for previous versions of StaxRip, i thins the last one was StaxRip-x64-1.6.0.3! i really appreciate your help! thanks!!!
@Almanteka, @Stax76
@Stax76, Almanteka is not pointing to a bug, he is only asking how to use CLI for multiple files, since his initial question was about processing many files. So he was guessing how the CLI syntax would be for multiple files.
@Almanteka
CLI does not work that way. If you want to process multiple files, you have to create a batch file with the "FOR %%" syntax that allows you to process many files. But this is intended for EXPERIENCED USERS in command lines and Batches. I will help you with it but this is not the best solution. I will also answer your crop question. So here are the two solutions:
1. Creating jobs with a CLI bat (batch) file, then editing all the jobs to tweak them:
First of all the command line you need is StaxRip "C:\my input file.mkv" -AddJob:"False" -Exit
- you don't need -loadtemplate because staxrip will use the template that loads on startup, automatically
- you need -AddJob:"False" because -Addjob is to create the job, and False is to not ask confirmation.
Also, you need to know that if ANYthing is not perfectly ok, then the automatic process will be interrupted for user input.
Example: if you have a "stupid" error like destination file already exist, then staxip will wait that you validate or fix the error and then continue this job manually, so the CLI batch resumes.
If there is already a temp file with same name, also you get an error. So make sure everything is cleaned up.
Let's begin. You must create a command line batch file in the root of Staxrip.exe. You need to have write permissions if staxrip's root inside in C:\Program Files.
To create the command line batch, you must create a text file in Staxrip's root (right-click, new text document), open the new text document, and copy the following command inside it:
for %%a in ("your_path_to_files\*.extension") do StaxRip.exe "%%a" -Addjob:"False" -Exit
replace your_path_to_files and extension.
Example: your files are mp4, located in folder D:\Files, then:
for %%a in ("D:\Files\*.mp4") do StaxRip.exe "%%a" -Addjob:"False" -Exit
Save the text file, close notepad, rename the file and change the extension from .txt to .bat
example: New Text Document.txt rename it to MyBatch.bat
Double click on MyBatch.bat, it opens a command line prompt, and launches the command lines one after one. Watch staxrip open, demux, create job, close, open, etc...
This requires to be an advanced user, and even though to be very careful with everything.
If anything is wrong, you could need to abort manually the batch file: inside the command line. press several times Ctrl+C, then if any error messages are open, close them. You'll get a prompt in the command line window: Terminate batch> type y, press enter.
2. Organizing files in several folders method
This is the recommended way to use Staxrip batch feature for the average user.
Create folders of files with the same properties. let's say if half of your files have black bars, isolate them and create a folder with them. Then you'll process all your files in two batches instead of one batch.
How to set fixed cropping values in a batch operation:
You can't use the cropping feature of staxrip because it is not intended for batches.
The Crop filter syntax is: Crop(%crop_left%, %crop_top%, -%crop_right%, -%crop_bottom%)
And you can't use the standard Crop filter in the Crop slot because Staxrip can alter it in the file loading process. Staxrip will turn it off or on.
So you need to create a new filter slot, under the standard Crop slot, insert Crop -> Crop. And call it Crop2 or whatever you want, and put inside it the filter:
Crop(%crop_left%, %crop_top%, -%crop_right%, -%crop_bottom%) replace the values with the numbers you want to crop with.
Example, if you want to remove 40 pixels from left and 42 pixels from right
Crop(40, 0, -42, 0)
values must be even. Remember the minus required for the right and bottom.
Also for safe operation, if you are not using filters that require Mod 8, in the image options, set Mod to 4.
Now you can use the fixed cropped values in a batch.
44vince44
29th July 2020, 10:00
You're welcome !
Mason1171
29th July 2020, 15:23
I suspect UNC path (network folder name) is the culprit. Copy the file to a local folder and give a try again.
If it succeeds, then you need to report this UNC path related issue to the DGDecNV developer.
I tried that out. Same error. I guess I contact them
Mason1171
29th July 2020, 17:51
I suspect UNC path (network folder name) is the culprit. Copy the file to a local folder and give a try again.
If it succeeds, then you need to report this UNC path related issue to the DGDecNV developer.
JKyle, videoh didnt know a solution. Any more suggestions?
BobbyBoberton
29th July 2020, 17:54
Having bit of an issue with this:
I setup a template for an x265 encode with options:
--crf 19 --output-depth 10 --hevc-aq --aq-mode 3 --me star --max-merge 4 --fades --frame-threads 3 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,500)" --hdr10 --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --range limited --max-cll "10000,1992" --hdr10-opt --repeat-headers --input-depth 10 --deblock -2:-3
and get:
x265 M-3.4+6-g73f96ff39-gcc11.0.0 Patman
"C:\Program Files\StaxRip-x64-2.1.3.0-stable\Apps\Encoders\ffmpeg\ffmpeg.exe" -threads 1 -hwaccel dxva2 -i "D:\Videos\TOS 2160p HDR.mkv" -f yuv4mpegpipe -strict -1 -loglevel fatal -hide_banner - | "C:\Program Files\StaxRip-x64-2.1.3.0-stable\Apps\Encoders\x265\x265.exe" --crf 19 --output-depth 10 --hevc-aq --aq-mode 3 --me star --max-merge 4 --fades --frame-threads 3 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50)" --hdr10 --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --range limited --max-cll "10000,1992" --hdr10-opt --repeat-headers --hrd --aud --input-depth 10 --deblock -2:-3 --frames 64297 --y4m --output "D:\Videos\TOS 2160p HDR_temp\TOS.Atmos.5.1.mkv_out.hevc" -
x265 [error]: unable to open input file <->
If I add -pix_fmt yuv420p10le to the first command before the - this command works, but how do I do get that in the FFmpeg command through staxrip?
stax76
29th July 2020, 18:45
@BobbyBoberton
Maybe there was a breaking change in ffmpeg. Following also don't work:
x264/x265 Options > Input/Output > Pipe > ffmpeg
This creates:
ffmpeg.exe -i aaa.avs -f yuv4mpegpipe -strict -1 - | x265.exe --crf 18 --frames 638 --y4m --output aaa.hevc -
I think this used to work as is without defining -pix_fmt. Now it gives an error:
x265 [error]: unable to open input file <->
I wanted to try staxrip 2.0.8.0 but I have horrible download performance today, maybe it's my connection as the problem happens with github and mediafire, I try it again tomorrow.
BobbyBoberton
29th July 2020, 20:20
@BobbyBoberton
Maybe there was a breaking change in ffmpeg. Following also don't work:
x264/x265 Options > Input/Output > Pipe > ffmpeg
This creates:
ffmpeg.exe -i aaa.avs -f yuv4mpegpipe -strict -1 - | x265.exe --crf 18 --frames 638 --y4m --output aaa.hevc -
I think this used to work as is without defining -pix_fmt. Now it gives an error:
x265 [error]: unable to open input file <->
I wanted to try staxrip 2.0.8.0 but I have horrible download performance today, maybe it's my connection as the problem happens with github and mediafire, I try it again tomorrow.
I tried it with 2.0.8.0 and I get the same problem,
----- Video encoding using x265 3.3+2-gbe2d82093 GCC 9.2.0 Patman -----
"C:\Program Files\StaxRip-x64-2.0.8.0-stable\Apps\Encoders\ffmpeg\ffmpeg.exe" -threads 1 -hwaccel dxva2 -i "D:\Videos\TOS 2160p HDR.mkv" -f yuv4mpegpipe -strict -1 -loglevel fatal -hide_banner - | "C:\Program Files\StaxRip-x64-2.0.8.0-stable\Apps\Encoders\x265\x265.exe" --crf 19 --profile unrestricted --output-depth 10 --psy-rdoq 0 --early-skip --hevc-aq --aq-mode 3 --me star --max-merge 4 --fades --frame-threads 3 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50)" --hdr10 --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --range limited --max-cll "4851,3586" --hdr10-opt --repeat-headers --hrd --aud --input-depth 10 --deblock -2:-3 --frames 94236 --y4m --output "D:\Videos\TOS 2160p HDR_temp\TOS.HDR.2160p.HEVC.10-bit.DD+.Atmos.5.1.mkv_out.hevc" -
x265 [error]: unable to open input file <->
As you can see its using the 2.0.8.0 FFmpeg executable for this.
BobbyBoberton
29th July 2020, 20:52
Here is a try with 2.0.6.0 so I don't think its a recent change that is the issue, I (and you) must be setting it up wrong somehow...
Here is a log of the fail from 2.0.6.0
Error Video encoding using x265 3.2+9-971180b100f8 Patman (2.0.6.0)
Video encoding using x265 3.2+9-971180b100f8 Patman failed with exit code: 1 (0x1)
The exit code might be a system error code: STATUS_WAIT_1
The exit code might be a system error code: Incorrect function.
--------- Video encoding using x265 3.2+9-971180b100f8 Patman ---------
"C:\Program Files\StaxRip-x64-2.0.6.0-stable\Apps\Encoders\ffmpeg\ffmpeg.exe" -threads 1 -hwaccel dxva2 -i "D:\Videos\TOS 2160p HDR.mkv" -f yuv4mpegpipe -strict -1 -loglevel fatal -hide_banner - | "C:\Program Files\StaxRip-x64-2.0.6.0-stable\Apps\Encoders\x265\x265.exe" --crf 19 --output-depth 10 --rect --amp --limit-modes --hevc-aq --me star --max-merge 4 --fades --frame-threads 3 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50)" --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --range limited --max-cll "4851,3586" --hdr --hdr-opt --repeat-headers --hrd --aud --opt-qp-pps --opt-ref-list-length-pps --input-depth 10 --deblock -2:-3 --frames 94236 --y4m --output "D:\Videos\TOS 2160p HDR_temp\TOS.HDR.2160p.HEVC.10-bit.DD+.Atmos.5.1.mkv_out.hevc" -
x265 [error]: unable to open input file <->
StaxRip.ErrorAbortException: Video encoding using x265 3.2+9-971180b100f8 Patman failed with exit code: 1 (0x1)
The exit code might be a system error code: STATUS_WAIT_1
The exit code might be a system error code: Incorrect function.
--------- Video encoding using x265 3.2+9-971180b100f8 Patman ---------
"C:\Program Files\StaxRip-x64-2.0.6.0-stable\Apps\Encoders\ffmpeg\ffmpeg.exe" -threads 1 -hwaccel dxva2 -i "D:\Videos\TOS 2160p HDR.mkv" -f yuv4mpegpipe -strict -1 -loglevel fatal -hide_banner - | "C:\Program Files\StaxRip-x64-2.0.6.0-stable\Apps\Encoders\x265\x265.exe" --crf 19 --output-depth 10 --rect --amp --limit-modes --hevc-aq --me star --max-merge 4 --fades --frame-threads 3 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50)" --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --range limited --max-cll "4851,3586" --hdr --hdr-opt --repeat-headers --hrd --aud --opt-qp-pps --opt-ref-list-length-pps --input-depth 10 --deblock -2:-3 --frames 94236 --y4m --output "D:\Videos\TOS 2160p HDR_temp\TOS.HDR.2160p.HEVC.10-bit.DD+.Atmos.5.1.mkv_out.hevc" -
x265 [error]: unable to open input file <->
at StaxRip.Proc.Start() in D:\Projekte\VB\staxrip\General\Proc.vb:line 340
at StaxRip.x265Enc.Encode(String passName, String commandLine, ProcessPriorityClass priority) in D:\Projekte\VB\staxrip\Encoding\x265Enc.vb:line 66
at StaxRip.x265Enc.Encode() in D:\Projekte\VB\staxrip\Encoding\x265Enc.vb:line 43
at StaxRip.GlobalClass.ProcessVideo() in D:\Projekte\VB\staxrip\General\GlobalClass.vb:line 228
at System.Threading.Tasks.Parallel.<>c__DisplayClass4_0.<Invoke>b__0()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at StaxRip.GlobalClass.ProcessJob(String jobPath) in D:\Projekte\VB\staxrip\General\GlobalClass.vb:line 138
so idk, none of the piping options work correctly for me through staxrip but if I put in the -pix_fmt info it does as a standalone command but that's not really the point of staxrip, I want to 'stack' a bunch of encodes and let it go automatically.
EDIT:So I can get it to work if I choose AviSynth/VapourSynth (so no hwaccel) and set piping to 'automatic' then it will work, at least it will start to encode the x265 video properly without complaining that it can't read <-> but any other setting on 2.0.6.0, 2.0.8.0, 2.1.3.0 will not produce a working script so that is kind of sad, any help with getting ffmpeg/hwaccel decoding working on windows 10 for staxrip please let me know!
"C:\Program Files\StaxRip-x64-2.0.6.0-stable\Apps\Support\avs2pipemod\avs2pipemod64.exe" -y4mp "D:\Videos\TOS 2160p HDR_temp\TOS.HDR.2160p.HEVC.10-bit.DD+.Atmos.5.1.mkv.avs" | "C:\Program Files\StaxRip-x64-2.0.6.0-stable\Apps\Encoders\x265\x265.exe" --crf 19 --output-depth 10 --hevc-aq --me star --max-merge 4 --bframes 3 --fades --frame-threads 3 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50)" --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --range limited --max-cll "4851,3586" --hdr --hdr-opt --repeat-headers --aud --input-depth 10 --deblock -2:-3 --no-strong-intra-smoothing --frames 94236 --y4m --output "D:\Videos\TOS 2160p HDR_temp\TOS.HDR.2160p.HEVC.10-bit.DD+.Atmos.5.1.mkv_out.hevc" -
and then it actually works but why doesn't it work with FFmpeg with or without DXVA2?
BobbyBoberton
30th July 2020, 19:51
Got this as a reply from the github after putting an issue in since it happened in so many versions and as told that it is a bug with staxrip not ffmpeg (Weird to me) and that it will probably be easier to disable DXVA2 decoding that trying to figure out a -pix_fmt to be put in the command line but I am talking with the maintainer of the code, I think that it can be worked around rather easily if you just make a new box that appears if you choose FFMpeg (DVXA2) as the decoder then you also need to specify what you want -pix_fmt is supposed to be. I believe it should be set to whatever kind of output you are looking for like if you want 10-bit HDR the you want yuv420p10le and if you want 8-bit SDR you need to choose yuv420p or 10-bit SDR yuv420p10 (I think) so that could work right?
This is what I got from github:
When the x265 option Decoder FFmpeg (DXVA2) is used then avisynth/vapoursynth is not used at all but rather the source file is opened directly by ffmpeg and therefore the pipe option is not relevant because piping is done in order to pipe data from avisynth/vapoursynth to x265.
The problem is when the ffmpeg option -hwaccel dxva2 is used then as you pointed out it's also necessary to define the -pix_fmt option, this is a bug in staxrip, I don't understand why ffmpeg requires it in this case, without -hwaccel option -pix_fmt is not necessary.
In order to fix it staxrip would have to generate the -pix_fmt argument based on media info of the source file, it's more likely that we rather remove the Decoder FFmpeg (DXVA2) feature because it's too much work to generate the -pix_fmt argument.
The second problem is that the staxrip docs currently don't explain how hardware decoding can be used with avisynth/vapoursynth, here is a screenshot:
https://postimg.cc/HV8SCNDC
hevron
2nd August 2020, 21:58
2.1.3.8 Beta, DTS-HD MA core not extracted, Сору/Mux only 🤔
stax76
2nd August 2020, 22:30
Which source container?
hevron
2nd August 2020, 23:25
Which source container?
When adding a DTS-HD MA file from another folder to the MKV container.
P.S. The DTS-HD MA is packed in an MKA container.
stax76
2nd August 2020, 23:40
In the Copy/Mux options there is an Extract DTS Core option.
hevron
2nd August 2020, 23:46
There is of course, but in version 2.1.3.8 Beta, it does not work well with MKA.
hevron
3rd August 2020, 00:07
I update the last 3-4 versions of the program manually from the Tools by Patman folder:
ffmpeg, NVEnc, rav1e, SVT-AV1, MP4Box, x264
Mason1171
3rd August 2020, 02:53
Im just having trouble setting it up to run the same template on multiple files sequentially. When I run the test clips individually with my template, the outcome is great. When I use the file batch feature on more than 1 clip, it uses the correct template but uses the BT. 2020 colorspace instead of BT709. This results in very red tinted video.
The Template (https://www65.zippyshare.com/v/NBcBnFaZ/file.html)
Solution: Options > Video > Import VUI Metadata (Needs to be unchecked)
44vince44
3rd August 2020, 12:11
There is of course, but in version 2.1.3.8 Beta, it does not work well with MKA.
I confirm this behaviour:
Copy/mux option Extract DTS Core does not work when the audio source is an external file mka file. It only copies the stream without extracting DTS core.
@hevron I will create a ticket to report the bug.
USE THIS WORKAROUND:
download MKVCleaver or use mkvmerge to extract the dtshd stream.
Rename it to stream.dtshd
Add it in staxrip instead of the mka, and you'll be able to extract the dts core.
hevron
3rd August 2020, 16:47
ffmpeg N-98623-g315706c227-g9d2ba8980b-gcc10.2.0 by Patman (02.08.20) doesn’t work ��, I am using ffmpeg N-98276-g1d5d8a30b4-g842bc312ad-gcc10.1.0 (10.07.20).
Patman
4th August 2020, 08:35
ffmpeg N-98623-g315706c227-g9d2ba8980b-gcc10.2.0 by Patman (02.08.20) doesn’t work ��, I am using ffmpeg N-98276-g1d5d8a30b4-g842bc312ad-gcc10.1.0 (10.07.20).
Thx, i'll fix it.
EDIT:
Fixed, new version online. Now as x86 and x64 release.
wallander
5th August 2020, 17:22
Hello,
how can I change back to my settings in the app folder.
After new windows installation, staxrip aked at first start and I klicked the false folder
jlw_4049
5th August 2020, 17:52
Hello,
how can I change back to my settings in the app folder.
After new windows installation, staxrip aked at first start and I klicked the false folderRedownloading and launching the first time will make it ask again.
Sent from my SM-G986U1 using Tapatalk
wallander
5th August 2020, 17:54
Thanks,
I found it in the Registry and could change it :)
Atlantis
8th August 2020, 02:17
Didn't staxrip for resizing use Spline16Resize before? Today I resized and it used bicubic. Any reason for the change? Spline16Resize is sharper.
44vince44
8th August 2020, 02:35
Yes indeed spline is sharper and lanczos is even sharper. All have advantages and disadvantages. There is no special reason. Bicubic is the most popular among the standard players because it's fastest and is handled by most older hardware. Advanced players use better resizing that bicubic. Video processing software give you the choice. Feel free to change it and to create your startup template as you wish.
Note: If using Avisynth, you need to take care of multithreading so the resizing doesn't slow down the whole process. If using vapoursynth, multithreading is already handled.
Atlantis
8th August 2020, 03:04
I use mod 8 and if the size is not mod 8 it gives me error message of course.
So I use AddBorders to make it mod 8 but staxrip doesn't understand that I have used AddBorders and that the output resolution is different. It still thinks it is not mod 8 and I can't continue and encode. How to do?
44vince44
8th August 2020, 16:29
I face the same problem with some videos, so either I resize or crop, or also addborders, and in that last case, I reduce Mod to 2, and make sure manually (with a calculator) that the final size with addborders is Mod 8. To check the final size, you can either open preview and display information, or use the "Info..." in the filters menu (the blue "AVS Filters" or "VS Filters"). Note that Mod is a setting that only checks that the size is respecting Mod. Let's say, if you set Mod = 2, but your video size is multiples of 8, then the video will be processed as Mod 8 by the filters and the encoder.
Atlantis
10th August 2020, 14:27
Thanks. Staxrip should change the behavior. The mod warning should be based on the output resolution and not the input resolution.
BobbyBoberton
11th August 2020, 00:25
Also would be nice if hwaccel would be figured out but can't figure out the best options for -pix_fmt, according to the manual setting -pix_fmt to -pix_fmt + should set pix_fmt to the input format of the video but this seems to not work with the generated command lines or even just with ffmpeg alone (both pre-compiled binaries and self-compiled ones) so anyone have any ideas about how to fix the -pix_fmt issue with staxrip when trying to use ffmpeg (dxva2) as the decoder with a pipe to x265.exe? My best option if the + thing did not work was to just add another menu that will need to be set if you choose to use ffmpeg (dxva2) as the decoding program then you need to set -pix_fmt yourself, as I have posted about before on here when I was trying to compile 10-bit HDR content this way the generated command line would work if I added -pix_fmt yuv420p10le after the input command, however the maintainer says that it is not that simple and that he would need to find a way to properly automatically pull this info from the file through mediainfo or something like that, I don't see why that is necessary here if it is just being used as a piping program, as long as it generates a y4m stream and the encoder can read it then isn't that really what matters?
44vince44
11th August 2020, 10:37
Thanks. Staxrip should change the behavior. The mod warning should be based on the output resolution and not the input resolution.
For the mod check, Staxrip traces video dimensions though the crop feature (meaning: the values of crop defined in the crop window) and though the resize feature (meaning: the values you set in the middle of the main window.
Any filter manually inserted, that changes geometry will not be taken into account. E.g:
-other crop filter
-other resize filter
-Addborder filter
-flip, rotate filters
I agree, this is not good. StaxRip should check the same way it gets the information in the preview window and in the info menu.
But in the meantime, use the Mod2 workaround, I've processed hundreds of clips like that.
44vince44
12th August 2020, 15:41
The above issue is fixed in Beta v2.1.4.2
Dann0245
14th August 2020, 04:08
[Sorry, my bad English]
There is an issue in multi-pass encode.
When I do x265 three pass encode, the order/sequence of each pass is
--pass 1
--pass 2
--pass 3
The correct order/sequence should be
--pass 1
--pass 3
--pass 2
The issue happen in StaxRip-x64-2.1.3.0-stable and StaxRip-x64-2.1.4.2-Beta.
I don't see this issue in StaxRip-x64-2.0.6.0-stable.
Atlantis
14th August 2020, 23:54
(The above issue is fixed in Beta v2.1.4.2) Great. You mean Staxrip now looks at the real output resolution for mod checking? Since I don't install beta, I wont see it immediately.
jlw_4049
15th August 2020, 00:38
(The above issue is fixed in Beta v2.1.4.2) Great. You mean Staxrip now looks at the real output resolution for mod checking? Since I don't install beta, I wont see it immediately.The betas are usually stable
Sent from my SM-G986U1 using Tapatalk
Patman
15th August 2020, 07:00
[Sorry, my bad English]
There is an issue in multi-pass encode.
When I do x265 three pass encode, the order/sequence of each pass is
--pass 1
--pass 2
--pass 3
The correct order/sequence should be
--pass 1
--pass 3
--pass 2
The issue happen in StaxRip-x64-2.1.3.0-stable and StaxRip-x64-2.1.4.2-Beta.
I don't see this issue in StaxRip-x64-2.0.6.0-stable.Are you sure?
Dann0245
15th August 2020, 10:05
Are you sure?
Yeah!
--pass 1 is first pass, creates stats file, NUL output.
--pass 2 is last pass, does not overwrite stats file, writes the output.
--pass 3 is Nth pass, overwrites stats file from pass 1, or previous pass 3 (4th, 5th pass encode), NUL output.
So the order/sequence when I run command line is
--pass 1
--pass 3
--pass 2
And 5th pass
--pass 1
--pass 3
--pass 3
--pass 3
--pass 2
StaxRip-x64-2.1.4.2-Beta, with three pass encode, the current order/sequence is
--pass 1, creates stats file.
--pass 2, does not overwrite stats file (No thing was improved), NUL output.
--pass 3, overwrites stats file, writes the output (but after pass 2).
(Or I just miss something?)
Patman
15th August 2020, 10:31
Yeah!
--pass 1 is first pass, creates stats file, NUL output.
--pass 2 is last pass, does not overwrite stats file, writes the output.
--pass 3 is Nth pass, overwrites stats file from pass 1, or previous pass 3 (4th, 5th pass encode), NUL output.
So the order/sequence when I run command line is
--pass 1
--pass 3
--pass 2
And 5th pass
--pass 1
--pass 3
--pass 3
--pass 3
--pass 2
StaxRip-x64-2.1.4.2-Beta, with three pass encode, the current order/sequence is
--pass 1, creates stats file.
--pass 2, does not overwrite stats file (No thing was improved), NUL output.
--pass 3, overwrites stats file, writes the output (but after pass 2).
(Or I just miss something?)Thx, will be changed in next beta.
44vince44
15th August 2020, 11:39
From the documentation:
--pass <integer>
Enable multi-pass rate control mode. Input is encoded multiple times, storing the encoded information of each pass in a stats file from which the consecutive pass tunes the qp of each frame to improve the quality of the output. Default disabled
1. First pass, creates stats file
2. Last pass, does not overwrite stats file
3. Nth pass, overwrites stats file
Range of values: 1 to 3
Are you sure it means that second pass is the LAST pass ? Please confirm it before code is changed.
Is it only for x265 or also x264 too ?
EDIT: it appears confirmed, the x264 docs show the same thing: x264 follows the same scheme: pass "2" means always the LAST pass
So this affects x265 and x264 as well
From x264 docs:
--pass has three settings:
1: Create a new stats file. Use this on the first pass.
2: Read the stats file. Use this on the final pass.
3: Read the stats file, and update it as well.
So if you want to do a 2-pass operation,
1st command will use --pass 1
2nd command will use --pass 2
And if you want to use a 3-pass operation,
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 2
And if you want to use a 5-pass operation,
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 3
4th command will use --pass 3
5th command will use --pass 2
I guess this confirms exactly what Dann0245 said. Thanks Dann0245!
Dann0245
15th August 2020, 13:54
Thx, will be changed in next beta.
Great news.
From the documentation:
Are you sure it means that second pass is the LAST pass ? Please confirm it before code is changed.
Is it only for x265 or also x264 too ?
EDIT: it appears confirmed, the x264 docs show the same thing: x264 follows the same scheme: pass "2" means always the LAST pass
So this affects x265 and x264 as well
From x264 docs:
So if you want to do a 2-pass operation,
1st command will use --pass 1
2nd command will use --pass 2
And if you want to use a 3-pass operation,
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 2
And if you want to use a 5-pass operation,
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 3
4th command will use --pass 3
5th command will use --pass 2
I guess this confirms exactly what Dann0245 said. Thanks Dann0245!
x264 and x265 do the same.
I was confused when the first time encode 3 pass.
Some google search and found this post from 2013, then I figured out how strange the number go with the operation.
If the stats file is not updated then the pass did nothing to improve the following pass. So if you want to do e.g. 5 passes you would use:
--pass 1
--pass 3
--pass 3
--pass 3
--pass 2 (or --pass 3)
That's all there is to it. But that's for x264(cli), no clue about HandBrake.
Patman
15th August 2020, 14:11
From the documentation:
Are you sure it means that second pass is the LAST pass ? Please confirm it before code is changed.
Is it only for x265 or also x264 too ?
EDIT: it appears confirmed, the x264 docs show the same thing: x264 follows the same scheme: pass "2" means always the LAST pass
So this affects x265 and x264 as well
From x264 docs:
So if you want to do a 2-pass operation,
1st command will use --pass 1
2nd command will use --pass 2
And if you want to use a 3-pass operation,
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 2
And if you want to use a 5-pass operation,
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 3
4th command will use --pass 3
5th command will use --pass 2
I guess this confirms exactly what Dann0245 said. Thanks Dann0245!
I found it in the docs from x264 and x265 too, so I've confirmed the changes. But thx for your investigation on that @44vince44
44vince44
16th August 2020, 19:46
Only (and always) trying to help Patman !!! ;-)
NikosD
20th August 2020, 07:32
Just a new VCEEnc v6.03 version
https://github.com/rigaya/VCEEnc/releases/download/6.03/VCEEncC_6.03_x64.7z
NikosD
20th August 2020, 18:19
@stax76
Hello Frank.
I'm trying to experiment with VCEEnc v6.03 using large uncompressed files and CBR/VBR modes and I see that StaxRip calculates arbitrarily --cbr and --vbr to a value of 4194299 which exceeds maximum supported by device.
How is this calculated internally from StaxRip and how can I change it ?
Because after --cbr/ -- vbr been set to 4194299 by StaxRip automatically, VCEEnc complains and has a fallback to 2147483 kbps which is still enormous.
Haven't touched yet Max Bitrate and VBV Bufsize which they are still at the default 20000 kbps but due to --cbr/--vbr 4194299 the output is 2147483 kbps (!)
44vince44
21st August 2020, 14:39
@NikosD:
when you set Mode = CBR or VBR, you need to close the encoder options window, and return to the main window.
There you'll notice that under "Target", you have two new values that you can modify: size and Video Bitrate. Change the value of Video Bitrate there.
NikosD
21st August 2020, 14:54
...There you'll notice that under "Target", you have two new values that you can modify: size and Video Bitrate. Change the value of Video Bitrate there. I tried that as I remembered that it was working for Intel's QSVEnc which was my first HW encoder, but this time it didn't work.
StaxRip didn't leave me change the values.
But if you say so, I'll try again when I go home and report back.
NikosD
21st August 2020, 17:57
@NikosD:
when you set Mode = CBR or VBR, you need to close the encoder options window, and return to the main window. Yes, of course!
By closing the options window, allows you to change the values in the main window.
I had forgotten it, it's been a while since my last HW encoding attempt.
Thank you.
BTW, the support of VCEEnc and all the other HW encoders (QSVEnc, NVEnc) is impressive regarding options and parameters.
It's almost everything inside!
BobbyBoberton
22nd August 2020, 04:26
From the documentation:
Are you sure it means that second pass is the LAST pass ? Please confirm it before code is changed.
Is it only for x265 or also x264 too ?
EDIT: it appears confirmed, the x264 docs show the same thing: x264 follows the same scheme: pass "2" means always the LAST pass
So this affects x265 and x264 as well
From x264 docs:
So if you want to do a 2-pass operation,
1st command will use --pass 1
2nd command will use --pass 2
And if you want to use a 3-pass operation,
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 2
And if you want to use a 5-pass operation,
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 3
4th command will use --pass 3
5th command will use --pass 2
I guess this confirms exactly what Dann0245 said. Thanks Dann0245!
The answer to this is probably yes but I want to make sure that there is no real difference between
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 3
4th command will use --pass 3
5th command will use --pass 2
and
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 4
4th command will use --pass 5
5th command will use --pass 2
right? because I have definitely used integers higher than 3 for passes before and I'm curious if its just the same thing written a different way.
thanks
44vince44
22nd August 2020, 05:51
Yes, of course!
By closing the options window, allows you to change the values in the main window.
I had forgotten it, it's been a while since my last HW encoding attempt.
Thank you.
You're welcome!
The answer to this is probably yes but I want to make sure that there is no real difference between
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 3
4th command will use --pass 3
5th command will use --pass 2
and
1st command will use --pass 1
2nd command will use --pass 3
3rd command will use --pass 4
4th command will use --pass 5
5th command will use --pass 2
right? because I have definitely used integers higher than 3 for passes before and I'm curious if its just the same thing written a different way.
There is no documentation for switches --pass 4 --pass 5.
Your experience with those means that --pass 4 and --pass 5 would be unofficially supported as --pass 3.
If switches --pass 4 and --pass 5 perform a pass, by reading current stats and updating it, that would mean that they are acting as --pass 3.
Staxrip uses the syntax that is documented, and I suggest you do the same, for obvious reasons!
44vince44
22nd August 2020, 06:14
Note for the multiple --pass 3 users: read this (link at the bottom of this post) old thread involving a developer of x264 stating that it is a USELESS waste of time.
He explains that either you perform a two pass scheme with switch --slow-firstpass, or perform a three pass scheme with only ONE --pass 3 pass, is almost the same, and doing more than one --pass 3 pass is a waste of time.
In other words:
Either you do this:
pass 1 with --slow-firstpass
pass 2
or do that:
pass 1
pass 3
pass 2
But that is a waste of time:
pass 1
pass 3
pass 3 again
pass 2
He says doing more than one pass 3 is for "Heating your house if your heater is broken."
And he recommends the two pass solution with --slow-firstpass as the best one.
He explains also that they implemented the updating of stats (i.e. the feature in pass 3) for reasons other than improving quality at every stats updating pass. It was not implementing "pass 3", it was implementing stats updating for many reasons other than "pass 3".
You should read it, who more than a x264 developer knows that kind of information?
Link for the discussion. (https://forum.doom9.org/showthread.php?t=154395)
Statick
26th August 2020, 14:22
I'm having a weird issue with avisynth colourspaces in the preview window in staxrip. I'm not sure if this is intentional behaviour or if I'm just missing something, as I don't fully understand this
if I assign my source clip to a variable, and then return that variable, the preview window stops working as expected, and instead shows "raw" data (I think) which varies depending on the colourspace - so instead of seeing the image as expected, I see multiple squished grey images as well as some glitchy stuff (I think this is each plane of the colourspace side by side, and some other data appearing visually)
so this happens if the bottom of my script looks like this
clip1 = last
return clip1
and if I just remove those two lines then it's absolutely normal again
however, despite the preview looking weird, the actual output generated when I run the script will be normal and correct - it's only the preview window that's affected this way
I can make the preview window look correct if I convert the clip to RGB - but this then produces a flipped output (apparently RGB space is upside-down) so I also need to flip it vertically - then I can preview the output the way I expect to
return clip1.ConverttoRGB().FlipVertical()
but because only the preview window is affected this way, I also need to remove this code again before generating my output, otherwise the output comes out flipped...
is there a reason for this to be happening this way, and is there any way I can stop it? other than modifying my script for when I need to preview it, and then correcting it when it's time to generate the output?
hevron
4th September 2020, 15:53
StaxRip-x64-2.1.4.3-Beta
There is a very inconvenient moment. When the encoding of files ends and the assembly into the container begins, an obstacle to the program may arise, for example, the free disk space has run out, a file in the temp folder is missing, or something else ... a banner flies out and everything that was done is reset :mad:. You can only manually continue the build from what was saved in the temp folder by another software. It would be correct if the program stopped and waited for the user to fix the error.
Thanks.
44vince44
4th September 2020, 19:04
But unfortunately that would not be compatible with the batch logic. If you do so, the whole batch will wait, and you eventually realize that Staxrip didn't process the jobs due to a single error.... Of course that would make sense for insufficient free space, but not for other reasons...
hevron
4th September 2020, 19:54
Of course that would make sense for insufficient free space, but not for other reasons...
It's a pity! :(
thanks.
44vince44
5th September 2020, 09:19
But it would'nt change much because mainly the problems occur when muxing. If video is already processed, when you reload the job and re-create it (with NEXT), if no modification has been made in the video settings, you'll be asked if you want to use the already encoded video, so you can finish processing quickly, without encoding again.
creeve4
6th September 2020, 21:12
I am not able to hardcode subtitles when encoding a 4K HDR source with mostly default settings. I selected the vobsub (.idx) subtitle file that was converted automatically with BDSup2Sub.
Attached is the log file.
What am I doing wrong?
Edit: got it working. I had to use VapourSynth instead of the default AviSynth.
BobbyBoberton
7th September 2020, 01:43
Just in case anyone was waiting for it there is a new beta out that includes working hardware accelerated video decoding with DXVA2 so if you have any large 4K or 8K files they would probably greatly benefit from this acceleration, I know mine did.
44vince44
7th September 2020, 08:36
@creeve4 your log file is still pending approval, I can't see it. You could put it on a free external site like pastebin.com and link to it here (instantly and easily) to avoid long waitss like now.
I would guess you're using avisynth.
The Avisynth version of hardcoded subs filter (with ctrl+h) does not work with 10bits+ sources. But VapourSynth version does.
I hope this replies to your problem.
creeve4
7th September 2020, 15:09
@creeve4 your log file is still pending approval, I can't see it. You could put it on a free external site like pastebin.com and link to it here (instantly and easily) to avoid long waitss like now.
I would guess you're using avisynth.
The Avisynth version of hardcoded subs filter (with ctrl+h) does not work with 10bits+ sources. But VapourSynth version does.
I hope this replies to your problem.
This does answer my question. Thank you.
44vince44
7th September 2020, 18:10
You're welcome!
creeve4
11th September 2020, 05:10
I have a question about using the HDR Ingest option. When using this, 2 files are generated one of which has the suffix "_HDR10".
The only difference I notice is that the _HDR10 file has an adjusted value for Mastering display luminance (which is less than the original file) and two additional values: Maximum Content Light Level and Maximum Frame-Average Light Level. Neither of these two additional values are present in video files on my blu-ray disks.
Both video files appear to play back identically on my HDR TV.
What is the purpose of this _HDR10 version of the video?
mcjordan
19th September 2020, 13:40
There are some troubles when compiling the source with the updated to 1.9.0.1 DirectN library...
benwaggoner
19th September 2020, 23:20
I have a question about using the HDR Ingest option. When using this, 2 files are generated one of which has the suffix "_HDR10".
The only difference I notice is that the _HDR10 file has an adjusted value for Mastering display luminance (which is less than the original file) and two additional values: Maximum Content Light Level and Maximum Frame-Average Light Level. Neither of these two additional values are present in video files on my blu-ray disks.
I can't speak as to what the other file is about, but it is highly unlikely that there wasn't a MaxCLL or MaxFALL value set in the source. It is possible they were coded to "0" meaning "undefined." But I've never seen any commercial HDR content where the parameter didn't exist at least. MediaInfo should show it.
MrBrownCow
22nd September 2020, 22:05
Has anyone had success with increasing 'chunks' to something more than 1? I've tried changing it to 2 a couple times now but the resulting video is corrupted right around the middle in several spots. Not sure if this is an issue with staxrip or something else.
staxrip 2.1.3.7, Ryzen 3900X CPU.
Example:
https://imgur.com/a/WF1ZtC7
If I leave chunks at 1 the result has no corruption issues but it takes much longer. My understanding is that 'chunks' basically allows the encoding to be split up into 2 parts and both parts can be encoded simultaneously. If I leave chunks at 1 the time is around 6 hours and with chunks at 2 the result is 4 hours but with corruption in the middle of the video.
With chunks at 1 staxrip seems to use about 60% of the CPU. With chunks at 2 staxrip uses about 97% of the CPU. I thought this was a good way to use my CPU and save time but if the result is corrupted obviously this doesn't help.
If anyone has thoughts or suggestions that would be great!
44vince44
23rd September 2020, 07:35
MrBrownCow, chunks has been introduced to allow full usage of CPU, especially when using Ryzens with so many logical cores. We made many tests on small files with mkv output, and they worked without corruption. And no one reported such problems until now.
This is very important. We need the log file first (so we can get at least info about staxrip version and what container you are using for output).
Paste your log file (that you can still find in the settings folder of staxrip), in pastebin.com, and link to it here.
MrBrownCow
23rd September 2020, 09:12
MrBrownCow, chunks has been introduced to allow full usage of CPU, especially when using Ryzens with so many logical cores. We made many tests on small files with mkv output, and they worked without corruption. And no one reported such problems until now.
This is very important. We need the log file first (so we can get at least info about staxrip version and what container you are using for output).
Paste your log file (that you can still find in the settings folder of staxrip), in pastebin.com, and link to it here.
Hi Vince. I don't want to come off as pointing fingers, its very possible this is something I did wrong. I've tried it three times now with different source files and had the same issues but all the source files were large files. Each one took about 5 hours with chunks at 2 and then another 7 hours with chunks back at 1 because of the corruption.
Maybe its a filter or setting? I'm open to ideas and thankful for any help here.
https://pastebin.com/vhpyLkZH
44vince44
23rd September 2020, 09:20
MrBrownCow, thanks for the log file, I will do some testing later today, using filters. Our previous tests did not include filters, and were made with an older version of Staxrip. So maybe it's a matter of filters, or a regression with newer versions. So this this important!. I'll get back tomorrow to confirm.
Edit: the problem is not due to merging the chunks: the garbled frame is at 52:38 while the cutting point is at something like 55:55, so it's gonna hard to find the reason....
Mr BrownCow, can you please check if the output video has corruption around 55m56s
44vince44
24th September 2020, 14:13
MrBrownCow, I did several tests and couldn't reproduce that. I am still wondering why the corruption doesn't happen at the merge point, as it appears in your screenshot.
Atak_Snajpera
24th September 2020, 22:55
Hi Vince. I don't want to come off as pointing fingers, its very possible this is something I did wrong. I've tried it three times now with different source files and had the same issues but all the source files were large files. Each one took about 5 hours with chunks at 2 and then another 7 hours with chunks back at 1 because of the corruption.
Maybe its a filter or setting? I'm open to ideas and thankful for any help here.
https://pastebin.com/vhpyLkZH
Remove knlmeanscl and other filters and try again.
hevron
2nd October 2020, 16:45
Friends, thank you very much for updating the program, you are the best ➕➕➕
Small note, Versions.txt is missing in the Apps folder.
JKyle
2nd October 2020, 20:51
Small note, Versions.txt is missing in the Apps folder.
All the versions info is relocated to the subfolder named "Conf".
You can see *.conf files there containing version/release date info for each app and filter.
44vince44
2nd October 2020, 20:59
yes thanks for the latest beta!
-QfG-
12th October 2020, 19:06
Hi stax, is there any chance to add DNxHR Intermediate Output in the FFMPEG section by Encoders? You can delete the "ProRes" button, "DNxHR" is the newer Intermediate Codec.
Here the inputs for DNxHR:
-c:v dnxhd -profile:v dnxhr_lb //Low Bandwidth. 8-bit 4:2:2 (yuv422p). Offline Quality.
-c:v dnxhd -profile:v dnxhr_sq //Standard Quality. 8-bit 4:2:2 (yuv422p). Suitable for delivery format.
-c:v dnxhd -profile:v dnxhr_hq //High Quality. 8-bit 4:2:2 (yuv422p)
-c:v dnxhd -profile:v dnxhr_hqx //High Quality. 10-bit 4:2:2 (yuv422p10le). UHD/4K Broadcast-quality delivery.
-c:v dnxhd -profile:v dnxhr_444 //Finishing Quality. 10-bit 4:4:4 (yuv444p10le). Cinema-quality delivery.
I don't know if i can add that himself, if anyone has an idea, how i can add this, please tell it me.
I can't encode directly via FFMPEG, because i need some Avisynth Tweaks (Inverse Telecine)
Greetings
jlw_4049
12th October 2020, 19:15
Hi stax, is there any chance to add DNxHR Intermediate Output in the FFMPEG section by Encoders? You can delete the "ProRes" button, "DNxHR" is the newer Intermediate Codec.
Here the inputs for DNxHR:
-c:v dnxhr_lb //Low Bandwidth. 8-bit 4:2:2 (yuv422p). Offline Quality.
-c:v dnxhr_sq //Standard Quality. 8-bit 4:2:2 (yuv422p). Suitable for delivery format.
-c:v dnxhr_hq //High Quality. 8-bit 4:2:2 (yuv422p)
-c:v dnxhr_hqx //High Quality. 10-bit 4:2:2 (yuv422p10le). UHD/4K Broadcast-quality delivery.
-c:v dnxhr_444 //Finishing Quality. 10-bit 4:4:4 (yuv444p10le). Cinema-quality delivery.
I don't know if i can add that himself, if anyone has an idea, how i can add this, please tell it me.
I can't encode directly via FFMPEG, because i need some Avisynth Tweaks (Inverse Telecine)
GreetingsI would suggest putting this on the tracker on github for a faster response
Sent from my SM-G986U1 using Tapatalk
-QfG-
12th October 2020, 19:31
Thx. Oh i see this is the wrong thread here, sorry.
jlw_4049
12th October 2020, 19:48
Thx. Oh i see this is the wrong thread here, sorry.Not the wrong thread, however he will look at and respond to the github issue tracker faster
Sent from my SM-G986U1 using Tapatalk
stax76
12th October 2020, 20:07
Currently, I pause 3-6 months. I try to get more people interested maintaining it.
hevron
13th October 2020, 01:08
I greet everyone. StaxRip-x64-2.1.4.8-Beta.
QVBR (Quality Variable bitrate using bitrate) preset for Intel H.264 does not work. This has been observed in all recent beta. Whatever high bitrate I set, the program switches to QVBR-Q (Quality Variable bitrate using quality - 23). If necessary, I will indicate the exact parameters of my files.
Also, another presets for Intel H.264: LA (VBR Lookahead), LA HRD does not work for me. If earlier it was possible to set the maximum Lookahead Depth - 100, now the launch with any settings ends in a crash: Failed to initialize encoder. : invalid video parameters. QSVEncC.exe finished with error! :confused:
Please pay attention to these problems. thanks
-QfG-
17th October 2020, 09:37
Updates for following AVS Filter available:
TDeint v1.7
TIVTC v1.22
https://github.com/pinterf/TIVTC/releases/tag/v1.0.22b
L E G E N D
17th October 2020, 16:01
Hi, i would like to ask for some help.
the story is that i'm trying to encode an avisynth filtered video script with NVEnc h265 in StaxRip,
i use a lot of filters to do that, as shown in script below.
i choose NVEnc to accelerate the process, because the avisynth script contains a lot of filters.
usually encoding with x264/x265 CPU costs a lot of time, then eventualy i assume using NVEnc might get the fps higher ^^
so since i'm in x64 env, i installed avisynth+ for both version 64 and 32, and added the plugins to right places,
everything works fine, i get the video preview in AVSPmod just OK.
the problem is when i start to encode the video, the fps is just the same as when i use only cpu to encode,
the GPU does nothing to speed-up the thing. i used MP_PIPELINE to create a process for each filter with max memory set to 1024 Mb,
and still i get: gpu 3% and VE 9% and fps 24 (maximum). I kept monitoring the process of MP_pipeline and noticed that cpu actes only without the gpu.
my question: is there anything to do to help accelerate the encoding of avisynth scripts with NVEnc h265/h264 ? or am i missing something??
i'll leave more details down below:
Windows 10 Pro(x64) (Build 18362)
StaxRip v2.0.8.0 Stable
NVEnc v4.68
AVSPmod V2.6.1.1 x64 and x32
MicrosoftVC++ Redistributable 2005->2019 x64 & x32
NVidia Driver v441.08
Encoder settings:
--vbrhq 2048 --codec h265 --preset quality --profile main10 --tier high --level 5.1 --output-depth 10 --aq --bframes 6 --ref 16 --gop-len 600
--lookahead 32 --strict-gop --nonrefp --cu-max 32 --cuda-schedule auto --colormatrix bt709 --colorprim bt709 --transfer bt709
--vpp-edgelevel strength=10,threshold=15,black=5,white=2 --mv-precision full-pel --cabac
Max B frames are 0 frames.
NVEncC (x64) 4.68 (r1402) by rigaya, Mar 7 2020 13:54:44 (VC 1916/Win/avx2)
OS Version Windows 10 x64 (18362)
CPU Intel Core i7-8550U @ 1.80GHz [TB: 2.59GHz] (4C/8T)
GPU #0: GeForce GTX 1050 (640 cores, 1493 MHz)[PCIe3x16][441.08]
NVENC / CUDA NVENC API 9.1, CUDA 10.2, schedule mode: auto
Input Buffers CUDA, 41 frames
Input Info Avisynth+ 2.60(yv12)->nv12 [AVX2], 1280x720, 24000/1001 fps
Vpp Filters copyHtoD
cspconv(nv12 -> yv12(16bit))
edgelevel: strength 10.0, threshold 15.0, black 5.0, white 2.0
cspconv(yv12(16bit) -> p010)
Output Info H.265/HEVC main10 @ Level 5.1
1280x720p 1:1 23.976fps (24000/1001fps)
Encoder Preset quality
Rate Control VBRHQ
Bitrate 2048 kbps (Max: 153600 kbps)
Target Quality auto
Initial QP I:20 P:23 B:25
VBV buf size auto
Lookahead on, 32 frames, Adaptive I, B Insert
GOP length 600 frames
B frames 0 frames [ref mode: disabled]
Ref frames 16 frames
AQ on
CU max / min 32 / auto
VUI matrix:bt709,colorprim:bt709,transfer:bt709
Others mv:full-pel nonrefp
Script i'm trying to encode
MP_Pipeline("""
### platform: win64
FFmpegSource2("C:\Users\LEGEND\Desktop\Filter\File.mkv", width=1280, height=720, resizer="BICUBIC", colorspace="YV12")
### ###
### platform: win32
SetMemoryMax(1024)
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins\eDeen.dll")
eDeen(r=2, ty=14, tuv=21, ly=7, luv=10, hqc=true)
### prefetch: 32, 16
### ###
### platform: win32
SetMemoryMax(1024)
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins\Deen.dll")
Deen(mode="a2d", rad=2, thrY=14, thrUV=16, min=0.5)
### prefetch: 32, 16
### ###
### platform: win32
SetMemoryMax(1024)
Sharpen(0.20)
### prefetch: 32, 16
### ###
### platform: win32
SetMemoryMax(1024)
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins\aWarpSharp2.dll")
aWarpSharp2(depth=20)
### prefetch: 32, 16
### ###
### platform: win32
SetMemoryMax(1024)
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins\MSharpen.dll")
msharpen(threshold=10, strength=70,mask=false, highq=true)
### prefetch: 32, 16
### ###
### platform: win32
SetMemoryMax(1024)
FastLineDarken(strength=100, luma_cap=191, threshold=4, thinning=24)
### prefetch: 32, 16
### ###
### platform: win32
SetMemoryMax(1024)
Trim(18200, 25900)
### prefetch: 32, 16
### ###
""")
tell me if you need more details. and please reply if you have something to tell me. Thanks in advance.
44vince44
18th October 2020, 06:00
@Legend, you need to monitor the CPU usage, to know what's happening.
I bet the CPU usage is low. Meaning, you're not taking advantage of the CPU speed for some reason. This reason could be that one or more of the AVisynth plugins is not working in multi-cpu mode.
To force multi-cpu, you have to put at the end of your script, only once:
Prefetch(4)
4 being here the number of CPU logical cores. You can set it up to 8 on your i7 setup.
Try that and it should solve your problem.
Note: I'm not sure that SetMemoryMax(1024) is required here...
L E G E N D
18th October 2020, 18:45
@Legend, you need to monitor the CPU usage, to know what's happening.
I bet the CPU usage is low. Meaning, you're not taking advantage of the CPU speed for some reason. This reason could be that one or more of the AVisynth plugins is not working in multi-cpu mode.
To force multi-cpu, you have to put at the end of your script, only once:
Prefetch(4)
4 being here the number of CPU logical cores. You can set it up to 8 on your i7 setup.
Try that and it should solve your problem.
Note: I'm not sure that SetMemoryMax(1024) is required here...
First of all, thanks to responding ^^
you bet right, the CPU usage is 48~58 %. I don't know much about the Avisynth Plugins/Scripts Multi-core/Multithread support.
I kept monitoring the Mp_pipeline processes, they don't use much memory nor GPU. i tried removing the lines of setting max memory
from the script, and set Prefetch(8) in the end, but the NVENC behaves the same, CPU usage don't exceed 60 % and GPU is at 3% usage 9% VE.
My thought is that mp_pipeline is written in C, not CUDA, hence, it doesn't make the child processes of each filter profit from the GPU as it should be
in this case. so maybe there's no point in using NVENC when no GPU resources are not being exploited.
maybe the solution is to use Vapoursynth.
https://i.imgur.com/5iMWl8K.jpg
real.finder
19th October 2020, 23:22
@l e g e n d
MP_Pipeline("""
### platform: win64
FFmpegSource2("", width=1280, height=720, resizer="BICUBIC", colorspace="YV12")
### prefetch: 32, 16
### ###
### platform: win32
SetFilterMTMode("eDeen", 2)
SetFilterMTMode("Deen", 2)
eDeen(r=2, ty=14, tuv=21, ly=7, luv=10, hqc=true)
Deen(mode="a2d", rad=2, thrY=14, thrUV=16, min=0.5)
prefetch(8)
### prefetch: 20, 10
### ###
### platform: win64
Sharpen(0.20)
aWarpSharp2(depth=20)
msharpen(threshold=10, strength=70,mask=false, highq=true)
FastLineDarken(strength=100, luma_cap=191, threshold=4, thinning=24)
Trim(18200, 25900)
prefetch(8)
### prefetch: 10, 5
### ###
""")
this give me 60fps
L E G E N D
20th October 2020, 01:27
@l e g e n d
MP_Pipeline("""
### platform: win64
FFmpegSource2("", width=1280, height=720, resizer="BICUBIC", colorspace="YV12")
### prefetch: 32, 16
### ###
### platform: win32
SetFilterMTMode("eDeen", 2)
SetFilterMTMode("Deen", 2)
eDeen(r=2, ty=14, tuv=21, ly=7, luv=10, hqc=true)
Deen(mode="a2d", rad=2, thrY=14, thrUV=16, min=0.5)
prefetch(8)
### prefetch: 20, 10
### ###
### platform: win64
Sharpen(0.20)
aWarpSharp2(depth=20)
msharpen(threshold=10, strength=70,mask=false, highq=true)
FastLineDarken(strength=100, luma_cap=191, threshold=4, thinning=24)
Trim(18200, 25900)
prefetch(8)
### prefetch: 10, 5
### ###
""")
this give me 60fps
Thank you real.finder i tried the script above and got 100% CPU usage, performance jumped to 43 fps.
also there are some artifacts that show up periodically. i'll leave two pictures for comparison. anyway THANK YOU ^^.
original:
https://i.imgur.com/xEcnSRv.png
artifacts:
https://i.imgur.com/VHaYEqV.png
[/SPOILER]
real.finder
20th October 2020, 11:14
you can replace the old FastLineDarken with FastLineDarkenMOD4 for more speed and stability
yes that come from edeen, that why I hate using close sources plugins! you can't do anything about it, except change SetFilterMTMode("eDeen", 2) to SetFilterMTMode("eDeen", 3) or remove prefetch(8) from the block that has eDeen and in both cases you may get back to old speed (eDeen will be a Bottle neck)
edit: also you can replace
SetFilterMTMode("eDeen", 2)
SetFilterMTMode("Deen", 2)
eDeen(r=2, ty=14, tuv=21, ly=7, luv=10, hqc=true)
Deen(mode="a2d", rad=2, thrY=14, thrUV=16, min=0.5)
prefetch(8)
### prefetch: 20, 10
with
eDeen(r=2, ty=14, tuv=21, ly=7, luv=10, hqc=true)
Deen(mode="a2d", rad=2, thrY=14, thrUV=16, min=0.5)
### branch: 4
### prefetch: 20, 10
which give a faster speed (not same as prefetch(8)) and no artifacts
lordalibaski
31st October 2020, 03:27
edit sorry meant to put it in the other staxrip topic.
Dann0245
1st November 2020, 08:51
How to load VapourSynth with StarxRip?
I use python 3.8.6 and VapourSyntth R52
my test.vpy script, it's a sample from http://www.vapoursynth.com/doc/gettingstarted.html
from vapoursynth import core
video_in = core.ffms2.Source(source='Rule6.mkv')
#video_in = core.lsmas.LWLibavSource(r'Rule6.mkv')
video_in = core.std.Transpose(video_in)
video_in.set_output()
Virtual Dub 2 opens it well
https://forum.doom9.org/attachment.php?attachmentid=17539&stc=1&d=1604216164
I can run the script from command line too.
vspipe --y4m test.vpy - | x265 --y4m - --output encoded.mkv
StarxRip 2.1.4.8 Beta, give an error when open script:
https://forum.doom9.org/attachment.php?attachmentid=17540&stc=1&d=1604216495
When I chage
video_in = core.ffms2.Source(source='Rule6.mkv')
to
video_in = core.lsmas.LWLibavSource(r'Rule6.mkv')
StarRip give me another error:
I already put file LSMASHSource.dll into: "StaxRip-x64-2.1.4.8-Beta\Settings\Plugins\VapourSynth" and "StaxRip-x64-2.1.4.8-Beta\Apps\FrameServer\VapourSynth\vapoursynth64\coreplugins"
https://forum.doom9.org/attachment.php?attachmentid=17541&stc=1&d=1604216749
do some search, I found this post: https://forum.doom9.org/showthread.php?p=1816963#post1816963
stax76 said: "Let staxrip create a vpy script"
But how to do that?
44vince44
1st November 2020, 11:54
It means you have to open staxrip, click where you read AVS Filters (in blue) and select Filter Setup > Vapoursynth. It will change to VS Filters.
Then open or drag and drop the video file in staxrip, and build your filters from there (read staxrip doc).
Staxrip will build the script for you, and you'll be able to execute the process without the whole scripting method that is explained in Vapoursynth.
Dann0245
2nd November 2020, 02:10
It means you have to open staxrip, click where you read AVS Filters (in blue) and select Filter Setup > Vapoursynth. It will change to VS Filters.
Then open or drag and drop the video file in staxrip, and build your filters from there (read staxrip doc).
Staxrip will build the script for you, and you'll be able to execute the process without the whole scripting method that is explained in Vapoursynth.
I figured it out.
Thank!
hevron
14th November 2020, 16:29
I appeal to experts for help. Updated plugins on Update-Links Staxrip -Stuff.
Plugins_JPSDR: in the folder there are 8 pieces, which of them should be selected?
AVS-Stuff real.finder: avs 2.6 and up or avs 2.5 and up should be selected? Thank you.
Win10x64.
44vince44
16th November 2020, 13:41
hevron,
1) for JPSDR:
-default one in Staxrip releases is Clang W7 AVX to allow compatibility with older generation CPUs
-you can manually replace with Release tClang W7 AVX2 if you have a more recent processor (by recent I mean not older than 4-5 years approximately)
2) for AviSynth+, we use the 3.6xx fork, not the 2.x, get it here https://github.com/AviSynth/AviSynthPlus/releases
hevron
16th November 2020, 16:10
44vince44, thanks a lot for the clarification, Release Clang W7 AVX2 is more suitable for me.
This link https://github.com/AviSynth/AviSynthPlus/releases has AviSynth + 3.6.1/ Date = 2020-06-20, but we have Version 3.6.2 test 2 /Date = 2020-08-31
:thanks:
44vince44
21st November 2020, 07:45
You're welcome hevron!
I don't know where Stax76 got the beta, but I believe soon there'll be an official release. When Stax76 includes a beta in Staxrip, it's due to a specific fix that he has been expecting.
DavidRyan
23rd November 2020, 12:27
I tried to use DSS2 as a source filter for the first time (StaxRip v2.1.3.0) as I wanted to try it on a variable frame rate MKV (from a DVD using makemkv). But I run into the following error every time:
https://images2.imgbox.com/97/40/o37wWjX3_o.png
Does anyone have an idea of what is wrong? I don't use vapoursynth, only avisynth so not sure if the "VS_In" refers to that. Checking in the apps-manage menu it says "DSS2mod - status OK". Here is the mediainfo of the file if that matters:
"Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Variable
Frame rate : 24.035 FPS
Original frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits"
Would appreciate any advice if anyone has an idea on how to get DSS2 working.
EDIT: Resolved, as described below
Mister XY
24th November 2020, 08:49
A small question, is it possible that i can use my own compiled ffmpeg version to encode videos? If i change the folder for ffmpeg, ffmpeg crashed with error message.
Error Video encoding x265 (2.1.4.8)
Video encoding x265 returned error exit code: 1 (0x1)
It's unclear what the exit code means, in case it's a Windows system error then it possibly means:
Unzulässige Funktion
------------------------- Video encoding x265 -------------------------
ffmpeg 4.3.1
"C:\Program Files\FFmpeg 4.3\ffmpeg.exe" -i "E:\BluRay\Temp\Movie_t01_temp\ffmpegMovie_t01.avs" -c:v libx265 -crf 20 -pix_fmt yuv420p10le -x265-params profile=main10 -an -y -hide_banner "E:\BluRay\Temp\Movie_t01_temp\ffmpegMovie_t01_out.h265"
[avs2 @ 00000221323e8940] Format avs2 detected only with low score of 1, misdetection possible!
[1;36m[davs2 info]: davs2: 1.6.205 b06d7585620f4e90.8, 2020-11-20 05:32:11[0m
[1;36m[davs2 info]: CPU Capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2[0m
[1;36m[davs2 info]: Manager 221323fbe20: using 1 thread(s): 1(frame/AEC)+0(pool/REC), 2 tasks[0m
[1;31m[davs2 error]: Manager 221323fbe20: Invalid input Byte-Stream, not start code: 416464[0m
[libdavs2 @ 00000221323f2780] Decoder error: can't read packet
[avs2 @ 00000221323e8940] decoding for stream 0 failed
[avs2 @ 00000221323e8940] Could not find codec parameters for stream 0 (Video: avs2 (libdavs2), none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, avs2, from 'E:\BluRay\Temp\Movie_t01_temp\ffmpegMovie_t01.avs':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: avs2, none, 25 tbr, 1200k tbn, 25 tbc
[1;36m[davs2 info]: davs2: 1.6.205 b06d7585620f4e90.8, 2020-11-20 05:32:11[0m
[1;36m[davs2 info]: CPU Capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2[0m
[1;33m[davs2 warn]: Manager 22132444fc0: Max number of thread reached, forcing to be 8
[0m
[1;36m[davs2 info]: Manager 22132444fc0: using 8 thread(s): 8(frame/AEC)+0(pool/REC), 9 tasks[0m
Stream mapping:
Stream #0:0 -> #0:0 (avs2 (libdavs2) -> hevc (libx265))
Press [q] to stop, [?] for help
[1;31m[davs2 error]: Manager 22132444fc0: Invalid input Byte-Stream, not start code: 416464[0m
[libdavs2 @ 00000221323e9d00] Decoder error: can't read packet
Error while decoding stream #0:0: Generic error in an external library
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Conversion failed!
StaxRip.ErrorAbortException: Video encoding x265 returned error exit code: 1 (0x1)
It's unclear what the exit code means, in case it's a Windows system error then it possibly means:
Unzulässige Funktion
------------------------- Video encoding x265 -------------------------
ffmpeg 4.3.1
"C:\Program Files\FFmpeg 4.3\ffmpeg.exe" -i "E:\BluRay\Temp\Movie_t01_temp\ffmpegMovie_t01.avs" -c:v libx265 -crf 20 -pix_fmt yuv420p10le -x265-params profile=main10 -an -y -hide_banner "E:\BluRay\Temp\Movie_t01_temp\ffmpegMovie_t01_out.h265"
[avs2 @ 00000221323e8940] Format avs2 detected only with low score of 1, misdetection possible!
[1;36m[davs2 info]: davs2: 1.6.205 b06d7585620f4e90.8, 2020-11-20 05:32:11[0m
[1;36m[davs2 info]: CPU Capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2[0m
[1;36m[davs2 info]: Manager 221323fbe20: using 1 thread(s): 1(frame/AEC)+0(pool/REC), 2 tasks[0m
[1;31m[davs2 error]: Manager 221323fbe20: Invalid input Byte-Stream, not start code: 416464[0m
[libdavs2 @ 00000221323f2780] Decoder error: can't read packet
[avs2 @ 00000221323e8940] decoding for stream 0 failed
[avs2 @ 00000221323e8940] Could not find codec parameters for stream 0 (Video: avs2 (libdavs2), none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, avs2, from 'E:\BluRay\Temp\Movie_t01_temp\ffmpegMovie_t01.avs':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: avs2, none, 25 tbr, 1200k tbn, 25 tbc
[1;36m[davs2 info]: davs2: 1.6.205 b06d7585620f4e90.8, 2020-11-20 05:32:11[0m
[1;36m[davs2 info]: CPU Capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2[0m
[1;33m[davs2 warn]: Manager 22132444fc0: Max number of thread reached, forcing to be 8
[0m
[1;36m[davs2 info]: Manager 22132444fc0: using 8 thread(s): 8(frame/AEC)+0(pool/REC), 9 tasks[0m
Stream mapping:
Stream #0:0 -> #0:0 (avs2 (libdavs2) -> hevc (libx265))
Press [q] to stop, [?] for help
[1;31m[davs2 error]: Manager 22132444fc0: Invalid input Byte-Stream, not start code: 416464[0m
[libdavs2 @ 00000221323e9d00] Decoder error: can't read packet
Error while decoding stream #0:0: Generic error in an external library
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Conversion failed!
bei StaxRip.Proc.Start() in D:\Projekte\VB\staxrip\General\Proc.vb:Zeile 399.
bei StaxRip.ffmpegEnc.Encode(String args) in D:\Projekte\VB\staxrip\Encoding\ffmpegEnc.vb:Zeile 139.
bei StaxRip.ffmpegEnc.Encode() in D:\Projekte\VB\staxrip\Encoding\ffmpegEnc.vb:Zeile 125.
bei System.Threading.Tasks.Parallel.<>c__DisplayClass4_0.<Invoke>b__0()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei StaxRip.GlobalClass.ProcessJob(String jobPath) in D:\Projekte\VB\staxrip\General\GlobalClass.vb:Zeile 312.
DavidRyan
24th November 2020, 11:20
I tried to use DSS2 as a source filter for the first time (StaxRip v2.1.3.0) as I wanted to try it on a variable frame rate MKV (from a DVD using makemkv). ...
Does anyone have an idea of what is wrong? I don't use vapoursynth, only avisynth so not sure if the "VS_In" refers to that. Checking in the apps-manage menu it says "DSS2mod - status OK". Here is the mediainfo of the file if that matters:
...
Would appreciate any advice if anyone has an idea on how to get DSS2 working.
If anyone else has this issue, I resolved it by installing lavfilters. DSS2 requires lavfilters to either be:
- installed on the system
- LAVFilters.ax files in the \LAVFilters subfolder in the same folder where avss.dll is placed (not the case with staxrip)
- a path to the LAVFilters.ax files specified using "lavf_path"
ChaosKing
24th November 2020, 11:40
Makes sense, as DirectShow uses codecs installed on your system. DSS2 does *not* require lavfilter but it happens to be that it installed the needed codec on your system.
Why not just use ffms2 or lsmash?
Mister XY
26th November 2020, 10:37
A little problem. If I want to create a 2 pass video with ffmpeg, it saves the file ffmpeg2pass-0 in the Staxrip folder. The problem with this is if Staxrip does not have rights access to it will be prohibited. Can't you do it so that the ffmpeg2pass-0 file is saved in the Temp Files folder?
Thx
44vince44
28th November 2020, 05:13
Mister XY I confirm this. It's a bug. The command line of ffmpeg should include the -passlogfile option with the temp location specified. This is a real bug, I will create a ticket in github, mentioning your find.
The problem is solved by adding the custom switch -passlogfile "%temp_dir%\ffmpeg2passlog"
I've noted that as well in the bug report.
Mister XY
28th November 2020, 13:53
I must do anything wrong. I add this line -passlogfile "%temp_dir%\ffmpeg2passlog" to the custom line in ffmpeg window, but when start to encode i get this message.
Cannot write log file '%temp_dir%\ffmpeg2passlog-0.log' for pass-1 encoding: No such file or directory
44vince44
29th November 2020, 07:28
I must do anything wrong. I add this line -passlogfile "%temp_dir%\ffmpeg2passlog" to the custom line in ffmpeg window, but when start to encode i get this message.
Cannot write log file '%temp_dir%\ffmpeg2passlog-0.log' for pass-1 encoding: No such file or directory
You're doing nothing wrong. The macro value is not being passed :-(
Another bug?
Not only %temp_dir%, but ALL MACROS are not passed from the custom line :-((((( It seems the custom line does not support macros.
So in that case, only as workaround, use a system env variable -passlogfile "%temp%\ffmpeg2passlog"
This will use the global user temporary folder (as defined in your system)
Mister XY
29th November 2020, 08:43
OK, i have also seen, that the macros did not passing. If i have set decoder to another decoder looks like software, dxva2 etc. i must set the crop values. If i set the values via macros, it did not pass.
VincAlastor
29th November 2020, 11:57
[AOMediaCodec/SVT-AV1] Pre-release v0.8.6 - SVT-AV1 v0.8.6
default setting changed: --irefresh-type 2
[0.8.6] - 2020-11-28
Encoder
Further quality-speed tradeoffs tuning for VOD use cases
Improved TPL support within 1-pass and 2-pass CRF moode
Continued non-optimized support for 2pass VBR and CRF
Align kernel nomenclature to prefix svt_aom for kernels brough from libaom to avoid symbol conflicts
Build and Testing
Bug fixes
Improve CI
Added CI support for gitlab
Improve Unit Test Coverage
Address C vs asm mismatches
Fix static analysis warnings / errors
Add address sanitizer
Fix symbol conflicts with libaom and libvpx when staticly linked to ffmpeg
https://github.com/AOMediaCodec/SVT-AV1/releases/tag/v0.8.6
Z'Hadum
6th January 2021, 23:23
Just noticed 2.1.6.0 stable is out:
https://github.com/staxrip/staxrip/releases
:thanks:
44vince44
7th January 2021, 16:12
It has some unfortunate bugs, get directly the fixed beta 2.1.6.1
here: https://www.dropbox.com/sh/4ctl2y928xkak4f/AAADEZj_hFpGQaNOdd3yqcAHa?dl=0
Stax76 has released a new Stable 2.1.7.0
Trench
8th January 2021, 01:45
I've been fighting an error similar to what Mister XY just mentioned, but I seem to have a different root cause. A log in my case will show:
------------------------- System Environment -------------------------
StaxRip : 2.1.7.0
Windows : Windows 10 Pro 2009
Language : English (United States)
CPU : Intel(R) Xeon(R) CPU E3-1280 V2 @ 3.60GHz
GPU : Microsoft Remote Display Adapter, NVIDIA GeForce GTX 1050 Ti
Resolution : 1920 x 1080
DPI : 96
----------------------- Media Info Source File -----------------------
C:\Files\Staxrip\The.File.mkv
General
Complete name : C:\Files\Staxrip\The.File.mkv
Format : Matroska
Format version : Version 4
File size : 598 MiB
Duration : 51 min 8 s
Overall bit rate : 1 636 kb/s
Movie name : The.File
Encoded date : UTC 2021-01-06 03:04:57
Writing application : mkvmerge v51.0.0 ('I Wish') 64-bit
Writing library : libebml v1.4.0 + libmatroska v1.6.2
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4@Main
Codec ID : V_MPEGH/ISO/HEVC
Duration : 51 min 8 s
Bit rate : 1 424 kb/s
Width : 1 920 pixels
Height : 960 pixels
Display aspect ratio : 2.000
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.032
Stream size : 521 MiB (87%)
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 2
Format : AAC LC SBR
Format/Info : Advanced Audio Codec Low Complexity with Spectral Band Replication
Commercial name : HE-AAC
Format settings : Explicit
Codec ID : A_AAC-2
Duration : 51 min 8 s
Bit rate : 206 kb/s
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 23.438 FPS (2048 SPF)
Compression mode : Lossy
Delay relative to video : 23 ms
Stream size : 75.5 MiB (13%)
Language : English
Default : Yes
Forced : No
Text #1
ID : 3
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Duration : 48 min 51 s
Bit rate : 52 b/s
Count of elements : 744
Stream size : 18.9 KiB (0%)
Title : English
Language : English
Default : No
Forced : No
------------------------------ Demux MKV ------------------------------
mkvextract 52
C:\Users\Trench\StaxRip-x64-2.1.7.0-Stable\Apps\Support\MKVToolNix\mkvextract.exe C:\Files\Staxrip\The.File.mkv tracks 2:"C:\Files\Staxrip\The.File_temp\ID1 English {English}.srt" 1:"C:\Files\Staxrip\The.File_temp\ID1 23ms English.aac" --ui-language en
Error: Failed to create the file 'C:\Files\Staxrip\The.File_temp\ID1 23ms English.aac': 0 (open file error)
Start: 5:33:38 PM
End: 5:33:38 PM
Duration: 00:00:00
-------------------------------- Error --------------------------------
no output found
-------------------------- Error Demux Audio --------------------------
Demux Audio returned error exit code: 1 (0x1)
It's unclear what the exit code means, in case it's a Windows system error then it possibly means:
Incorrect function
----------------------------- Demux Audio -----------------------------
ffmpeg N-100448-gab6a56773f-x64-gcc10.2.0 Patman
C:\Users\Trench\StaxRip-x64-2.1.7.0-Stable\Apps\Encoders\ffmpeg\ffmpeg.exe -i C:\Files\Staxrip\The.File.mkv -vn -sn -y -hide_banner -c:a copy "C:\Files\Staxrip\The.File_temp\ID1 23ms English.m4a"
Input #0, matroska,webm, from 'C:\Files\Staxrip\The.File.mkv':
Metadata:
title : The.File
encoder : libebml v1.4.0 + libmatroska v1.6.2
creation_time : 2021-01-06T03:04:57.000000Z
Duration: 00:51:08.61, start: 0.000000, bitrate: 1635 kb/s
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x960, SAR 1:1 DAR 2:1, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
Metadata:
BPS-eng : 1424359
DURATION-eng : 00:51:08.607000000
NUMBER_OF_FRAMES-eng: 73573
NUMBER_OF_BYTES-eng: 546350126
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2021-01-06 03:04:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: aac (HE-AAC), 48000 Hz, 5.1, fltp (default)
Metadata:
BPS-eng : 206485
DURATION-eng : 00:51:08.459000000
NUMBER_OF_FRAMES-eng: 71917
NUMBER_OF_BYTES-eng: 79199106
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2021-01-06 03:04:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Subtitle: subrip
Metadata:
title : English
BPS-eng : 52
DURATION-eng : 00:48:51.678000000
NUMBER_OF_FRAMES-eng: 744
NUMBER_OF_BYTES-eng: 19353
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2021-01-06 03:04:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
C:\Files\Staxrip\The.File_temp\ID1 23ms English.m4a: Permission denied
----------------------------- Demux Audio -----------------------------
ffmpeg N-100448-gab6a56773f-x64-gcc10.2.0 Patman
C:\Users\Trench\StaxRip-x64-2.1.7.0-Stable\Apps\Encoders\ffmpeg\ffmpeg.exe -i C:\Files\Staxrip\The.File.mkv -vn -sn -y -hide_banner -c:a copy "C:\Files\Staxrip\The.File_temp\ID1 23ms English.m4a"
Input #0, matroska,webm, from 'C:\Files\Staxrip\The.File.mkv':
Metadata:
title : The.File
encoder : libebml v1.4.0 + libmatroska v1.6.2
creation_time : 2021-01-06T03:04:57.000000Z
Duration: 00:51:08.61, start: 0.000000, bitrate: 1635 kb/s
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x960, SAR 1:1 DAR 2:1, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
Metadata:
BPS-eng : 1424359
DURATION-eng : 00:51:08.607000000
NUMBER_OF_FRAMES-eng: 73573
NUMBER_OF_BYTES-eng: 546350126
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2021-01-06 03:04:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: aac (HE-AAC), 48000 Hz, 5.1, fltp (default)
Metadata:
BPS-eng : 206485
DURATION-eng : 00:51:08.459000000
NUMBER_OF_FRAMES-eng: 71917
NUMBER_OF_BYTES-eng: 79199106
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2021-01-06 03:04:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Subtitle: subrip
Metadata:
title : English
BPS-eng : 52
DURATION-eng : 00:48:51.678000000
NUMBER_OF_FRAMES-eng: 744
NUMBER_OF_BYTES-eng: 19353
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2021-01-06 03:04:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
C:\Files\Staxrip\The.File_temp\ID1 23ms English.m4a: Permission denied
Start: 5:33:38 PM
End: 5:33:39 PM
Duration: 00:00:00
------------------------------ Exception ------------------------------
StaxRip.ErrorAbortException: Demux Audio returned error exit code: 1 (0x1)
It's unclear what the exit code means, in case it's a Windows system error then it possibly means:
Incorrect function
----------------------------- Demux Audio -----------------------------
ffmpeg N-100448-gab6a56773f-x64-gcc10.2.0 Patman
C:\Users\Trench\StaxRip-x64-2.1.7.0-Stable\Apps\Encoders\ffmpeg\ffmpeg.exe -i C:\Files\Staxrip\The.File.mkv -vn -sn -y -hide_banner -c:a copy "C:\Files\Staxrip\The.File_temp\ID1 23ms English.m4a"
Input #0, matroska,webm, from 'C:\Files\Staxrip\The.File.mkv':
Metadata:
title : The.File
encoder : libebml v1.4.0 + libmatroska v1.6.2
creation_time : 2021-01-06T03:04:57.000000Z
Duration: 00:51:08.61, start: 0.000000, bitrate: 1635 kb/s
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x960, SAR 1:1 DAR 2:1, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
Metadata:
BPS-eng : 1424359
DURATION-eng : 00:51:08.607000000
NUMBER_OF_FRAMES-eng: 73573
NUMBER_OF_BYTES-eng: 546350126
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2021-01-06 03:04:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: aac (HE-AAC), 48000 Hz, 5.1, fltp (default)
Metadata:
BPS-eng : 206485
DURATION-eng : 00:51:08.459000000
NUMBER_OF_FRAMES-eng: 71917
NUMBER_OF_BYTES-eng: 79199106
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2021-01-06 03:04:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Subtitle: subrip
Metadata:
title : English
BPS-eng : 52
DURATION-eng : 00:48:51.678000000
NUMBER_OF_FRAMES-eng: 744
NUMBER_OF_BYTES-eng: 19353
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2021-01-06 03:04:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
C:\Files\Staxrip\The.File_temp\ID1 23ms English.m4a: Permission denied
at StaxRip.Proc.Start() in D:\Projekte\VB\staxrip\General\Proc.vb:line 384
at StaxRip.ffmpegDemuxer.DemuxAudio(String sourcefile, AudioStream stream, AudioProfile ap, Project proj, Boolean overrideExisting) in D:\Projekte\VB\staxrip\General\Demux.vb:line 366
at StaxRip.mkvDemuxer.Demux(String sourcefile, IEnumerable`1 audioStreams, IEnumerable`1 subtitles, AudioProfile ap, Project proj, Boolean onlyEnabled, Boolean videoDemuxing, Boolean overrideExisting, String title, Boolean useStreamName) in D:\Projekte\VB\staxrip\General\Demux.vb:line 963
at StaxRip.mkvDemuxer.Run(Project proj) in D:\Projekte\VB\staxrip\General\Demux.vb:line 731
at StaxRip.MainForm.Demux() in D:\Projekte\VB\staxrip\Forms\MainForm.vb:line 3212
at StaxRip.MainForm.OpenVideoSourceFiles(IEnumerable`1 files, Boolean isEncoding) in D:\Projekte\VB\staxrip\Forms\MainForm.vb:line 2134
It's not a permissions issue of being able to create or write files in the temporary directory, because the Staxrip log shown is being created and written there successfully by Staxrip.exe.
But two different tools as shown in the log -- mkvextract.exe trying to create "ID1 23ms English.aac", and then ffmpeg.exe trying to create "ID1 23ms English.m4a" -- complain as though files cannot be created in the "C:\Files\Staxrip\The.File_temp" temp area.
Microsoft's Process Monitor shows me the tools are receiving ACCESS_DENIED in their attempt to create those files, as though it actually is a permissions issue.
But Staxrip creates the log file in the temp area successfully, and I can create files in the temp area using File Explorer. Both Staxrip.exe and File Explorer are running as normal non-elevated processes. Running Staxrip.exe as administrator still results in the same failure for mkvextract.exe and ffmpeg.exe.
I've concluded that the issue this: In the path shown, C:\Files\ is a mount point. Meaning C:\ itself is an SSD drive, but C:\Files\ is the mount point of a multi-terabyte magnetic drive for work space. The successful temp folder creation & successful log file creation by Staxrip.exe itself receives REPARSE in response to the C:\Files\-involved path, but the tools simply fail with ACCESS_DENIED.
It seems like "suddenly" Staxrip processing cannot traverse a mount point. Staxrip.exe itself can still traverse that path; but not the tools being launched.
This happens with 2.1.5.5.Beta and 2.1.7.0.Stable. Note the log says "Windows 10 2009", and my WinVER confirms "20H2 19042.685".
If I run 2.1.3.0.Stable or 2.1.4.8.Beta against the same source file in the same folder setup, the tools are able to create and write to files in the temporary area just fine.
Some unintended consequence of how the tools were updated for long path handling? Or can someone refute these results, and you are able to use a mount point in the path under Windows 20H2 successfully; meaning I should continue digging for a more specific root cause?
44vince44
8th January 2021, 10:43
@Trench, is it possible to edit the properties of your C:\Files\Staxrip\ folder and set permissions (full control) to you as user? do mount points allow that ?
We must know if the problem persists after that.
stax76
8th January 2021, 16:36
@Trench
The only relevant change I remember is changing the current directory of the staxrip process to the video temp folder, this was not long ago. Before the current folder of the staxrip process was usually the startup folder where staxrip is located. That's something a child process inherits.
44vince44
8th January 2021, 17:57
When creating folders directly in C:\ the system does not give them proper permissions for free read/write operations. Unlike a folder created in the user's official temp tree, or in the user's tree more generally.
As we are discussing something happening with a temp folder, it is wise to check the permissions on the folder C:\Files\Staxrip\ in Trench's case.
This should not be considered as a problem in Staxrip, even if it used to work otherwise.
So, @Trench, please check and do the permissions change, or set your paths to locations that you have R/W control on.
LazyNcoder
18th January 2021, 16:00
@stax76 Can you please compile Staxrip more often?
I see there are more than 75 changes since the last release 2.1.7.0
I'm impatiently waiting...
Thank you
Atlantis
18th January 2021, 20:04
Question. I remember you said some time ago that you added a button for attachments in demux dialog to select none like Audio and Subtitles but I noticed it is not there.
44vince44
19th January 2021, 08:42
@LazyNcoder you should check up the Staxrip docs, downloads section. There you get links to the betas.
There have been 3 betas released since then.
https://staxrip.readthedocs.io/introduction.html#download
freezer
19th January 2021, 15:40
Hi guys - I need some help with audio processing in Staxrip. Feeling really stupid right now as I can't figure out on myself what I am doing wrong.
Goal: import old interlaced footage, process the video and copy (or convert) audio to ProRes MOV with PCM audio.
I've got three types of source footage:
#1 miniDV AVI with stereo channel PCM audio - this does work as expected by setting audio to copy/mux profile. No problem here. A window pops up and asks for the audio track to get demuxed.
#2 HDV m2t with stereo channel MP2 audio
#3 XDCAM HD422 mxf OP-1A with 8 mono channel PCM audio
With #2 and #3 I just can't get any audio processed through the pipeline.
Staxrip stable 2.1.7.0 with local installations of
AviSynth 3.7.0
VapourSynth r52
Phyton 3.8.2150
Scripting runs through VaporSynth.
But no matter what I choose for audio as the profile, it doesn't get loaded when the video source gets loaded.
I can right click into the audio field and select the file again, then I get at least one track. That's ok for processing one file, but for batch processing hundreds it can't be the way to go.
Creating a ffmpeg -c:a pcm_s24le profile did not help either...
I have googled around for 2 days and read several threads but there must be something (setting/procedure) I am obviously missing.
Hopefully someone with more knowledge can give me a hint into the right direction?
44vince44
19th January 2021, 15:52
Can you please provide a mediainfo sheet of the source that has the problem, and a log of the processing as well (you may paste them in pastebin.com then link to them here). I'm sure we'll help once we got that information.
LazyNcoder
19th January 2021, 15:56
@LazyNcoder you should check up the Staxrip docs, downloads section. There you get links to the betas.
There have been 3 betas released since then.
https://staxrip.readthedocs.io/introduction.html#download
Thank you very much! :sly:
freezer
19th January 2021, 16:01
Can you please provide a mediainfo sheet of the source that has the problem, and a log of the processing as well (you may paste them in pastebin.com then link to them here). I'm sure we'll help once we got that information.
Thanks!
I thought it might be easier to supply a short clip I am using for testing (43 MB)
This is the m2t file:
https://we.tl/t-i2vzqoQy8a
And this is the Staxrip Template:
https://we.tl/t-ehPbIfe6c1
I am looking for a sample of the MXF source I can upload too and will provide a link then.
stax76
19th January 2021, 16:41
The default configuration would demux and decode it with DgMpgDec, but that don't run because ffms2 is defined as source filter. What you can do is changing the source filter back to automatic or MPEG2Source, or you can remux it to mkv:
Tools > Settings > Preprocessing > ffmpeg remux > Edit > Input File Types > ts m2t
In the next build m2t will be found as audio source file, but this might result in async audio, so I recommend DgMpgDec.
freezer
19th January 2021, 17:09
The default configuration would demux and decode it with DgMpgDec, but that don't run because ffms2 is defined as source filter. What you can do is changing the source filter back to automatic or MPEG2Source, or you can remux it to mkv:
Tools > Settings > Preprocessing > ffmpeg remux > Edit > Input File Types > ts m2t
In the next build m2t will be found as audio source file, but this might result in async audio, so I recommend DgMpgDec.
Many Thanks! Setting the source filter to automatic did the trick.
:-)
creeve4
24th January 2021, 14:00
Since upgrading to 2.1.7 I am getting the following error for all encodes when using VapourSynth:
Script exceeded memory limit. Consider raising cache size.
My encodes will not complete
out of memory: 3087360
How do I increase the memory limit? I have searched and read, but I cannot find an answer.
JKyle
24th January 2021, 17:18
Since upgrading to 2.1.7 I am getting the following error for all encodes when using VapourSynth:
Script exceeded memory limit. Consider raising cache size.
This issue was raised right after the default setting for x265 encoding of vpy was changed from vspipe to direct reading without piping.
See this issue thread (https://github.com/staxrip/staxrip/issues/470).
You can solve this problem in two ways.
1) Select vspipe for Pipe in Input/Output section of x265 Options window.
or
2) get @DJATOM's new x265 build (https://github.com/DJATOM/x265-aMod/releases/tag/3.4%2B65) that is believed to have fixed this memory leak issue, and replace the current one with this new build. You need some more testing in this case.
creeve4
25th January 2021, 02:48
This issue was raised right after the default setting for x265 encoding of vpy was changed from vspipe to direct reading without piping.
See this issue thread (https://github.com/staxrip/staxrip/issues/470).
You can solve this problem in two ways.
1) Select vspipe for Pipe in Input/Output section of x265 Options window.
or
2) get @DJATOM's new x265 build (https://github.com/DJATOM/x265-aMod/releases/tag/3.4%2B65) that is believed to have fixed this memory leak issue, and replace the current one with this new build. You need some more testing in this case.
Thank you so much!
Trench
1st February 2021, 20:17
Thanks all. I've been out of the office the past three weeks, and just now getting back to where I can test this. Note we did also have a Microsoft Patch Tuesday since this was observed, and the machine has automatically restarted to apply those updates since then.
@Trench, is it possible to edit the properties of your C:\Files\Staxrip\ folder and set permissions (full control) to you as user? do mount points allow that ?
Agreed it's wise to check the permissions, given the evidence.
Although the point still remains that with the tools included and/or invoked by Staxrip 2.1.3.0.Stable or 2.1.4.8.Beta against the same source files in the same folder with the same set permissions, the temp area created by Staxrip could be written to successfully.
And also that using "Run as Administrator", for which those default permissions you're referring to grant Full Control to the Administrators group, hadn't avoided the issue either.
The only relevant change I remember is changing the current directory of the staxrip process to the video temp folder, this was not long ago. Before the current folder of the staxrip process was usually the startup folder where staxrip is located. That's something a child process inherits.
Interesting observation that I will keep in mind while continuing to investigate. As you might have noted from the log, the Staxrip program directory in my case is actually outside of the mount point area; in "C:\Users\Trench\StaxRip-x64-2.1.7.0-Stable" instead of "C:\Files\Staxrip". So that kind of current process directory change does seem reasonable to consider.
But today -- as I test this issue which duplicated 100% for files inside of "C:\Files\Staxrip", and for which I had to work around the problem by moving my source files outside of the mount point area -- today the problem no longer occurs.
Since I've been away and not changing anything about the test or the configuration, for the moment I'm assuming Microsoft's Patch Tuesday corrected something here; whether it was also related to process' current directory or not. The patch that applied in my absence was https://support.microsoft.com/help/4598242/, but I do not see any changes with obvious correlation attributed there, other than "unspecified security updates."
Therefore the problem no longer exists at the moment. But should this symptom return, I can pick up with the recommended tests and report back.
Trench
13th February 2021, 10:00
Hmmm. I'm seeing the issue again, but it's starting to be difficult to believe.
After my previous post, I processed dozens of files on February 5 through February 7, using StaxRip 2.1.7.0 Stable, without any issue. Source files inside the mountpoint, StaxRip outside the mount point on the SSD, as intended.
Today I went to process more files, and StaxRip advises 2.1.8.0 stable is available. I download and extract to C:\Users\Trench\StaxRip-x64-2.1.8.0-Stable\, on the SSD and outside of the mount point, same as 2.1.7.0 was located.
Maybe it's worth noting that on February 10 Microsoft applied KB4601319 and KB4601050 for Patch Tuesday, but I'm finding it harder to believe that's actually important.
The very first file I attempt to process with 2.1.8.0 Stable fails, with the same "permission denied" and "error 1" as described before.
And, if I launch 2.1.7.0 Stable instead, it still works fine, using the same source file, in the same folder, with the same permissions that fail with 2.1.8.0.
So before, 2.1.7.0 was the failing version, and older versions of StaxRip worked. Now, 2.1.7.0 is the working version, and 2.1.8.0 is what fails. There is some kind of clue in that, but I don't know what.
I think I just need a priest. Logs of each version attempting to "open single file" the same source file are attached, once the attachments are approved, just in case you can see something I'm missing.
So, @Trench, please check and do the permissions change, or set your paths to locations that you have R/W control on.
In this instance as well, the folder permissions that fail with 2.1.8.0 work just fine as-is with 2.1.7.0. So once again, I would just stipulate that the permissions really aren't blocking successful use of the folder.
But, there is no harm in granting Full Access. Granting Full Access to my user for the folder the source file exists in (and "Replace all child object permission entries...", although the temp file doesn't exist yet) doesn't change the outcome. Still the same permission denied & failure.
See attached screen shot confirming permissions that were set, once the attachment is approved.
The only relevant change I remember is changing the current directory of the staxrip process to the video temp folder, this was not long ago. Before the current folder of the staxrip process was usually the startup folder where staxrip is located. That's something a child process inherits.
The test that came to mind for this was to setup StaxRip 2.1.8.0 Stable to run from a directory that was also inside the mount point, instead of being out on the SSD. In case "the current directory being on a different side of that mount point" was somehow the issue.
But that didn't change the symptoms or the failure either. The same "permission denied" and "error 1" happen even with StaxRip running from inside the mount point.
To rule out whether my shortcuts for launching StaxRip were any part of the problem, I also performed all testing this time by directly launching the StaxRip.exe from the program folder by double-clicking in File Explorer. But that didn't change the outcome either.
I don't suppose there is any hacky switch I can set that reverts back to the "keep StaxRip application folder as the current directory" behavior? Or maybe some other test you can think of that I'm ignoring.
stax76
13th February 2021, 15:47
In 2.1.7.1 Beta there was the following change:
- Revert current folder of process being set to video temp folder because it locks the folder and also because the .NET Framework allows only 260 characters for the working directory of a process.
I just searched the code for Environment.CurrentDirectory, it's not found anywhere, so the current folder staxrip inherits, is never changed.
So you can do the following to find out if that change is the reason for your issue:
1. Options > Misc > Use source file folder for temp files
2. Open terminal and change folder to where your source is
3. Start staxrip from terminal
If that solved it, then we can put it back as a setting, disabled by default.
Trench
13th February 2021, 19:49
Thanks for the info.
Sigh... Symantec antivirus. Or more specifically, Norton Data Protector. MKV and other media files are by default among those it wants to "protect".
The "C:\Files\StaxRip" folder WAS NOT in a directory tree that Norton Data Protector was configured to watch, though. The default folders it watches are just the user profile folders like Documents, Pictures, Videos, Desktop, etc.
But something about Symantec's evaluation of "should I be protecting this .MKV file" was apparently misfiring here, and seemingly "specifically when traversal of a mount point is involved in the path to the .MKV file."
Because as soon as I put the failing 2.1.8.0 Stable StaxRip.exe process on the exclude list for Norton Data Protector, no more failure.
This doesn't directly explain why 2.1.7.0 Stable changed from "failure case" to "success case" from January 2021 to February 2021, because it's not on the process exclude list.
But it was just very suspicious that "2.1.7.0 initially failed back in January, but in February 2.1.7.0 now works, but the newly-downloaded 2.1.8.0 fails." Which is what made me start looking at antivirus possibilities. My best guess is that the passage of time perhaps made Symantec "trust" the process, in ways it didn't trust the newly-downloaded process.
Off to figure out how to report to Symantec.
Oh, and just to confirm, the tests related to current directory did not change the outcome. So "good news" in that regard, that even if it was some other third-party's fault, the change in CWD for processes wasn't a factor in experiencing it. Even though the source file being inside or outside the mount point did affect it.
Magik Mark
14th February 2021, 11:31
Guys,
When converting audio to AAC how do you increase the dialogue (midrage). I plan to use qaac and fdkaac.
I find it annoying ac3 dts atmos and other sound technologies have very subtle dialogue. Increasing the volume would also increase the other channels
Thanks
LoRd_MuldeR
14th February 2021, 15:13
~closed~
Please use this thread:
https://forum.doom9.org/showthread.php?t=172068
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.