Log in

View Full Version : Hybrid: Input -> x264/x265/Xvid/VP8/VP9


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 [42] 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78

digitall.h
4th March 2014, 00:25
Selur, I'm sorry, I go on...
I repeated the creation of the encoding job with ffmpeg forced as decoder.
And took a look to Debug level 1.
I first see:
DO CHECKS

...

Checking video settings,..
enforceFFmpeg: false
I would expect here enforceFFmpeg: true, but I may be looking at the wrong side.
Later Debug shows:
get decoder name....
avisynth: false
deinterlaceWithDecoder: false
Needs mencoder for .mpls input since ffmpeg is not compiled with libbluray suport,..
needsMencoder: true
needsFFmpeg: false
mplayer title:
mplayer was build with libbluray: true
mplayerCanBeUsedForBluray: false
videoInput: /home/ximo/Torrents/La isla/BDMV/PLAYLIST/00000.mpls
blurayInput: false
mencoderSetCutSelection,..
chapterUsed: false
cutting: false
cut: false
usesChapters: false
tsMuxeR compatible input: true
ffmpegWithLibBluray: false
-> preferFFmpeg: true
Decision time!
needsFFmpeg: false
needsMencoder: true
preferFFmpeg: true
x264 && useInternalDecode: false
-> chosen decoder: mencoder

I suppose that's the clue. If I understand Debug well, even if I choose ffmpeg, Hybrid selects mencoder because ffmpeg was not compiled with libbluray support, isn't it?
Can this be solved recompiling ffmpeg with libbluray support?.
Can the libbluray version be related with the artefacts I see in this movie?
:)

digitall.h
4th March 2014, 00:47
I'm getting closer :D

I managed to play the 'problematic' original Blu-ray with avplay (player of ffmpeg), and it does not show artefacts in the scene mplayer keeps playing with artefacts.

So with latest versions from mplayer and ffmpeg, the latter manages to play it well while the former cannot.
:)

Selur
4th March 2014, 01:10
an this be solved recompiling ffmpeg with libbluray support?.
yup, since ffmpeg can't handle with mpls files which link to multiple m2ts files without libbluray.
(if ffmpeg has libbluray support and 'Prefer ffmpeg as decoder' Hybrid would use ffmpeg to decode the mpls input.

Can the libbluray version be related with the artefacts I see in this movie?
doubt it, it's more likely related to the libav version.

I managed to play the 'problematic' original Blu-ray with avplay (player of ffmpeg),...
you are not using ffmpeg, you are using avconv.
ffmpegs player is ffplay. :)

digitall.h
4th March 2014, 01:41
Of course, you're right :o :rolleyes:

But then...
With mplayer, from inside Hybrid and in terminal, it shows artefacts.
With avplay (avconv) it plays well.
With ffplay (ffmpeg) it plays well...

If you think libbluray version is not critical I will try to re-compile ffmpeg with libbluray support.
Version installed in my system is 0.2.3
Latest version from VideoLAN is 0.5.0


What about differences in mencoder versions?.

Selur
4th March 2014, 06:43
mencoder is often compiled with ffmpeg in it, so depending on what versions mencoder is linked against it can make a lot of differences.

digitall.h
4th March 2014, 19:37
I'm sorry I explained it bad.

I'm referring to the question I posted.
When I run in terminal:
digitall.h ~ $ which mencoder
/usr/local/bin/mencoder


If I then run:
digitall.h ~ $ MEncoder SVN-r36970-4.6 (C) 2000-2014 MPlayer Team
No file given

Exiting... (error parsing command line)

But in Hybrid, in Config > Tools versions, it shows:

Known tool versions:
MediaInfo -> 0.7.61
x264 -> 2389
flaccl -> 1.2.1
mkvmerge -> 6.7.0
mplayer -> 36970-4.6
FrameCounter ->
tsMuxeR -> 2.6.11
neroAacEnc -> 1.5.4.0
oggenc -> 1.4.0
aften ->
delaycut -> 1.437
MP4Box -> 0.4.6-DEV-rev
mkvextract -> 6.7.0
lsdvd -> 0.16
ffmpeg -> 2.2.git
mencoder -> 34707-4.6
bdsup2sub++ -> 5.11
lame -> 3.99.3
sox -> 14.3.2
I don't know what is going wrong, but the versions are not the same. :confused:

