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

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

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd September 2019, 07:43   #8901  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
No, the intention of I/P and P/B ratios is: You can configure the encoder in a way that it uses finer quantization for frames which are used a lot as a reference (the quality of many other frames depends on its precision – thus, mainly I frames) and coarser quantization for frames which only depend on other frames but are not referenced by others (their lack of precision is not inherited and not visible for a long time – thus, mainly B frames). Many people already spent a lot of time in testing which ratios produce a good compromise between efficient encoding and good quality retention. I/P and P/B quantizer ratios don't have to be equal, they may be both small (only little more than 1.0) or both larger or selected independently ... the encoder has its defaults, which may depend on selected presets and tunings, and you can still override them manually. But both are settings to prepare the encoder, not results telling much about the quality of the encoded video.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 25th September 2019, 07:25   #8902  |  Link
Lord Dredd
a Hobby Encoder :)
 
Join Date: Feb 2016
Posts: 28
Quote:
Originally Posted by jlw_4049 View Post
I'm not sure what you are asking. Make your files direct playable if you have the bandwidth and it wont be a problem!

Sent from my SM-G965U1 using Tapatalk
Juast to speed up things i added --threads 96 to the command line of x264 , but its not encoding at all now
it says unrecognized ..
had to remove threads from it.

also even if cpu is more than 75% free and memory usage in the RDP is around 60 and obviously there is disk usage too , my encoder becomes slow , very slow.

I was under the impression that using megui , x264 is a CPU dependent job but ....
Lord Dredd is offline   Reply With Quote
Old 25th September 2019, 13:11   #8903  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 391
Quote:
Originally Posted by Lord Dredd View Post
Juast to speed up things i added --threads 96 to the command line of x264 , but its not encoding at all now

it says unrecognized ..

had to remove threads from it.



also even if cpu is more than 75% free and memory usage in the RDP is around 60 and obviously there is disk usage too , my encoder becomes slow , very slow.



I was under the impression that using megui , x264 is a CPU dependent job but ....
Threads should be left alone. It will automatically use all your threads/cpu.

Memory depends on resolution etc. That doesn't matter.

If you are indexing or encoding audio it wont use your entire CPU. When its actually encoding x264 it will.

Sent from my SM-G965U1 using Tapatalk
jlw_4049 is offline   Reply With Quote
Old 26th September 2019, 07:20   #8904  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
If you manually "tune" for 96 threads, then there is no surprise it goes all slow. There are dependencies between parts of the encoding algorithm. Most threads will have to wait until one thread finished its task, because they need its intermediate results to continue.

Furthermore, the more threads you enable, the smaller is the scope of each thread, and the less efficient is the search for similarities to spare bitrate. That will limit the quality.

The x264 encoder has a pretty smart default strategy. Only change that if you are as smart as all of its developers and contributors...

And the most probable reason for limited CPU utilization are video filters in AviSynth, before the encoder, which may be even less parallelizable (or the AviSynth script does not use multi-threading at all).
__________________

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

Last edited by LigH; 26th September 2019 at 07:23.
LigH is offline   Reply With Quote
Old 26th September 2019, 17:47   #8905  |  Link
Lord Dredd
a Hobby Encoder :)
 
Join Date: Feb 2016
Posts: 28
Quote:
Originally Posted by jlw_4049 View Post
Threads should be left alone. It will automatically use all your threads/cpu.

Memory depends on resolution etc. That doesn't matter.

If you are indexing or encoding audio it wont use your entire CPU. When its actually encoding x264 it will.

Sent from my SM-G965U1 using Tapatalk
Thanks mate

Quote:
Originally Posted by LigH View Post
If you manually "tune" for 96 threads, then there is no surprise it goes all slow. There are dependencies between parts of the encoding algorithm. Most threads will have to wait until one thread finished its task, because they need its intermediate results to continue.

Furthermore, the more threads you enable, the smaller is the scope of each thread, and the less efficient is the search for similarities to spare bitrate. That will limit the quality.

The x264 encoder has a pretty smart default strategy. Only change that if you are as smart as all of its developers and contributors...

And the most probable reason for limited CPU utilization are video filters in AviSynth, before the encoder, which may be even less parallelizable (or the AviSynth script does not use multi-threading at all).
Thanks for the clarification
this is one of the usual scripts that i use
hardcoded sub was added only to this one , but it might not have played any part
Quote:
LoadPlugin("C:\Users\Neil\Desktop\MEGUI\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("F:\files\TESTmkv\whts.ur.vu.mkv")
#deinterlace
#crop
#resize
#denoise

Last edited by Lord Dredd; 4th October 2019 at 09:33.
Lord Dredd is offline   Reply With Quote
Old 30th September 2019, 11:37   #8906  |  Link
Lord Dredd
a Hobby Encoder :)
 
