Syntax error

Here you can submit bugreports
Post Reply
bartcuijpers
Posts: 13
Joined: Wed Jun 14, 2017 4:35 pm

Syntax error

Post by bartcuijpers »

I get a syntax error in a relative simple workflow using FFAS 1.4.0.1, the same flow works fine in 1.3.1.
See log and workflow attached.
Attachments
Thumb.json
workflow
(6.57 KiB) Downloaded 319 times
20240211-1427-2964-818d-7e4254d09fde.json
logfile
(94.69 KiB) Downloaded 312 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Syntax error

Post by emcodem »

Hi bart,

@FranceBB is always interested in avisynth related issues.
Maybe meanwhile you can collect and upload the affected .avs file from the job_work directory, it has a name like *enc_stills.avs, e.g.
1-0-0~240211142733297~16304~20240211-1329-5294-5191-1d08a8c60794~enc_stills.avs
emcodem, wrapping since 2009 you got the rhyme?
User avatar
FranceBB
Posts: 264
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: Syntax error

Post by FranceBB »

OK, I can see that you're trying to index an 8bit RGBA FULL HD PNG.

"@type": "Image",
"Count": "130",
"StreamCount": "1",
"StreamKind": "Image",
"StreamKind_String": "Image",
"StreamKindID": "0",
"Format": "PNG",
"Format_String": "PNG",
"Format_Info": "Portable Network Graphic",
"Format_Commercial": "PNG",
"Format_Compression": "Deflate",
"InternetMediaType": "image/png",
"Width": "1920",
"Width_String": "1 920 pixels",
"Height": "1080",
"Height_String": "1 080 pixels",
"PixelAspectRatio": "1.000",
"DisplayAspectRatio": "1.778",
"DisplayAspectRatio_String": "16:9",
"ColorSpace": "RGBA",
"BitDepth": "8",
"BitDepth_String": "8 bits",
"Compression_Mode": "Lossless",
"Compression_Mode_String": "Lossless",
"StreamSize": "2481165",
"StreamSize_String": "2.37 MiB (100%)",
"StreamSize_String1": "2 MiB",
"StreamSize_String2": "2.4 MiB",
"StreamSize_String3": "2.37 MiB",
"StreamSize_String4": "2.366 MiB",
"StreamSize_String5": "2.37 MiB (100%)",
"StreamSize_Proportion": "1.00000"


and in your workflow you're trying to resize to FULL HD and re-encode to PNG

Image

You're getting Validate: Script error: syntax error from Avisynth in the resize node.
I tested it against a similarly specced clip and I got the same result (i.e I was able to reproduce):

Image

By analyzing the validation.txt we can see that the issue occurred at line 10, column 40 of the AVS Script, so:

Code: Select all

LoadPlugin("\\mibctvan000\Ingest\MEDIA\temp\FFAStrans 1.4.0.1 Stable\processors\ffmpeg\x64\plugins+\ImageSeq.dll")
LoadCplugin("\\mibctvan000\Ingest\MEDIA\temp\FFAStrans 1.4.0.1 Stable\processors\AVS_plugins\JPSDR\x64\plugins_JPSDR.dll")
video = ImageSource("d:\.ffastrans_work_root\20240211-1137-4525-4975-86fa842ff669\20240213-1330-3044-79ad-5faddd6993f4\1-2-2~240213133133894~21304~20240211-1331-2841-3c6f-ebf1d5d13ffe~dec_stills.png", start = 0, end = 249, fps = 25)
audio = BlankClip(video, audio_rate=48000, sixteen_bit=true)
audio = GetChannel(audio, 1,1)
m_clip = AudioDub(video, audio)
m_clip = AssumeFieldBased(m_clip)
m_clip = propSet(m_clip, "_FieldBased", 0)
m_clip = propSet(m_clip, "_Matrix", 0)
m_clip = propSet(m_clip, "_Primaries", )
m_clip = propSet(m_clip, "_Transfer", )
Return m_clip

and indeed we screwed up, 'cause we're not really setting any value for Primaries and Transfers in the new frame properties.
Arrrrrrrg frame properties, my hate for them just increased...

It should have been:

Code: Select all

m_clip = propSet(m_clip, "_Primaries", 1)
m_clip = propSet(m_clip, "_Transfer", 1)
Return m_clip
or whatever the values for your clip are.
This is a bug in the Stills decoder.
I found the lines incriminated and it's the fact that prime and transf in src.video.cspace fail to be retrieved and therefore are never populated.
I'll fix it and I'll give you a new processors.a3x.
If it works, I'll open a pull request so that Grandmaster Steinar can review it and eventually it will be part of the next release.

Oh I almost forgot: thank you a lot for spotting this! Once again this shows that it doesn't matter how hard we test, it's always the users that make the difference and help us in discovering new bugs, so thank you for finding and reporting this! :)
User avatar
FranceBB
Posts: 264
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: Syntax error

Post by FranceBB »

Temporary fix in attachment.
Please swap it in the "FFAStrans 1.4.0.1 Stable\Processors" folder.
processors.a3x
(871.93 KiB) Downloaded 373 times
Image
Image
Post Reply