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 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd March 2012, 14:55   #21  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Hmm, it seems that x264-audio uses lavf as default audio demuxer, and lavf can handle pipe protocol....
06_taro is offline   Reply With Quote
Old 22nd March 2012, 15:54   #22  |  Link
Nevilne
Registered User
 
Join Date: Aug 2010
Posts: 134
Maybe something among the lines of creating 2 named pipes and feeding them to x264? Don't know how well it would work on windows though. Starting cygwin for a simple encode is kinda meh.
Nevilne is offline   Reply With Quote
Old 22nd March 2012, 21:17   #23  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Well, there is such a tool for windows: http://www.nmm-hd.org/newbbs/viewtopic.php?f=8&t=631
What is need to do is to create two named pipes out with one tool, such as ffmpeg/libav, then let x264-audio get those two named pipes in simultaneously, like this:

libav -i input.avs -f wav -vn \\.\pipe\1001 -f yuv4mpegpipe -an \\.\pipe\1002

x264 \\.\pipe\1001 --audiofile \\.\pipe\1002 -o output.mp4

Last edited by 06_taro; 22nd March 2012 at 21:20.
06_taro is offline   Reply With Quote
Old 23rd March 2012, 15:27   #24  |  Link
Chyrka
Registered User
 
Join Date: Oct 2011
Location: Kyiv, Ukraine
Posts: 24
06_taro, are there any speed difference between avs2yuv and avs4x264mod? (x64 system)
Chyrka is offline   Reply With Quote
Old 23rd March 2012, 17:31   #25  |  Link
Nevilne
Registered User
 
Join Date: Aug 2010
Posts: 134
Quote:
Originally Posted by 06_taro View Post
libav -i input.avs -f wav -vn \\.\pipe\1001 -f yuv4mpegpipe -an \\.\pipe\1002

x264 \\.\pipe\1001 --audiofile \\.\pipe\1002 -o output.mp4
Am I missing something or it only allows one standard input pipe?
Like soranamedpipe \\.\pipe\123 | app -i - ouput

Speaking of which, this also doesn't work, hehe
avs2pipemod -wav audio.avs | avs4x264mod video.avs --audiofile - -o output
Nevilne is offline   Reply With Quote
Old 24th March 2012, 00:18   #26  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Quote:
Originally Posted by Chyrka View Post
06_taro, are there any speed difference between avs2yuv and avs4x264mod? (x64 system)
There shouldn't be any.
Here's a rough test: http://k4095-takuan.blogspot.co.uk/2...blog-post.html

Quote:
Originally Posted by Nevilne View Post
Am I missing something or it only allows one standard input pipe?
Like soranamedpipe \\.\pipe\123 | app -i - ouput

Speaking of which, this also doesn't work, hehe
avs2pipemod -wav audio.avs | avs4x264mod video.avs --audiofile - -o output
Oops, I mis-understood how soranamedpipe works.
Anyway,
Code:
avs4x264mod "video.avs" --audiofile "audio.avs" -o "output.mp4"
should work properly.
06_taro is offline   Reply With Quote
Old 24th March 2012, 07:29   #27  |  Link
Chyrka
Registered User
 
Join Date: Oct 2011
Location: Kyiv, Ukraine
Posts: 24
06_taro, I see. Thanks for link.
Chyrka is offline   Reply With Quote
Old 4th June 2012, 04:10   #28  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Update to v0.8

FPS will be corrected to NTSC fraction if applicable. And now you can simply use
Code:
avs4x264mod "input.dgi -o "output.264"
or
Code:
avs4x264mod "input.avi" -o "output.264"
to encode, source filter will be selected and invoked according to extension of input file (requires dlls for those source filters to be loaded automatically).

Last edited by 06_taro; 4th June 2012 at 04:12.
06_taro is offline   Reply With Quote
Old 9th February 2013, 03:07   #29  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
Trying to download avs4x264mod-0.9.0-git-r62(691c5c4).7z from github, I get:

Quote:
File was not found.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 9th February 2013, 08:20   #30  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Edited.

GitHub stopped their upload service, so please use NMM-Mirror, or wait for attachment to be approved.
06_taro is offline   Reply With Quote
Old 17th February 2013, 14:11   #31  |  Link
Kazuya
Kodi + Potplayer addict
 
Join Date: Apr 2009
Location: France
Posts: 69
Hi,
I'm trying to encode several patterns in 10bit 4:4:4 to make some comparisons between renderers, video outputs...

But, I still have an YV12 conversion warning in execution window...
Or I can convert it with ConvertToYV24 but I think YV24 is 8bit, am I wrong ?
And can't find any "ConvertToY410" working with avisynth...

Is there a way to avoid any conversion ?

Thanks !

(my image source is a handmade png 16 bit image under photoshop CS3)

My command line to encode x264 :

Code:
C:\avs4x264mod.exe --x264-binary "C:\x264\x264_10bit.exe" --fps 5 --output-csp i444 --output "E:\output.mp4" "E:\Script encodage.avs"
Execute window :

__________________
Hometheater builder and acoustic specialist (www.kazcorporation.com)
Kazuya is offline   Reply With Quote
Old 17th February 2013, 14:57   #32  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Quote:
(my image source is a handmade png 16 bit image under photoshop CS3)
What is the final pixel format of your AviSynth script? avs4x264mod currently only supports outputting YV12/YV16/YV24 without forcing to convert them to YV12. If the final pixel format of your script is Y8/YV411/YUY2/RGB, then ConvertToYV12() is automatically invoked.

