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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 17th December 2023, 14:28   #1521  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,300
I know FFMS2 can't but does LSMASH support image batch loading? something like IMG_%04d.JPG?

The only image loader that I know that does this is ImageSource, but that one converts the images to RGB internally.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 17th December 2023, 17:03   #1522  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,170
You can try ImageSequence
http://avisynth.nl/index.php/ImageSequence
kedautinh12 is offline   Reply With Quote
Old 17th December 2023, 17:36   #1523  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,300
CoronaSequence outputs RGB, I tried RawSequence() but it gives an error:
Code:
Error requesting frame 0
Cache: Filter returned invalid response to
CACHE_GETCHILD_AUDIO_MODE.10
Anyway, for today I solved it using batch scripts, but would be good to have a nice image sequence loader for next times.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 17th December 2023, 17:59   #1524  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,170
You can try JpegSource too
http://avisynth.nl/index.php/JpegSource
kedautinh12 is offline   Reply With Quote
Old 20th December 2023, 23:17   #1525  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,300
JpegSource can load image sequences? Anyway it's an outdated (x86) closed source plugin, it's the best jpeg decoder quality wise but no help there.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 21st December 2023, 03:25   #1526  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,515
Quote:
Originally Posted by Dogway View Post
I know FFMS2 can't but does LSMASH support image batch loading? something like IMG_%04d.JPG?

