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 13th September 2018, 22:23   #6421  |  Link
Morku
Registered User
 
Join Date: Jul 2012
Posts: 147
This worked indeed! Thank you very much. I will keep that option in mind in future. Is there any downside for the parameter?

But when I load the result into MeGUI und encode to aac, it is double the playtime? Maybe related to LSMASH?
https://pastebin.com/33x5Nrbn (I aborted the encoding)

So I encoded with:

D:\Sonstiges\Videotools\MeGUI\tools\ffmpeg\ffmpeg -i German.eac3 -acodec pcm_f32le -f wav - | D:\Sonstiges\Videotools\MeGUI\tools\qaac\qaac --ignorelength --native-resampler=bats,127 -o German.aac

Seems fine
Morku is offline   Reply With Quote
Old 14th September 2018, 01:35   #6422  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,686
Quote:
Originally Posted by Zathor View Post
Let me test that, it should work.
Btw how do you add timestamps/timecodes to mp4 files?
I've no idea.

In case you missed it in the thread I linked to, x264 appears not to accept a timecodes file with a timestamp heading, which is how they seem to be extracted now, at least for a recently muxed MKV.

# timestamp format v2

It needs to be this:

# timecode format v2

Anyway, I suggested he try telling x264 to write an MKV, as it comes with timecodes included, and I assume ffmpeg could remux that as an MP4 with the timecodes intact and therefore without the need to add a separate timecodes file (hopefully). Unfortunately though, he couldn't get that far.

As a side note, I was discussing IVTC in another thread, and I wondered if it'd be relatively simple to give MeGUI some variable frame rate encoding abilities.
ffms2 effectively assumes VFR by default (ignoring repeat field flags) and can be told to output a timecodes file when indexing. No need for 2 passes, so in theory MeGUI, or OneClick, could include instructions for creating a timecodes file in the indexing command line and add it to the x264 command line. For VFR sources such as MKVs or MP4s, that's generally the entire process.

Last edited by hello_hello; 14th September 2018 at 01:40.
hello_hello is offline   Reply With Quote
Old 14th September 2018, 02:47   #6423  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,402
Quote:
Originally Posted by Zathor View Post
Thanks, should I add that for all eac3 extractions where the -core option is not specified?
Seems necesary with EAC3 7.1 with

4: E-AC3, German, 7.1 channels, 896kbps, 48kHz, dialnorm: -28dB

eac3to crash when try remove the dialnorm (by default), with a strange message:

a04 Extracting audio track number 4...
a04 Removing AC3 dialog normalization...
Applying (E-)AC3 delay failed.a04
Aborted at file position 1048576.


Quote:
Btw. you can add the -keepdialdorm option in the HD Streams Extractor as a custom option
Sorry, seems now we need Settings -> Enable Custom Options
And the old +Options column appears, to add the -keepdialdorm

Quote:
Originally Posted by Morku View Post
This worked indeed! Thank you very much. I will keep that option in mind in future. Is there any downside for the parameter?
Not big, if you want recode after the eac3 use:

...ffmpeg -drc_scale 0 -i German.eac3 ...

Quote:
But when I load the result into MeGUI und encode to aac, it is double the playtime? Maybe related to LSMASH?
I don't see playtimes info in the log, btw in the log MediaInfo and LWLibavAudioSource() show only 6 channels seems is only the EAC3 core.

Use always ffmpeg to decode EAC3 7.1
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 14th September 2018, 11:49   #6424  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,605
Zathor – from which development stage of the available encoders (aomenc / rav1e) onwards would you consider supporting AV1 encoding in MeGUI? CLI option set stability and user-friendly encoding speed will probably both be important factors?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 14th September 2018, 18:19   #6425  |  Link
Morku
Registered User
 
Join Date: Jul 2012
Posts: 147
@tebasuna51

thank you for the tip. What is the standardsetting for drc_scale and why ffmpeg touch the range when it's not defined by myself? Should I choose this option for any AC3 source or only which are extracted with dialnorm?
Personally, I always want keep the properties of the audio, just compress.