Join Date: Feb 2016
Posts: 28
anyone ??
Lord Dredd is offline   Reply With Quote
Old 30th September 2019, 14:03   #8907  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by Lord Dredd View Post
anyone ??
Is there a question there ?

this is what your script produces at frame 500


Suibtitle in bottom right hand side.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 1st October 2019, 07:21   #8908  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Well, this script doesn't contain any CPU intense filters. So the AviSynth filtering may not be the bottleneck. I guess his question remains why he feels the CPU not utilized perfectly.

When x264 doesn't use the majority of available CPU time, it's usually a sign that it waits for the video to be delivered. That may start by reading the source from the media ...
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 3rd October 2019, 05:30   #8909  |  Link
imsrk48
Registered User
 
imsrk48's Avatar
 
Join Date: Nov 2017
Posts: 154
Sir Why MeGUI Not Capturing the Total Time of Process from Starting to Running.

I Have Checked in My Log File There is MeGUI Capture only starting time but not capturing total time taking in running process

i want to submit a log file for show how much time MeGUI taking in a audio encoding. that is Running Continues in processing process even after 20-40+ minutes
imsrk48 is offline   Reply With Quote
Old 4th October 2019, 09:30   #8910  |  Link
Lord Dredd
a Hobby Encoder :)
 
Join Date: Feb 2016
Posts: 28
Quote:
Originally Posted by LigH View Post
Well, this script doesn't contain any CPU intense filters. So the AviSynth filtering may not be the bottleneck. I guess his question remains why he feels the CPU not utilized perfectly.

When x264 doesn't use the majority of available CPU time, it's usually a sign that it waits for the video to be delivered. That may start by reading the source from the media ...
Thanks LigH
You are right seems like high amount of reading and writing on the disk even if they are RAID ( 1 or 2) isnt letting things peak, thats the only thing i could deduce considering enough ram is available.
So after so many years of using MEGUI , i am onto handbrake and viola no slow encoding issues with it , wonder why that is ???
Been trying to get all my profile settings to it but there are a few I am unable to figure out

How can i hard code a custom subtitle file something like adding a small text which displays for a few frames
secondly is there any major difference in the way handbrake processes a video and megui does ???
I mean both are x264 or x265 based but ids there any specific drawback of using handbrake.

Personally i love megui but this speed cap has forced me to look for other applications
Thanks
Lord Dredd is offline   Reply With Quote
Old 4th October 2019, 12:42   #8911  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Lord Dredd View Post
...
So after so many years of using MEGUI , i am onto handbrake and viola no slow encoding issues with it , wonder why that is ???
Sorry but I can't confirm that.

The same mkv source, crop and resize:
Quote:
[12:19:01] * video track
[12:19:01] + decoder: h264
[12:19:01] + frame rate: 23.976 fps -> constant 23.976 fps
[12:19:01] + Crop and Scale (width=1280:height=640:crop-top=60:crop-bottom=60:crop-left=0:crop-right=0)
[12:19:01] + source: 1920 * 1080, crop (60/60/0/0): 1920 * 960, scale: 1280 * 640
The same x264 parameters:
Quote:
Opciones de codificación : cabac=1 / ref=2 / deblock=1:0:0
/ analyse=0x1:0x111 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00
/ mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0
/ deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=18
/ lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0
/ bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1
/ b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=240
/ keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=crf
/ mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4
/ vbv_maxrate=20000 / vbv_bufsize=25000 / crf_max=0.0 / nal_hrd=none
/ filler=0 / ip_ratio=1.40 / aq=1:1.00
The last HandBrake version:
Quote:
[12:19:01] encx264: encoding at constant RF 19.000000
...
[12:27:56] Finished work at: Fri Oct 04 12:27:56 2019 -> 8:55 elapsed time
With MeGUI:
Quote:
[04/10/2019 13:06:03] Job command line: "C:\Portable\MeGUI64\tools\x264\x264.exe" --profile main ...
...
--[Information] [04/10/2019 13:12:15] Job completed -> 6:12 elapsed time
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 4th October 2019, 17:28   #8912  |  Link
Lord Dredd
a Hobby Encoder :)
 