The only image loader that I know that does this is ImageSource, but that one converts the images to RGB internally.
To answer this original question, yes it does (at least on Linux, but as filename handling should be internal to the plugin, I would assume that's also true on Windows).

I output a sequence of PNG files as well as a sequence of JPGs, and LwLibavVideoSource was totally cool opening the entire sequence using:
Code:
LwLibavVideoSource("output_%02d.jpg") # or output_%02d.png
The PNG sequence remained bgr24, the JPG sequence remained yuv420p.
qyot27 is offline   Reply With Quote
Old 21st December 2023, 14:31   #1527  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,498
Quote:
at least on Linux
On W10 [EDIT: x64],

create_RGB.avs
Code:
# Export "Image Sequence" to ".\PIC_RGB" existing directory via VDUB2,  png with basename="RGBIMAGE_" and 6 digits
Colorbars(Pixel_Type="RGB24")
ShowFrameNumber
Trim(0,-100)
RgbIn.avs
Code:
LwLibavVideoSource(".\PIC_RGB\RGBIMAGE_%06d.png")    # "PIC_RGB" directory within the current directory.
Works OK,

###########

create_YUV.avs
Code:
# Export "Image Sequence" to ".\PIC_YUV" existing directory via VDUB2,  jpeg  with basename="YUVIMAGE_" and 6 digits

Colorbars(Pixel_Type="YV12")
ShowFrameNumber
Trim(0,-100)
YuvIn.avs
Code:
LwLibavVideoSource(".\PIC_YUV\YUVIMAGE_%06d.jpg")    # "PIC_YUV" directory within the current directory.
Avisynth open failure.
[Fatal]: Failed to avformat_open_input.


EDIT: Oops, WORKS (returned as YV24, pre save source was YV12 [VDUB may have changed for save])
YuvIn.avs
Code:
LwLibavVideoSource(".\PIC_YUV\YUVIMAGE_%06d.jpeg")    # VDub2 exported with 'jpeg' extension
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 21st December 2023 at 15:47.
StainlessS is offline   Reply With Quote
Old 22nd December 2023, 00:44   #1528  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,687
Quote:
Originally Posted by Dogway View Post
JpegSource can load image sequences?
It cannot. SEt had it on his todo list but never happened.

Quote:
Originally Posted by qyot27 View Post
LwLibavVideoSource was totally cool opening the entire sequence using:
Code:
LwLibavVideoSource("output_%02d.jpg") # or output_%02d.png
The PNG sequence remained bgr24, the JPG sequence remained yuv420p.
Nice tip, I had no idea LwLibavVideoSource was able to do that.

-------------

Another method of opening up image sequences is ImageSourceNV but requires an NVidia GPU and it converts YUV images to 4:4:4.
Reel.Deel is offline   Reply With Quote
Old 22nd December 2023, 00:45   #1529  |  Link
flossy_cake
Registered User
 
Join Date: Aug 2016
Posts: 465
I am confused about drc_scale:

Code:
0.0 : DRC disabled. Produces full range audio.
# ok I understand this

0.0 < drc_scale <= 1.0 : DRC enabled. Applies a fraction of the stream DRC value. Audio reproduction is between full range and full compression.
# ok so 0.5 gives half compression, 1.0 gives full compression, understood

> 1.0 : DRC enabled. Applies drc_scale asymmetrically. Loud sounds are fully compressed. Soft sounds are enhanced.
# I thought 1.0 was already fully compressed?  What is meant by "asymmetrically"?
flossy_cake is offline   Reply With Quote
Old 22nd December 2023, 10:52   #1530  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,457
You can read this thread about DRC and see the attached image with the volume amplify/ attenuation values (the most common is Film Standard) applied to the audio.

With drc=0 the 'None' curve is applied, with drc=1 the showed curve is applied and with drc>1 a more agresive (plane) curve must be applied with all sounds at same volume.

Of course apply drc is only recommended at play time, never when you want recode or recover the original audio.
Attached Images
File Type: gif ddcompprof.gif (13.8 KB, 702 views)
tebasuna51 is offline   Reply With Quote
Old 23rd December 2023, 05:38   #1531  |  Link
flossy_cake
Registered User
 
Join Date: Aug 2016
Posts: 465
Quote:
Originally Posted by tebasuna51 View Post
You can read this thread about DRC and see the attached image with the volume amplify/ attenuation values (the most common is Film Standard) applied to the audio.

With drc=0 the 'None' curve is applied, with drc=1 the showed curve is applied and with drc>1 a more agresive (plane) curve must be applied with all sounds at same volume.

Of course apply drc is only recommended at play time, never when you want recode or recover the original audio.
Very useful, thanks.

I can now try to emulate these in soxfilter as well - great!

flossy_cake is offline   Reply With Quote
Old 24th December 2023, 00:47   #1532  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,457
Quote:
Originally Posted by flossy_cake View Post
I can now try to emulate these in soxfilter as well - great!
Maybe like this?
tebasuna51 is offline   Reply With Quote
Old 24th December 2023, 04:05   #1533  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,170
L-SMASH-Works 1161.0.0.0 (info in this link, just click. If you confused, don't use it)
https://github.com/HomeOfAviSynthPlu...Works/releases
kedautinh12 is offline   Reply With Quote
Old 24th December 2023, 11:58   #1534  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Chelsea, UK
Posts: 3,419
Thanks for the Christmas present, asd-g!
FranceBB is offline   Reply With Quote
Old 25th December 2023, 05:59   #1535  |  Link
flossy_cake
Registered User
 
Join Date: Aug 2016
Posts: 465
Quote:
Originally Posted by tebasuna51 View Post
Hell yes that's just what I wanted
flossy_cake is offline   Reply With Quote
Old 26th January 2024, 20:17   #1536  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,300
Quote:
Originally Posted by StainlessS View Post
On W10 [EDIT: x64],

create_YUV.avs
Code:
# Export "Image Sequence" to ".\PIC_YUV" existing directory via VDUB2,  jpeg  with basename="YUVIMAGE_" and 6 digits

Colorbars(Pixel_Type="YV12")
ShowFrameNumber
Trim(0,-100)
YuvIn.avs
Code:
LwLibavVideoSource(".\PIC_YUV\YUVIMAGE_%06d.jpg")    # "PIC_YUV" directory within the current directory.
Avisynth open failure.
[Fatal]: Failed to avformat_open_input.


EDIT: Oops, WORKS (returned as YV24, pre save source was YV12 [VDUB may have changed for save])
YuvIn.avs
Code:
LwLibavVideoSource(".\PIC_YUV\YUVIMAGE_%06d.jpeg")    # VDub2 exported with 'jpeg' extension
That's the error I get for an image sequence of P1000054.JPG, P1000070.JPG, P1000074.JPG, etc.
Explicitly loading by the filename opens it but the sprint syntax calls that error. Tried with "P1000%03d.JPG", on Win11 x64.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 27th January 2024, 03:20   #1537  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,669
Quote:
Originally Posted by Dogway View Post
That's the error I get for an image sequence of P1000054.JPG, P1000070.JPG, P1000074.JPG, etc.
Explicitly loading by the filename opens it but the sprint syntax calls that error. Tried with "P1000%03d.JPG", on Win11 x64.
Is that the right numbering ?

If "gap" / "gapless" isn't supported maybe you can request that feature

What should it return ? Black "placeholder" frames inbetween ? Or just the frames present ?
poisondeathray is offline   Reply With Quote
Old 27th January 2024, 17:12   #1538  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,498
Quote:
Tried with "P1000%03d.JPG", on Win11 x64.
Try "P1%06d.JPG" (or for Vdub2 output "P1%06d.JPEG")
EDIT: Maybe the literal "000" of "P1000%03d.JPG" is confusing the code, somehow.

EDIT: Also if prob try,
".\P1%06d.JPG" or ".\P1%06d.JPEG",
or full path in place of current directory relative ".\".

EDIT: OK, maybe I misunderstood, looks like PDR got it.

EDIT: LWLibavVideoSource seems not to have equivalent to ImageSource("...",end=100)
Quote:
LWLibavVideoSource(string source, int stream_index = -1, int threads = 0, bool cache = true, string cachefile = source + ".lwi",
int seek_mode = 0, int seek_threshold = 10, bool dr = false, int fpsnum = 0, int fpsden = 1,
bool repeat = unspecified, int dominance = 0, string format = "", string decoder = "", int prefer_hw = 0,
int ff_loglevel = 0, string cachedir = "", string ff_options = "")
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 27th January 2024 at 17:43.
StainlessS is offline   Reply With Quote
Old 28th January 2024, 00:09   #1539  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,300
Thanks StainlessS, tried P1%06d.JPG, no dice.

Quote:
Originally Posted by poisondeathray View Post
Is that the right numbering ?

If "gap" / "gapless" isn't supported maybe you can request that feature

What should it return ? Black "placeholder" frames inbetween ? Or just the frames present ?
Frames present. These are the photos I selected from the set, and want to bulk filter them (resize, etc) with AVS+ tools.

I just tested renaming them to P1000000.JPG and P1000001.JPG and they load (both) fine. Also starting from P1000001, and so on. So the only problem it has is the numbering gaps. I can rename them to sequential temporally but could great to have this feature embedded.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 28th January 2024, 14:28   #1540  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,498
Doggy, loads all files matching, "P1??????.JPG|JPEG" # "P1" + 6 characters (hopefully Digits) + "." + ("JPG" OR "JPEG")

Untested.
Code:
IN_FILES = "P1??????.JPG|JPEG"                           # "P1" + 6 characters (hopefully Digits) + "." + ("JPG" OR "JPEG")
OUT_FILE = "FILE.List"
result   = RT_WriteFileList(IN_FILES,OUT_FILE)          # Create a listing file of Pic filenames
Assert((result!=0), "No files found")
FILELIST = RT_ReadTxtFromFile(OUT_FILE)                 # Get list of files
#RT_FileDelete(OUT_FILE)                                # we are done with the temp file
NFILES   = RT_TxtQueryLines(FILELIST)                   # Query Number of lines in String ie number of files.
RT_Debug("Found files = " + String(NFILES))

C=0                                                     # Dummy clip
For(i=0,NFILES-1) {
    FN=RT_TxtGetLine(FILELIST,i)                        # Filename
    tmpC = ImageSource(FN,end=0)
#    tmpC = LwLibavVideoSource(FN)
    C = (C.IsInt) ? TmpC : C + TmpC                     # All clips must be same size.
}
C # EDIT: OOps, forgot this
EDITED: still untested.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 28th January 2024 at 17:23.
StainlessS is offline   Reply With Quote
Reply


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 22:27.


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