Anyway, for the reference when I encode with MeGUI:
Input file:
Code:
Format                      : E-AC-3
Format/Info                 : Enhanced AC-3
Commercial name             : Dolby Digital Plus
Format profile              : Blu-ray Disc
Duration                    : 2 h 31 min
Bit rate mode               : Constant
Bit rate                    : 896 kb/s
Channel(s)                  : 8 channels
Channel layout              : L R C LFE Ls Rs Lb Rb
Sampling rate               : 48.0 kHz
Frame rate                  : 31.250 FPS (1536 SPF)
Compression mode            : Lossy
Stream size                 : 973 MiB (100%)
Service kind                : Complete Main
Result:
Code:
Format                      : AAC LC
Format/Info                 : Advanced Audio Codec Low Complexity
Codec ID                    : mp4a-40-2
Duration                    : 5 h 3 min
Bit rate mode               : Variable
Bit rate                    : 441 kb/s
Maximum bit rate            : 600 kb/s
Channel(s)                  : 6 channels
Channel layout              : C L R Ls Rs LFE
Sampling rate               : 48.0 kHz
Frame rate                  : 46.875 FPS (1024 SPF)
Compression mode            : Lossy
Stream size                 : 958 MiB (100%)
Log: https://pastebin.com/JMQ2FjCa

= doubled the length.
Morku is offline   Reply With Quote
Old 14th September 2018, 18:38   #6426  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,331
Quote:
Originally Posted by hello_hello View Post
In case you missed it in the thread I linked to, x264 appears not to accept a timecodes file with a timestamp heading, which is how they seem to be extracted now, at least for a recently muxed MKV.

# timestamp format v2

It needs to be this:

# timecode format v2
That is correct, based on the source it has to be timecode for x264:
https://github.com/mstorsjo/x264/blo...put/timecode.c

I wonder what it does at all:
Code:
      --tcfile-in <string>    Force timestamp generation with timecode file
I tested it with x64 when the file is named in the required way and it does encode without issues.

Quote:
Originally Posted by hello_hello View Post
As a side note, I was discussing IVTC in another thread, and I wondered if it'd be relatively simple to give MeGUI some variable frame rate encoding abilities.
ffms2 effectively assumes VFR by default (ignoring repeat field flags) and can be told to output a timecodes file when indexing. No need for 2 passes, so in theory MeGUI, or OneClick, could include instructions for creating a timecodes file in the indexing command line and add it to the x264 command line. For VFR sources such as MKVs or MP4s, that's generally the entire process.
I do have it implemented now for mkv source and mkv target - and I will only support it for the moment with OneClick.
To add it to x264 seems to be not necessary. I just extract it with mkvextract and mux it lateron with mkvmerge.
EDIT: found a way also for mp4

Last edited by Zathor; 14th September 2018 at 20:26.
Zathor is offline   Reply With Quote
Old 14th September 2018, 19:00   #6427  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 112
One-Click Output File Selection

With the One-Click encoder, single files can be directed to a chosen output folder. However, when a folder input (for batch jobs) is selected, the output field does not function correctly. A desired location can not be chosen for the batch jobs. The entire output of the batch process is placed in the source folder (or whatever folder is set as default output for all MeGUI jobs).
Danette is offline   Reply With Quote
Old 14th September 2018, 19:04   #6428  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,331
Quote:
Originally Posted by Danette View Post
With the One-Click encoder, single files can be directed to a chosen output folder. However, when a folder input (for batch jobs) is selected, the output field does not function correctly. A desired location can not be chosen for the batch jobs. The entire output of the batch process is placed in the source folder (or whatever folder is set as default output for all MeGUI jobs).
All settings for a batch job have to be specified in the OneClick profile. Please set therefore in the profile in "other" your desired output path.
Zathor is offline   Reply With Quote
Old 14th September 2018, 20:04   #6429  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,402
Quote:
Originally Posted by Morku View Post
What is the standardsetting for drc_scale and why ffmpeg touch the range when it's not defined by myself? Should I choose this option for any AC3 source or only which are extracted with dialnorm?
The standard is respect the drc included in the Dolby stream, if exist the volume can be reduced assuming the Dialog Normalization.
With drc_scale 0 the volume is decoded without reduction.

To be sure is recommended use always drc_scale 0.

Quote:
Personally, I always want keep the properties of the audio, just compress.
But compress with other not Dolby codec can't preserve Dialog Normalization or Dynamic Range Compression.

If DN or DRC is applied when decode you can't recover the original audio volume. DN/DRC is intended to use at play time with the user control, is not recommended when recode.