Selur
4th March 2014, 19:45
Create a debug output by:
1. setting a default output path (Config->Path->Default output path)
2. enabling Config->Internals->DebugOutput at Level 9
3. saving the defaults (Config->Defaults->Save->Save all)
4. closing Hybrid and deleting the existing HybridDebugOutput.txt inside the default output path you specified
5. start up Hybrid send me the debugOutput

digitall.h
4th March 2014, 21:32
Selur, I may try as you advised, but let me tell you first something I discovered.

As I told you which points to mencoder in /usr/local/bin, and when I run it in terminal it shows version -r36970

But I ran locate mencoder in terminal, and found out I have 2 versions, the one that which pointed me at in /usr/local/bin, but a second one in /usr/bin.
:scared:

And if I run in terminal /usr/bin/mencoder, it shows version -r34707
:angry:

So I made Hybrid point mencoder tool to /usr/local/bin and now shows correct version
:D ;)
:stupid:

digitall.h
4th March 2014, 21:41
This is probably not the correct place to ask this, please point me to the right place in case.

I'm trying to compile x264 with libav and/or ffms support.
I don't know if it's needed in Hybrid to work with ffmpeg and x264 (I think not because ffmpeg outputs raw that x264 can read).
But I would like to compile x264 with this support to work with vapoursynth.
I have been searching the web for the right commands but I didn't find them. Do you know how can it be done?.

Going on with compilation, I managed to compile ffmpeg with libbluray support and now Hybrid creates a job with ffmpeg as decoder (as you said ;)). But I used the libbluray version in my system 0.2.3, and I would like to use a more recent version (now 0.5.0).
When I try to compile 0.5.0 it exits with error:
No package 'libxml-2.0' found
I read a post of yours where you had this same problem when trying to compile libbluray, but did not find the solution. Can you point me to it?.

:)

Selur
4th March 2014, 21:48
regarding x264&vapoursynth: no special flaks are needed, straight builds from the git should support it.

I read a post of yours where you had this same problem when trying to compile libbluray, but did not find the solution. Can you point me to it?.
don't really remember how I fixed that on linux (don't really need libbluray on linux), but I gave up to fix it on Mac
Looking at the script used in https://github.com/jb-alvarado/media-autobuild_suite might help. (I know it's a script ment for MinGW, but as far as I remember the general way should work)

digitall.h
5th March 2014, 00:31
I managed to compile libbluray 0.5.0

Thanx

I will try later x264

:)

The jb-alvarado script does not contain support to add ffms or libav to x264

digitall.h
5th March 2014, 09:29
I don't know if this is supposed to happen, but with the same film Hybrid encodes x264 @ 2.36 fps when with mencoder it was encoding @ 3.8 fps...
:(

Selur
5th March 2014, 09:40
The jb-alvarado script does not contain support to add ffms or libav to x264
You are wrong, it does. (I use it to compile my Windows binaries. ;))

I don't know if this is supposed to happen, but with the same film Hybrid encodes x264 @ 2.36 fps when with mencoder it was encoding @ 3.8 fps...
Not enough infos to reproduce. My guess: you are not using the same settings. :)
-> show the command lines you use to test this, so others can reproduce it

digitall.h
6th March 2014, 00:11
You are wrong, it does. (I use it to compile my Windows binaries. ;))

Most probably you're completely right. I will revise the files, I think I just saw code for vanilla x264 compilation.
In compile_videotools.sh:
git clone http://repo.or.cz/r/x264.git x264-git
cd x264-git
./configure --host=$targetHost --prefix=$LOCALDESTDIR --extra-cflags=-fno-aggressive-loop-optimizations --enable-static --enable-win32thread
make -j $cpuCount
I don't find another reference to x264 compilation. But I have to revise it carefully.

