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 > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th January 2017, 15:02   #2341  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
Quote:
Originally Posted by LigH View Post
... for VapourSynth. And what do users of AviSynth+ 64-bit use?

Oh, there is one.
MPEG2DecPlus: https://github.com/chikuzen/MPEG2DecPlus
Binary here; this version is for AVS+ only, support for avs 2.6 was added but you'll have to compile it yourself.
Reel.Deel is offline   Reply With Quote
Old 4th January 2017, 17:26   #2342  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 270
Quote:
Originally Posted by Jamaika View Post
Never converts RGB48 to RGBxx CineForm, ProRes or DNxHD. This is absurd.
There are limitations with the colormatrix. ProRes is always in RGB BT601 and CineForm BT709.
The sony vegas 14 is illegal and incorrect operation. Even using the V210 or R210 then I would use yuv422p10le.
In my opinion this is not a problem editors only muxing encoders.
Not sure what you're saying here. I'm trying to load Cineform files.
A simple core.ffms2.Source() seems to return RGB48 for the Cineform files (reported as 12bpp RGB, so I guess it makes it 16bpp RGB because no support for 'RGB36'), but somehow still sets the format-tag to something YUV based which trips up the resizers in Vapoursynth which means I can't convert / resize it to anything.

edit:
Btw: (not to try to prove you wrong, but more to explain to me how it could be )
I'm in After Effects (which doesn't understand the concept of YUV, it's completely RGB compositer), I make a little comp, export it yo ProRes 4444.
With ffms2 I load the file into Vapoursynth which returns it as '4444'. I convert it with fmtconv to RGB _with specifying the bt709_ color matrix. The end result in RGB is _exactly_ the same as my After Effects start. So the file seems to be bt709.
Ffmpeg had a time (or still does?) where it writes incorrect bt601 matrix-tags in the output file for ProRes, but those are ignored (in FCPX and the Adobe suite at least) anyway.

As another example, I can load a .MTS AVCHD file from one my cameras, which opens as YUV420P8. I use fmtconv to 'convert' it to YUV422P10. That YUV422P10 I pass to ffmpeg to encode to prores.
When I then load the original .MTS file and my ffmpeg-generated .mov file in After Effects and toggle the layers on and off, I see no differences. Which to me also seems to suggest the Prores data is bt709 and being interpreted as bt709. (The AVCHD .mts file is bt709 for sure).

Last edited by dipje; 4th January 2017 at 17:54.
dipje is offline   Reply With Quote
Old 4th January 2017, 19:23   #2343  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 632
Quote:
Originally Posted by dipje View Post
Not sure what you're saying here. I'm trying to load Cineform files.
A simple core.ffms2.Source() seems to return RGB48 for the Cineform files (reported as 12bpp RGB, so I guess it makes it 16bpp RGB because no support for 'RGB36'), but somehow still sets the format-tag to something YUV based which trips up the resizers in Vapoursynth which means I can't convert / resize it to anything.
Maybe yes, maybe no.
I don't like to use Cineform becose the codec leaves sharp edges when converting RGB to YUV or YUV to RGB.
Examples of conversion in Sony Vegas 14. I do not have the ability to change parameters color range and matrix:
RGB48 to BlackMagic R210 --> The result far removed from the source. All colors changed.
RGB48 to Sony V210 --> Changed color range with PC to TV. Supposedly as standard.
RGB48 to Cineform yuv422p10le --> OK
RGB48 to Magix_prores_hq --> Changed color range with PC to TV. Supposedly as standard.

PS Codecs 10/12 bit don't have a color matrix bt2020nc.
Jamaika is offline   Reply With Quote
Old 4th January 2017, 21:16   #2344  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 270
Well, that's all fine and all, but it doesn't explain why I can't convert or resize Cineform RGB loaded files in Vapoursynth.
Saying why you don't like a codec doesn't help in figuring out if there is a bug in Vapoursynth, ffms2 or in my process .

(btw, no color casts or changes here. Compared the native Cineform encoder/decoder in Adobe suite to other near-lossless intermediate codecs that I have access to (DNHD/DNXHR is now native in Adobe suit as well) and looked at them through 'difference maps'. No sharp edges and no visual differences at all. Looking at difference-maps when testing yuv422 codecs will of course show the differences at the edges in color-details because of the lower chroma resolution, but all yuv422 codecs have that. ffmpeg prores_ks with -q:v 3 together with the mirazon-prores suite on PC actually gave the least differences, specially considering the bitrate. But I have to use an outdated abonded 3rd party prores-codec to export it from Adobe suite and other programs. Cineform had a bit more differences, but they were much less in intensity and very natural over the image. Looking at the image while pixel-peeping I rated them in Cineform-first, prores 2nd, dnxhd last. The cineform files were a bit bigger though so it's a bit cheating).
dipje is offline   Reply With Quote
Old 14th January 2017, 11:38   #2345  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,929
What's the latest C Plugin version of ffms2 and where to get it?
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 14th January 2017, 12:04   #2346  |  Link
Groucho2004
Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,506
Quote:
Originally Posted by Selur View Post
What's the latest C Plugin version of ffms2 and where to get it?
qyot27 is the one who builds these so you go back a few posts in this thread and eventually arrive at this one.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 14th January 2017, 12:06   #2347  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,929
Thanks totally overlooked that when I was scrolling back the posts,..
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 16th February 2017, 20:50   #2348  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,929
Small question when using FFmpegSource in Vapoursynth.
When I use:
Code:
clip = core.ffms2.Source(source="C:/Users/Selur/Desktop/Test.ts",cachefile="H:/Temp/ts_6172c2a2969c38a25728d49450effe0d_491.ffindex",fpsnum=50)
my source get's decoded properly, when set a format using:
Code:
clip = core.ffms2.Source(source="C:/Users/Selur/Desktop/Test.ts",cachefile="H:/Temp/ts_6172c2a2969c38a25728d49450effe0d_491.ffindex",fpsnum=50,format=vs.YUV420P8)
I get an error.
The whole script is:
Code:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/SourceFilter/FFMS2/ffms2.dll")
# Loading C:\Users\Selur\Desktop\Test.ts using FFMS2
clip = core.ffms2.Source(source="C:/Users/Selur/Desktop/Test.ts",cachefile="H:/Temp/ts_6172c2a2969c38a25728d49450effe0d_491.ffindex",fpsnum=50,format=vs.YUV420P8)
# Output
clip.set_output()
and the error I get is:
Code:
Failed to evaluate the script:
Python exception: 'list' object has no attribute 'set_output'
Traceback (most recent call last):
  File "src\cython\vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src\cython\vapoursynth.c:26905)
  File "H:\Temp\encodingTempSynthSkript_22_51_09_5510.vpy", line 9, in <module>
    clip.set_output()
AttributeError: 'list' object has no attribute 'set_output'
=> how to properly set the format ?

Cu Selur
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 16th February 2017, 20:54   #2349  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,055
Look at the output. You get an array of two clips. Pick one. Or set alpha to false.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 16th February 2017, 20:55   #2350  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,929
Thanks!
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 4th March 2017, 16:30   #2351  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,096
FFMS2 C-plugin r1140+105-avs+vsp

Optimized for Pentium-III and SSE (32-bit)
Optimized for Core2 (64-bit)

ffmpeg version r83723 git-9ae762d Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (GCC)
libavutil 55. 47.101 / 55. 47.101
libavcodec 57. 82.100 / 57. 82.100
libavformat 57. 66.103 / 57. 66.103
libavfilter 6. 74.100 / 6. 74.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100

32-bit configuration:
Code:
    --prefix=/home/qyot27/win32_build
    --cross-prefix=i686-w64-mingw32-
    --enable-gpl
    --enable-version3
    --disable-w32threads
    --enable-avresample
    --disable-encoders
    --disable-muxers
    --disable-doc
    --disable-debug
    --disable-devices
    --disable-avdevice
    --cpu=pentium3
    --extra-cflags='-mfpmath=sse -march=pentium3 -msse -mtune=pentium3'
    --target-os=mingw32
    --arch=x86
64-bit configuration:
Code:
    --prefix=/home/qyot27/win64_build
    --cross-prefix=x86_64-w64-mingw32-
    --enable-gpl
    --enable-version3
    --disable-w32threads
    --enable-avresample
    --disable-encoders
    --disable-muxers
    --disable-doc
    --disable-debug
    --disable-devices
    --disable-avdevice
    --cpu=core2
    --extra-cflags='-march=core2'
    --target-os=mingw32
    --arch=x86_64
Now supporting almost all of the new pix_fmts in AviSynth+. High bit depth in/out works, also YUVA, Planar RGB, and Planar RGBA are outputting green video - they don't crash, though. Not sure if that's due to something that needs fixing in FFMS2 or in AviSynth+ (r2420 was used for the tests).

I'm pretty certain now that the issues I was having with previous builds when trying to use the AviSynth+ header were caused by GCC miscompiling things, because Debug builds (-g) work, but Release builds immediately crash. Of course, even with Debug builds mostly working, there's some kind of issue with crashes on exit, which I wouldn't be surprised to find is also being caused by GCC miscompiling it.

AviSynth 2.6 will not work with this build. I may be able to avert this with the same sort of tactic I used to make Libav and FFmpeg distinguish between 2.6 and Plus. Because of this and the crash-on-exit thing mentioned above, I've also left the previous non-Plus build available.

EDIT 2018-01-02: Newer build available.

Last edited by qyot27; 3rd January 2018 at 00:33.
qyot27 is offline   Reply With Quote
Old 27th April 2017, 20:37   #2352  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,324
Is this normal that in latest ffms2 2.23.1 all frames in VC-1 are detected as keyframes?
Example
Code:
# keyframe format v1
fps 0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FFMS 2.20
Code:
# keyframe format v1
fps 0
0
1
25
49
53
77
101
106
130
154
178
202
226
250
274
298
322
346
370
394
418
442
466
490
Atak_Snajpera is offline   Reply With Quote
Old 2nd May 2017, 14:59   #2353  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,983
Would it be easy/complicated/expensive/illegal to have FFMS2 support HWAccel features of ffmpeg for decoding?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 3rd May 2017, 08:48   #2354  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: 36 Chambers
Posts: 5,917
Quote:
Originally Posted by LigH View Post
Would it be easy/complicated/expensive/illegal to have FFMS2 support HWAccel features of ffmpeg for decoding?
IIRC it's already supported but don't work (I don't remember if it was l-smash or ffms2), maybe you can find something in the docs.
stax76 is offline   Reply With Quote
Old 20th June 2017, 12:45   #2355  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,983
Again, regarding playlist support:

Quote:
Originally Posted by TheFluff View Post
It's been on the todo list for ages, issue #33 is an even older feature request for the same thing.
A similar case just came up, a consumer camera recording MTS segments of up to 2 GB per piece, due to FAT32 restrictions of SD*C memory cards. Using a source call for each MTS segment separately goes out of memory easily on a 32 bit AviSynth.

I believe any source plugin supporting MPLS could help here. At the moment, the owner of such a camera may have to buy DGDec* or concatenate the segments before use.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 20th June 2017, 19:00   #2356  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,075
Playlist support was rejected in the core since it just added a dependency on a playlist parser lib for no good reason (it could just as well be done on the calling side of the API). For VS there's ReadMPLS as a standalone thing but I really don't think anyone cares about 32-bit Avisynth anymore.

Last edited by TheFluff; 20th June 2017 at 19:03.
TheFluff is offline   Reply With Quote
Old 20th June 2017, 21:55   #2357  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,983
So because a 64-bit AviSynth is less likely to run out of memory, supporting playlists (not only for convenience, but even for correct handling of segmented media formats) becomes automatically irrelevant?!
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 20th June 2017, 22:01   #2358  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,055
Quote:
Originally Posted by LigH View Post
So because a 64-bit AviSynth is less likely to run out of memory, supporting playlists (not only for convenience, but even for correct handling of segmented media formats) becomes automatically irrelevant?!
Yes, it's 2017. You're free to write a wrapper that creates/destroys source instances in a memory conserving way if you really care.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 20th June 2017, 22:12   #2359  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,983
... if I was a C/C++ programmer. What I am not; I am only a user. So I have to hope that more competent people than me are able.

I am not sure if implementing a support for playlists is more complicated than implementing a different "partially shared" handling for source plugins which must be re-entrant per se.

I hope AviSynth+ author(s) know better.

Apart from that: What if a large medium is split without respect of GOP or even frame borders? It would be perfectly legal. Independent treatment of such segments would be a loss of content, instead. Thus, handling several source plugin instances would be a failure, in contrast to handling segments as continuous stream; but that would only work in a playlist.
__________________

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

Last edited by LigH; 20th June 2017 at 22:17.
LigH is offline   Reply With Quote
Old 20th June 2017, 22:32   #2360  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,502
Would it be difficult to implement ffmpeg's concat features (e.g. the "concat demuxer")?
sneaker_ger 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 00:12.


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