Quote:
Anyway, for the reference when I encode with MeGUI:
Well, seems than MediaInfo 18.05 can't recognize the 8 EAC3 channels, only the 6 core channels:

Quote:
File: D:\tmp\00925.m2ts_4eng.eac3
...
Channels: 6
18.08 seems work fine with the same sample:

Quote:
Complete name : D:\tmp\00925.m2ts_4eng.eac3
...
Channel(s) : 8
The decoders LWLibavAudioSource or FFAudioSource seems don't work with EAC3 7.1 only output 6 channels with double length.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 15th September 2018, 01:52   #6430  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,686
Quote:
Originally Posted by Zathor View Post
I wonder what it does at all:
Code:
      --tcfile-in <string>    Force timestamp generation with timecode file
I'm not sure I understand the question.

Quote:
Originally Posted by Zathor View Post
I do have it implemented now for mkv source and mkv target - and I will only support it for the moment with OneClick.
To add it to x264 seems to be not necessary. I just extract it with mkvextract and mux it lateron with mkvmerge.
EDIT: found a way also for mp4
Technically, at least, I think giving x264 the timecodes should have a positive effect on quality compared to just muxing them later, due to x264 being frame rate aware.

A quick test encoding 1000 frames at 30fps and again at 24fps.
I think the maths is correct.

30 fps, 1961.73 kb/s, 65384 kb, 8.1 MB
24 fps, 1812.14 kb/s, 75493 kb, 9.4 MB

You'd expect the bitrates to be different as the durations aren't the same, but the total number of bits used to encode the same 1000 frames increased when the frame rate decreased. Or am I looking at it all wrong?

I'm pretty sure ffms2 and Lsmash output the average frame rate, so at least x264 knows the correct duration, and the bitrate in the log file will be correct, so that's probably the next best thing to encoding with the timecodes.

There's also a need to create a timebase for VFR encoding and x264 seems pretty good at it. I don't understand how the timebase works exactly but it can make a difference to playback.

As an example, I encoded some NTSC DVDs recently after deblending the film sections back to 25fps and deinterlacing the video, so they were combinations of 25fps and 59.94fps (I manually created the timecodes file). Maybe it's more luck than design, but the timebase x264 decides on causes MPC-HC to behave as though the encoded video is a constant 25fps to a cerain extent, even though the frames display for the correct durations. Reclock does the same. When decoding with ffdshow and enabling it's on-screen display, ffshow gives each frame in the PAL sections a unique number, but for the video sections it repeats the frame numbers in a 3:2-like pattern so it's only incrementing frame numbers at a rate of 25fps. When I play the encoded video and Reclock adjusts the playback speed, it's constant from start to finish.

None of that happened when I tried specifying a timebase. Even for combinations of 23.976fps and 59.94fps I think it resulted in playback oddness and x264 knew best.

When you specify a timecodes file and an MKV as the output format, you can play the output file without remuxing it and the audio will be in sync.

I know people encode and mux the timecodes later all the time and the world keeps turning, but you asked

Last edited by hello_hello; 15th September 2018 at 02:01.
hello_hello is offline   Reply With Quote
Old 15th September 2018, 15:14   #6431  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,331
Code:
2877 [OneClick]             added support for VFR input files (requires mkv/mp4 output)
     [FFMS Indexer]         added support for VFR input files
     [MKV Muxer]            added detection of timestamp files (must be in the format "videoinputfilename".timestamp.txt)
     [MP4 Muxer]            added mp4fpsmod tool to mux timecodes into mp4 files
     [x264]                 added support for --tc-in
Zathor is offline   Reply With Quote
Old 15th September 2018, 18:14   #6432  |  Link
ravewulf
Registered User
 
Join Date: Dec 2010
Posts: 14
Quote:
Originally Posted by Zathor View Post
Code:
2877 [OneClick]             added support for VFR input files (requires mkv/mp4 output)
     [FFMS Indexer]         added support for VFR input files
     [MKV Muxer]            added detection of timestamp files (must be in the format "videoinputfilename".timestamp.txt)
     [MP4 Muxer]            added mp4fpsmod tool to mux timecodes into mp4 files
     [x264]                 added support for --tc-in