My guess: you are not using the same settings. :)
-> show the command lines you use to test this, so others can reproduce it
Let's go:
"/usr/bin/mencoder" -lavdopts threads=4 -really-quiet -ofps 23.976 -of rawvideo -o - "/home/La isla/BDMV/STREAM/00000.m2ts" -ovc raw -vfm ffmpeg -noskip
-vf scale,format=i420,crop=1920:800:0:140,scale,format=i420 -forcedsubsonly -nosub -nosound -mc 0 -vid 4113 -tsprobe 100000000 |
"/home/x264-VLC/x264-r2389-956c8d8" --preset veryslow --tune film --crf 23 --profile high --level 4.1 --ref 4 --aq-mode 2 --vbv-maxrate 62500 --vbv-bufsize 78125
--qpfile "/media/TMP/La_isla_00_46_35_2110_09.qp" --output-csp i420 --fps 24000/1001 --input-res 1920x800 --output "/media/TMP/La_isla_00_46_35_2110_10.264" -

"/home/ffmpeg_build/bin/ffmpeg" -y -v -10 -r 24000/1001 -analyzeduration 100M -probesize 100M -playlist 0 -i bluray:"/home/La isla" -an -sn -threads 4
-vf crop=1920:800:0:140 -vsync 0 -r 24000/1001 -pix_fmt yuv420p -f rawvideo - | "/home/x264-VLC/x264-r2389-956c8d8" --preset veryslow --tune film --crf 18 --profile high
--level 4.1 --ref 4 --aq-mode 2 --vbv-maxrate 62500 --vbv-bufsize 78125 --qpfile "/media/TMP/Isla_00_28_04_2610_01.qp" --output-csp i420 --fps 24000/1001
--input-res 1920x800 --output "/media/TMP/Isla_00_28_04_2610_02.264" -

Aaaarrrggghhh!!
:(
Aaaarrrggghhh!!
:D

You were right. My computer is still hot, after 12 hours of coding...

digitall.h
6th March 2014, 01:47
Well, repeating encoding, and with ffmpeg it encodes at 3.7 fps, about the same speed as mencoder.
I suppose that the bottleneck is in x264.
I will try to optimise x264 compilation in my system, to improve speed.
:)

Selur
6th March 2014, 06:39
I doubt that optimizing the compilation will do much, trying to find faster settings which still produce an acceptable quality might be the better way. :)

digitall.h
6th March 2014, 23:41
Well, I prefer to wait for the result, and enjoy the quality ;)

I suppose that x264 makes a more intensive use of CPU than RAM, because when encoding, CPU goes up to 99% of usage, and memory stays calm.

So optimization will not improve anything if directed to a better use of cores (they are already being used 99%) :scared:

xkinn123
9th March 2014, 09:53
selur, can you add "add font" feature? i really need that! :D