Join Date: Feb 2016
Posts: 28
Quote:
Originally Posted by tebasuna51 View Post
Sorry but I can't confirm that.

The same mkv source, crop and resize:


The same x264 parameters:


The last HandBrake version:


With MeGUI:
You are correct and i can confirm in normal environment megui is definitely more efficient

Actually my issue has been a bit different ( as i mentioned a few posts before )
I am one of the users in an offshore RDP with intel xeon processor and 64gigs of ram , with like 6 or 7 users
all doing their video encoding , editing or god knows what else.
As soon as disk read write increases megui encoding goes down like anything and becomes less than 1/4th of the original speed.

I would say this has to be looked into ( i am no specialist so apologies beforehand if i sound like a big mouth )
But have been using megui in various environments and can say disk usage affects adversely, i didnt mind this thing before as i used to think may be its how the source is or may be someone else is sucking the resources. But this feels pretty bad and awkward when a sort of untidy still in initial stages of development app like handbrake beats it in similar that sort of environment

I am still trsting this may be there are other variables involved as well..


Please enlighten me a bit more dear GURUS , i can safely say i have a lot to learn from guys like Zathor , Ligh , dark shikari and others
Lord Dredd is offline   Reply With Quote
Old 5th October 2019, 14:30   #8913  |  Link
imsrk48
Registered User
 
imsrk48's Avatar
 
Join Date: Nov 2017
Posts: 154
How to Encode a Video (2m45 seconds) with External Audio (3m 23 seconds) using MeGUI to Encode Audio According to Video Duration?
imsrk48 is offline   Reply With Quote
Old 7th October 2019, 07:28   #8914  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Depends on how you want to make the audio fit (some kind of speed-up or just a cut). Either way, I don't expect a solution without manually editing the AviSynth script which delivers the audio to the audio encoder used in MeGUI.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 7th October 2019, 09:02   #8915  |  Link
imsrk48
Registered User
 
imsrk48's Avatar
 
Join Date: Nov 2017
Posts: 154
Quote:
Originally Posted by LigH View Post
Depends on how you want to make the audio fit (some kind of speed-up or just a cut). Either way, I don't expect a solution without manually editing the AviSynth script which delivers the audio to the audio encoder used in MeGUI.
Okay Sir Thanks for Your Valuable Reply and Solution.
imsrk48 is offline   Reply With Quote
Old 30th October 2019, 16:20   #8916  |  Link
bartonnen
Registered User
 
Join Date: Nov 2014
Posts: 15
I've been regularly using MeGUI to re-encode x264 TV episodes to x265 (to save space) - I'm using the One-Click encoder with various video presets that I've defined, but I like to keep the original audio, so I have audio encode set to "never".

But, whenever the original file has an audio delay, it gets lost when the new hevc video track gets muxed with the original audio track.

Is there some setting I've forgotten to set which would cause the audio delay to be copied over during the mux?
bartonnen is offline   Reply With Quote
Old 4th November 2019, 19:31   #8917  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Audio jobs not auto-loading plugins.

Is this going to be an XP thing? Or maybe an Avisynth+ thing?

The problem only occurs when using MeGUI's portable Avisynth+, not when using the installed Avisyth 2.6.
When trying to encode audio via a script, the script loads into the audio section without error. It's added to the job queue without complaint. When I try to run the job, MeGUI complains about missing functions.
After a bit of experimenting I'm sure the problem must be that MeGUI isn't auto-loading plugins from the installed Avisynth plugins folder when running audio jobs. Using LoadPlugin() in the script to load the plugins manually cures the problem and the audio jobs run. Why it's auto-loading plugins when the script is added to the audio section but not when the audio job is actually run, I have no idea. Video jobs run as they should.

Here's the relevant section from the log file. As you can see, the audio is detected correctly when the script is checked, but when the job is run, MeGUI says there's no such function as FFMS2. After fixing that by using LoadPlugin to load FFMS2, MeGUI then complains about the next function not existing, and so on....

The script used below opens both video and audio, but the same applies to audio-only scripts.

Cheers.