Can I ask how the x264 --tc-in support is implemented? In my own encoding I've needed to use x264's built in mp4 muxer to have the timecodes carry over but I see you've also added in mp4fpsmod.
ravewulf is offline   Reply With Quote
Old 15th September 2018, 18:19   #6433  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,331
It does only work if you use OneClick (yet - I may add a manual selection option of a timestamp file to x264 and mkv/mp4 muxer at a later point in time).

It works in the way that OneClick will mux the source to MKV (if possible), extracts the timecodes, does the video processing (if encoding with x264 it will check if the header of the timestamp file is correct and change it if necessary - then it uses the new file as --tc-in) and muxes it as mkv (timestamps are directly used) or as mp4 (without timestamps first, then mp4fpsmod will be used to patch them into the file).
Zathor is offline   Reply With Quote
Old 15th September 2018, 19:33   #6434  |  Link
Zetti
Registered User
 
Join Date: Dec 2015
Location: Denmark
Posts: 126
2 x264 r2932 builds is released.

1 from here: http://msystem.waw.pl/x265/
And 1 from LigH from here: https://www.mediafire.com/?bxvu1vvld31k1

x265 version 2.8+58 LigH from here:
https://www.mediafire.com/?6lfp2jlygogwa

x265 version 2.8+68 is released.
http://msystem.waw.pl/x265/
Zetti is offline   Reply With Quote
Old 15th September 2018, 19:57   #6435  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,331
Thanks, Zetti. For x265 I usually use these "stable" builds. Are these the ones?

x264 - I do wonder what is the reason that x264.nl does not update their binaries? Any issues with that version?
Zathor is offline   Reply With Quote
Old 15th September 2018, 20:14   #6436  |  Link
Zetti
Registered User
 
Join Date: Dec 2015
Location: Denmark
Posts: 126
I have no knowledge about stable or not stable x265 builds.

I can't find any info about why videolan not release new vanilla x264 builds.
Zetti is offline   Reply With Quote
Old 15th September 2018, 23:27   #6437  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,605
MeGUI usually provides only the x265 versions of a "merge with the stable branch" right after applying the milestone tag. From then on, merges with the stable branch only happen occasionally.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 16th September 2018, 15:49   #6438  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 112
Quote:
Originally Posted by Zathor View Post
All settings for a batch job have to be specified in the OneClick profile. Please set therefore in the profile in "other" your desired output path.
Yes, that's true, but then the output location is permanent unless changed, i.e.; it then becomes the default location. That's the idea behind the request for the improved feature:

On the first screen that appears when the One-Click encoder is opened, at the bottom of the screen, allow the "Output file" to work with batch jobs as it now does with single jobs. This is the place where temporary (one time only) output locations are chosen that override the default output paths that are set.

Additionally, while you are considering improved features, on that same initial One-Click screen, if the "close after" box is unchecked by the user, have it stay unchecked unless the user decides otherwise. As it is now, if you uncheck it and close the One-Click, when the One-Click is re-opened the check is automatically there again.
Danette is offline   Reply With Quote
Old 17th September 2018, 21:37   #6439  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,331
I assume most of the users never have created a second worker. And only a minor subset of those with more than one worker have assigned jobs manually to dedicated workers. In any case... this will change

It will not be possible anymore to
- rename workers
- manually create persistent workers
- assign jobs to workers
- see the owner of a job in the job queue
- see an individual worker status

But you will get this:
- by default 2 workers are active (can be changed from 1 to 99 - not sure if anything above a handfull is needed)
- workers will fetch jobs automatically based on rules

These rules specifiy how many of which job types can run in parallel. By default (can be changed):
- 1 audio job in parallel
- 1 audio/demuxer/indexer/muxer job in total in parallel (so the in most cases HD I/O causing ones)
- 1 oneclick job in parallel
- 1 video job in parallel

That way you can have multiple workers with multiple jobs running without them blocking each other (CPU, I/O, ...).

If you want to test I would be happy if you try out this one here and provide your feedback:
MeGUI Test 2878
Zathor is offline   Reply With Quote
Old 17th September 2018, 22:00   #6440  |  Link
Morku
Registered User
 
Join Date: Jul 2012
Posts: 147
You should revert DGIndexNV to 27th august version, the old issue recovered with the current build that loading a mpls file, containing multiple m2ts result into error. With Build 158 there is no issue.
Morku is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 04:51.


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