Selur
9th March 2014, 10:17
Don't even know what that feature should do?
wild guess: `Copy the font you want into the 'Font path'? (see: Config->Path->infos->Font path)

v0lt
16th March 2014, 15:05
Hybrid_32bit_140312.7z contains mkvmerge v6.8.0, but not mux HEVC stream.

I used mkvmerge GUI v6.8.0. Was no such problem.

Selur
16th March 2014, 15:12
@volt: does Hybrid know that you are using v6.8.0? (check "Config->Tool versions")

v0lt
16th March 2014, 15:52
I do not know why, but today mkvmerge works in Hybrid.

digitall.h
16th March 2014, 20:38
Hi selur,
using Hybrid 2014.02.25.1 Linux 64bit.
When you select under x264>Misc>Main>Adjustments the option 'Stitchable', it does not change anything in the command-line that Hybrid shows, and then it does not add --stitchable option to x264 call.
:)

Selur
16th March 2014, 20:39
will fix :)

Selur
21st March 2014, 11:18
Hybrid rev 2014.03.21.1:

*changed*

output: add par info to mp4(hevc); did cause problems with the earliest decoders, which is why it was disabled before

*fixed*

avisynth: problem with DGDecNV not being used
jobs: cosmetics, qaac, x265 progress indication
audio: delay was sometimes ignored
x265: color mess when feeding 16bit x265
x264: enabling 'stitchable' didn't change the call

*added*

filter: colorMatrix support through ffmpeg (not only avisynth)
output: option to use 'Title'-tag value as base-name for name generation
x264: option to enforce .stats creation

*removed*

filter: 'Selection', since it doesn't work with mencoder as decoder (only got it working with ffmpeg or avisynth)
x265: x265 support is removed when a version newer than 0.8+149 is used on Windows XP machines (x265 doesn't support Windows XP any more unless someone writes a patch for it)


General note for those using 32bit systems and general about 4k&8k resolutions:
Don't be surprised if you can't reencode content with 4k or 8k resolutions. The 2GB (3GB with LAA on a 64bit OS running the 32bit application) memory limit is simply not enough.
4k = 3840x2160 pixels with Yv12 that is 1.5byte per pixel, so 3840x2160x1.5 = 12384000 byte ~ 11.8MB per Frame, so assuming a max GOP size of 250 is used a bit over 2.8GB would be needed to buffer the whole GOP. With 8k the whole thing easily kills more systems using 4 times that amount of RAM buffering 250frames requires ~11.5GB RAM. So for any system with less than 16GB, 8k is not something to really work with.

-> downloads: http://www.selur.de/downloads

Cu Selur

Music Fan
22nd March 2014, 15:54
I can't start the latest version on XP (after installation), I get 2 error messages about x265 : InitializeConditionVariable not foundable in KERNEL32.dll and GetTool Versions got an empty output for x265.

Selur
22nd March 2014, 17:55
damn, seems like I missed some x265 test. -> x265 dropped XP support and version later then 0.8+149 don't work on Xp.

Music Fan
22nd March 2014, 18:24
Yes, I saw above, I hope you can still make a version for XP users (without x265).

Selur
22nd March 2014, 18:25
replace the current x265 with an older one,..

Music Fan
22nd March 2014, 19:00
replace the current x265 with an older one,..
I only find the last.:o

Music Fan
22nd March 2014, 19:06
Ok it's good, I found ;
http://forum.doom9.org/showthread.php?p=1645128#post1645128

Selur
22nd March 2014, 22:50
look over at videohelp in the MinGW thread

Music Fan
22nd March 2014, 22:59
I guess you mean this ;
http://forum.videohelp.com/threads/357754-%5BHEVC%5D-x265-EXE-mingw-builds

Selur
23rd March 2014, 06:22
yup, a few users posted different version throughout the thread which are not mentioned in the start of the thread.

Music Fan
23rd March 2014, 12:11
Where do these versions come from ? They are not on the official x265 website ?

Music Fan
23rd March 2014, 13:40
When I try to encode in 720.576 in interlaced x264 and when hardware is ticked and put on Blu-ray/AVCHD, Hybrid refuse this resolution and force a resize in 1280.720, why ?
Blu-ray and AVCHD are though 720.576 compatible.
If I want 720.576, I have to untick hardware, go in crop/resize and untick letterbox.

Selur
27th March 2014, 15:47
Where do these versions come from ? They are not on the official x265 website ?
they compile them themselves
When I try to encode in 720.576 in interlaced x264 and when hardware is ticked and put on Blu-ray/AVCHD, Hybrid refuse this resolution and force a resize in 1280.720, why ?
Since you didn't post a debug output here's a wild guess: you kept the par at 1:1 and 567i either needs to be 16:11 or 10:11, since the output par is 1:1 the lowest resolution that is supported by Blu-ray is 720p, which is why Hybrid resized to 720p.

Cu Selur

Music Fan
28th March 2014, 10:54
Thanks, that was it. This is an avs script thus I guess the PAR is always 1:1.
But now my picture in 720.576 is pillarboxed.:confused:
I changed the output PAR, I'm gonna try to force the input PAR.
Ok that was it, just forced the input PAR in 16 x 11 and put the same for output PAR.

Something else : I saw that we could transform TS in MKV without re-encoding with Hybrid ; how do you make to put the good framerate for interlaced stuff ? I tried manually the same method than Hybrid (extraction with TSMuxer, remux with MKVMerge, put 50i) but MediaInfo detects my MKV's framerate as variable while it is constant. When it's done with Hybrid, the framerate is well detected as constant.

Music Fan
28th March 2014, 12:13
Actually 16/11 is not good for 16/9 PAL videos ; MKVMerge detects this display size : 1047*576 while it should be 1024*576, could you add this in Hybrid ?

Selur
28th March 2014, 13:07
no way. Yo are mixing DAR and PAR, see: http://forum.selur.de/topic287-info-about-pixel-aspect-ratios.html

how do you make to put the good framerate for interlaced stuff ?
I explicitly tell mkvmerge which frame rate should be used.

Music Fan
28th March 2014, 17:30
I explicitly tell mkvmerge which frame rate should be used.
I also do this, I put 50i.:confused:

no way. Yo are mixing DAR and PAR
No, I know what means DAR and PAR, I made a lot of mpeg-2 encoding and dvd authoring.

see: http://forum.selur.de/topic287-info-about-pixel-aspect-ratios.html
Ok, I see where the difference comes from ; 16/11 PAR is another norm. But in my opinion, this shouldn't be used for AVCHD/Blu-ray because it gives a unusual Display Resolution (1047*576 instead of 1024*576) and may not be compliant with standalone players (I mean when converted in m2ts with TSMuxer or multiAVCHD).
I will put 64/45.

Music Fan
28th March 2014, 17:41
Actually I can't put 64/45 !:confused:
I have an avs script with a 720.576 resolution and I wanna let it in 720.576 and have a 64/45 PAR, how to do this ?

Selur
28th March 2014, 18:42
by setting the "Input PAR" to 64/45

Music Fan
28th March 2014, 19:00
That's what I did but Hybrid still force the resize in 1280.720 if I don't untick hardware Blu-ray/AVCHD (no problem if I put 16/11 instead of 64/45) and the output PAR is ticked and I have to choose a PAR in the list which does not include 64/45 (logical with a resize in 1280.720).

Selur
29th March 2014, 00:50
no, yo have to set inpt par to 64/45 and set output par to 16/11

Music Fan
29th March 2014, 03:53
In this case Hybrid make a resize in 496.576, but I can change it, thus I put 720.576, I go in the main window, then I go back in crop/resize and it became 704.576.:o
And anyway, if I put 16/11 I won't get what I need and will have to correct it with MKVmerge while it could be done directly with Hybrid.:(
Why is it impossible to put the PAR we want for input and ouptut without crop and/or resize, especially 64/45 which is the usual PAR for anamorphic 16/9 in 720.576 ?

Selur
29th March 2014, 08:46
a. if you change the input PAR no resize or cropping is necessary
b. if you convert one input PAR to another output PAR resize&cropping is necessary
c. there is no restriction (I'm aware of) regarding the input or output PAR unless you want some hardware compatibility

How about you:
a. load your source (not the avisynth script) and see which PAR Hybrid reports
b. load your avisynth script and set that PAR as input PAR
c. if you want/need Blu-ray compatibility: enable x264->Main->Restriction Settings->Hardware->Blu-ray tell Hybrid to use a compatible PAR (the matching MPEG-4-PAR under 'Crop/Resize->Pixel Aspect Ration (PAR)')
-> really sure where your problem is

Music Fan
29th March 2014, 14:14
c. there is no restriction (I'm aware of) regarding the input or output PAR unless you want some hardware compatibility
Yes, that's what I said : I chose Blu-ray compatibility but in this case your program forbid to use 64/45 for 720.576 in 16/9 while it's the only PAR that gives a real 16/9 DAR, 1024.576.
16/11 on 720.576 gives 1047*576 as Display Resolution (you can see it when you load the mkv in MKVmerge), which is not 1,7777... (16/9) but 1,817...
Thus I have to put 16/11 for input and ouptut PAR to avoid crop/resize then I have to change the DAR in MKVmerge to create a file with good PAR/DAR, which makes one more step.:o
Or I have to untick hardware compatibility ; in this case I can put 64/45 for input and ouptut PAR without crop/resize, but I guess it's better to tick hardware compatibility if I wannna make AVCHD and/or Blu-ray.

Selur
29th March 2014, 14:25
Yes, if you enable Blu-ray hardware compatibility Hybrid will only allow to create Blu-ray compatible output, not some output with a "resolution<>PAR<>scan type<>fps"-combination that is not supported by AVCHD and/or Blu-ray.
-> this is not a bug, but you wanting to create non compliant content while you tell Hybrid to enforce compliance. ;)

Music Fan
29th March 2014, 14:34
So, for you, a real 16/9 DAR (1024,576) is not compliant with AVCHD and/or Blu-ray ?
Where did you see this ?
Why should my videos be deformed when encoded in x264 while a 64/45 PAR for 720.576 is ok in mpeg-2 on dvd ?