Quote:
---[Information] File: E:\test.avs
---[Information] AVS input file detected. Getting media information from AviSynth.
---[Information] General
----[Information] Format: AVS
----[Information] FormatString: AviSynth Script
----[Information] FileSize: 166
----[Information] PlayTime: 00:21:38.1300000
---[Information] Video
----[Information] ID: 0
----[Information] CodecID: AVS Video
----[Information] CodecIDString: AVS
----[Information] Format: AVS
----[Information] Width: 1920
----[Information] Height: 1080
----[Information] FrameCount: 31124
----[Information] FrameRate: 23.976023976024
----[Information] ScanType: Progressive
----[Information] AspectRatio: 16:9
----[Information] Delay: 0
---[Information] Audio
----[Information] ID: 0
----[Information] Format: AVS
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48000
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] BitRateMode: CBR
----[Information] Delay: 0
----[Information] [05/11/19 4:55:47 AM] The language information is not available for this track. The default MeGUI language has been selected.
--[Error] [05/11/19 4:55:48 AM] An error occurred
---[NoImage] Script error: There is no function named 'FFMS2'.
---[NoImage] (E:\test.avs, line 2)
--[Information] [05/11/19 4:55:48 AM] Job completed

Last edited by hello_hello; 4th November 2019 at 20:01.
hello_hello is offline   Reply With Quote
Old 5th November 2019, 10:15   #8918  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
The plugin file is named FFMS2.dll (and the additional import script FFMS2.avsi); but the provided primary functions to be used in your script are e.g. FFVideoSource or FFAudioSource. Manual is here.

The set of provided functions may have changed during the development, e.g. there used to be a function FFmpegSource2 delivering an AudioDub result of video and audio together, first in the additional import script, now in the DLL.

Quote:
Note: the shorter FFMS2 alias was added in 2.22
So check if you have a recent version.

...

Wait. I misunderstood. Reading again, it sounds like different steps of the script processing in MeGUI use different autoload directories, and thus different plugin versions...
__________________

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

Last edited by LigH; 5th November 2019 at 10:29.
LigH is offline   Reply With Quote
Old 5th November 2019, 13:52   #8919  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by LigH View Post
Wait. I misunderstood. Reading again, it sounds like different steps of the script processing in MeGUI use different autoload directories, and thus different plugin versions...
Yeah, that seems to be similar to what's happening, but my understanding is it's Avisynth that does the auto-loading, even the portable Avisynth, not MeGUI as such, so it's a bit odd.

The only explanation I can think of, and admittedly I don't have a clue, is the portable Avisynth has dependencies in order to run, or MeGUI has dependencies in order to use it, and under this one particular circumstance those dependencies aren't found, causing the plugins in the installed Avisynth's auto-loading folder to fail to load, or something.....

Every now and then, the same problem happens to MeGUI as a whole, and it suddenly won't load any scripts requiring auto-loading plugins. Each time it's happened though, restarting MeGUI has fixed the problem. The only time it's really annoying is when MeGUI is left to run a long queue of jobs, and at some point the jobs in the queue stop encoding and result in error messages instead. It doesn't happen often though.

I'd have a laptop with Win7 on it I could use to check to see if it's just an XP problem, but I stupidly ran Windows Update after installing the OS a few weeks ago, and it went into an update loop and now refuses to boot. I'll probably start fresh tonight or tomorrow so hopefully I'll be able to test MeGUI on Win7 soon.

Last edited by hello_hello; 5th November 2019 at 14:10.
hello_hello is offline   Reply With Quote
Old 9th November 2019, 23:43   #8920  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by hello_hello View Post
Is this going to be an XP thing? Or maybe an Avisynth+ thing?

The problem only occurs when using MeGUI's portable Avisynth+, not when using the installed Avisyth 2.6.
When trying to encode audio via a script, the script loads into the audio section without error. It's added to the job queue without complaint. When I try to run the job, MeGUI complains about missing functions.
After a bit of experimenting I'm sure the problem must be that MeGUI isn't auto-loading plugins from the installed Avisynth plugins folder when running audio jobs. Using LoadPlugin() in the script to load the plugins manually cures the problem and the audio jobs run. Why it's auto-loading plugins when the script is added to the audio section but not when the audio job is actually run, I have no idea. Video jobs run as they should.

Here's the relevant section from the log file. As you can see, the audio is detected correctly when the script is checked, but when the job is run, MeGUI says there's no such function as FFMS2. After fixing that by using LoadPlugin to load FFMS2, MeGUI then complains about the next function not existing, and so on....
I've confirmed this isn't just an XP problem. The same thing happens when running MeGUI on Win7.
For the record, I installed Avisynth+ on Win7 and once again audio encoding using the installed Avisynth is fine.
hello_hello is offline   Reply With Quote
Reply

Tags
megui

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 17:48.


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