Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompositeTVSimulator batch Processing(losing hair) #17

Open
tinyjapaneselunches opened this issue Feb 21, 2023 · 19 comments
Open

CompositeTVSimulator batch Processing(losing hair) #17

tinyjapaneselunches opened this issue Feb 21, 2023 · 19 comments

Comments

@tinyjapaneselunches
Copy link

Very new and accidentally left this in another issue folder. Can someone explain batch processing to me. I have everything set up the right way but don't get the process. If I'm just processing a folder, do I need the filename filled out? I did that and get a NullPointerException error. Also, if I do get this right...you just press 'b'? Do you press the play button first? Well I would think yes, obviously, but I'm just trying to make sense of all this.

@genmeblog
Copy link
Collaborator

Generally all of this scripts require some preparation, especially batch processing (sorry, no convenient gui :/ ).
Can I assume you can run a sketch and produce the result for a single file?
If answer is yes, do the following:

  1. create a subfolder, say images
  2. put all your images into this folder
  3. be sure this is set to your file extension .jpg for jpegs, .png for pngs.
  4. replace this line with String foldername = "./images";
  5. run the script
  6. press b and wait

@genmeblog
Copy link
Collaborator

One more thing came to my mind: set the filename to the exising file.

@genmeblog genmeblog mentioned this issue Feb 21, 2023
@tinyjapaneselunches
Copy link
Author

Sorry...just saw this. I can't run the script. This is what it says:
NullPointerException
"The file "./imagesimages.jpg" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable." All the settings you told me are the ones I just did and that's the error message I get. Also, when I run the script and get the error, it leads me down the code to a certain point and highlights this:
buffer.beginDraw();

Any ideas? Again....ultra Noob/Padawan here.

@tinyjapaneselunches
Copy link
Author

Just tried it again and now it's highlighting this:
buffer = createGraphics(img.width, img.height);

@genmeblog
Copy link
Collaborator

Ah, my bad, sorry!

Point 4 should be (slash / at the end of folder name):

replace this line with String foldername = "./images/";

@tinyjapaneselunches
Copy link
Author

Nope. Still the same message. It again brings me down to line 109 which is:
buffer = createGraphics(img.width, img.height);

I think this line of code is what needs to get changed maybe? Not sure, but the error message always leads me to this particlular line.

@tinyjapaneselunches
Copy link
Author

Can anyone answer this question for me? Kinda time sensitive.

@genmeblog
Copy link
Collaborator

Which version of Processing you are using? Should be 2.x
Can you run the version from github?
Do you have composite_video_simulator.pde and test.jpg files inside "composite_video_simulator/" folder?

@tinyjapaneselunches
Copy link
Author

I'm running 2.21. That was the recommended version from when I first downloaded the generateme scripts. I'll try running on the github version and get back to you ASAP. Everything is in their respective folders. I've been using these scripts for quite a while for artwork and this is the first time I'm trying batch processing. I'll let you know if the github version works in a minute.

@genmeblog
Copy link
Collaborator

ok, ready to support you

@genmeblog
Copy link
Collaborator

verifying also on my side

@genmeblog
Copy link
Collaborator

Ok. works on my side:

Folder structure is like that:

image

Setup is like following:

// set up filename
String filename = "test1";
String fileext = ".jpg";
String foldername = "./images/";

Press 'b'

[...]
test5.jpg... to YIQ
composite chroma lowpass
chroma to luma
preemphasis
video noise
chroma from luma
fm
chroma noise
chroma phase noise
vhs luma lowpass
vhs chroma lowpass
chroma vert blend
vhs sharpen
svideo out
chroma loss
composite recombination
composite chroma lowpass out
from YIQ
done
render scanlines
saved
results saved in ./images/A34630B7 folder

image

Please note that there should exist file "./images/test1.jpg".

@tinyjapaneselunches
Copy link
Author

I'll try this. Should they all be labeled as 'test' for the images?

@tinyjapaneselunches
Copy link
Author

I'll take that as a yes.

@tinyjapaneselunches
Copy link
Author

SUCCESS!!!!! That worked!! Thank you sooooo much! Now all I need to do is grow my hair back. This is awesome!!!

@genmeblog
Copy link
Collaborator

Great! Share the final result (if possible)!

@tinyjapaneselunches
Copy link
Author

I'm working on 2 computers but I'll transfer the files and upload the results.

@Apsynth00
Copy link

I had a problem with
-NullPointerException: My solution is check the format File for example if file Test is "Test.jpeg" You need put :
String filename = "Test"; // should have 4:3 ratio
String fileext = ".jpeg";
String foldername = "./";

//If the file is "test.jpg"

String filename = "Test"; // should have 4:3 ratio
String fileext = ".jpg";
String foldername = "./";

The photos almost always has a .Jpeg Format.

@genmeblog
Copy link
Collaborator

I'm pretty sure it should work on both .jpg and .jpeg extensions. Processing accepts both (this is the same format btw). I would verify file names (some filesystems are case sensitive some are not).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants