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, 19:23   #2341  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 697
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   #2342  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 268
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   #2343  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
What's the latest C Plugin version of ffms2 and where to get it?
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 14th January 2017, 12:04   #2344  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
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   #2345  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Thanks totally overlooked that when I was scrolling back the posts,..
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 16th February 2017, 20:50   #2346  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
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
Selur is offline   Reply With Quote
Old 16th February 2017, 20:54   #2347  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
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   #2348  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Thanks!
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 4th March 2017, 16:30   #2349  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
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, 19:37   #2350  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
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, 13:59   #2351  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
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, 07:48   #2352  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
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, 11:45   #2353  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
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, 18:00   #2354  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
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 18:03.
TheFluff is offline   Reply With Quote
Old 20th June 2017, 20:55   #2355  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
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, 21:01   #2356  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
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, 21:12   #2357  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
... 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 21:17.
LigH is offline   Reply With Quote
Old 20th June 2017, 21:32   #2358  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Would it be difficult to implement ffmpeg's concat features (e.g. the "concat demuxer")?
sneaker_ger is offline   Reply With Quote
Old 20th June 2017, 23:04   #2359  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by sneaker_ger View Post
Would it be difficult to implement ffmpeg's concat features (e.g. the "concat demuxer")?
That's kinda been considered but I stopped thinking about it after d2vsource was released. It's useful for real segmented stuff at least that won't decode properly with just multiple sources. Add it to the maybe pile (create an issue about it if you want to make sure I don't forget it). I'm a busy person at the moment.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 20th June 2017, 23:43   #2360  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
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?!
Segmented source files is a different thing. As far as I know MPLS isn't that, it's literally just a playlist.

As far as your whining about running out of memory goes, I created 20 ffms2 instances for a 2GB MP4 in VS and the entire process ate less than 500 MB memory, so, well. It's kind of an insult from the 1970's, but really, if you want to encode big video files maybe you should get a real computer? Or if you have a real computer, stop using 32-bit Avisynth; it's not like there's been any reason to use it other than pure obstinacy for the last few years. You're kinda complaining about getting wet when you go outside in the rain while intentionally not bringing your umbrella, here.

Last edited by TheFluff; 20th June 2017 at 23:52.
TheFluff 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 16:46.


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