Quote:
Or I can convert it with ConvertToYV24 but I think YV24 is 8bit, am I wrong ?
Exactly. However, thanks to Cretindesalpes for his dither package, we can use up to 16-bit YUV420/422/444 formats in AviSynth. There are two formats of such high bit depth colour space: stacked and interleaved. The former contains MSB and LSB stacked vertically, so it is easy for viewing and general filtering; while the latter actually put MSB data and LSB data in the same structure that native Planar YUV formats use, so it can be used for encoding: if you tell the receiver of this format (e.g. x264) that the raw YUV is yuv420p16, then x264 will treat this fake interleaved MSB/LSB as 16-bit yuv420. You can use yuv444p10 in the similar way by:
PHP Code:
ImageSource("input.png")

# convert RGB to stacked yuv444p16
Dither_Convert_RGB_TO_YUV(output="YV24"lsb=True)

# convert stacked yuv444p16 to interleaved yuv444p16 for encoding, you can also use Dither_out()
f3kdb(Y=0Cb=0Cr=0grainY=0grainC=0input_depth=16input_mode=1output_depth=16output_mode=2
Then feed the script to avs4x264mod with "--input-depth=16", then such raw yuv444p16 will be passed directly to x264 without unnecessary conversion.

If your raw yuv data is neither 8-bit nor 16-bit, then vanilla x264 will firstly shift it to 16-bit then dither it back to encoding bit depth using Sierra-2-4A error diffusion dithering. If you are using x264 built with the patch Skip bit depth filter when possible, then you can even pass 10bit avs script to x264, and neither avs4x264mod nor patched x264 will do any conversion on the raw yuv:
PHP Code:
ImageSource("input.png")

# convert RGB to stacked yuv444p16
Dither_Convert_RGB_TO_YUV(output="YV24"lsb=True)

# convert stacked yuv444p16 to interleaved yuv444p10 for encoding
f3kdb(Y=0Cb=0Cr=0grainY=0grainC=0input_depth=16input_mode=1output_depth=10output_mode=2
Then feed the script to avs4x264mod with "--input-depth=10".

Last edited by 06_taro; 17th February 2013 at 15:07.
06_taro is offline   Reply With Quote
Old 20th February 2013, 15:16   #33  |  Link
Kazuya
Kodi + Potplayer addict
 
Join Date: Apr 2009
Location: France
Posts: 69
Thanks, it works very well !
And improves a lot 8bit encodes by eliminate banding.

But I think the weight of encoded file is 3 times louder than the same encode in 10bit. I only encoded patterns, so I'm note sure.

I used your first call, because my png is 16bit.
And to encode in 8bit, I only change output depth and mode :

Code:
ImageSource("input.png")
Dither_Convert_RGB_TO_YUV(output="YV24", lsb=True)
f3kdb(Y=0, Cb=0, Cr=0, grainY=0, grainC=0, input_depth=16, input_mode=1, output_depth=8, output_mode=0)
__________________
Hometheater builder and acoustic specialist (www.kazcorporation.com)
Kazuya is offline   Reply With Quote
Old 20th February 2013, 23:52   #34  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
If both your input and output are 16-bit you should use a source filter that can preserve that precision, like this modified ffms. ImageSource outputs 8-bit.
Code:
FFVideoSource("input.png", cache=False, seekmode=-1, enable10bithack=True) # stacked YV24
f3kdb(Y=0, Cb=0, Cr=0, grainY=0, grainC=0, input_depth=16, input_mode=1, output_depth=16, output_mode=2)

Last edited by vdcrim; 20th February 2013 at 23:54.
vdcrim is offline   Reply With Quote
Old 27th February 2013, 12:21   #35  |  Link
Kazuya
Kodi + Potplayer addict
 
Join Date: Apr 2009
Location: France
Posts: 69
Thanks, I will try it !
__________________
Hometheater builder and acoustic specialist (www.kazcorporation.com)
Kazuya is offline   Reply With Quote
Old 11th May 2013, 00:20   #36  |  Link
Timothy_Gu
Registered User
 
Join Date: Mar 2013
Location: Los Angeles, California, USA
Posts: 4
Github down?

I follow the link to source code and met a 404: https://github.com/astrataro/avs4x264mod

Did you delete your github account or something like that?
Timothy_Gu is offline   Reply With Quote
Old 11th May 2013, 09:20   #37  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Don't know why, works for me when I log in, but fails when I log out.
Didn't delete anything.
06_taro is offline   Reply With Quote
Old 11th May 2013, 19:49   #38  |  Link
nhakobian
Registered User
 
Join Date: Oct 2009
Location: San Francisco, CA
Posts: 99
Github was having some file server problems yesterday, not sure if this is related or if its been fixed.
nhakobian is offline   Reply With Quote
Old 12th May 2013, 02:25   #39  |  Link
Timothy_Gu
Registered User
 
Join Date: Mar 2013
Location: Los Angeles, California, USA
Posts: 4
Quote:
Originally Posted by nhakobian View Post
Github was having some file server problems yesterday, not sure if this is related or if its been fixed.
OK, I can see the server status at https://status.github.com/. It reads:
Quote:
We're still performing maintenance on several fileserver clusters. Some repositories are currently unavailable.
I think that's the problem.
Timothy_Gu is offline   Reply With Quote
Old 12th May 2013, 05:18   #40  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
But it certainly has one of the most elaborate 404 pages ever. The Jedi-on-Tatooine scene even moves parallactically with the mouse position.

__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Reply

Tags
avisynth+, avs4x264, avs4x265, avs4x26x, x264, x265

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 09:40.


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