Thread Locked This thread is locked - replies are not allowed.


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 71 - Pages: 5 [ Previous | 1 2 3 4 5 | Next ] - Last Post: 4 Aug 18, 17:32 Last Post By: RobM
RobM

Posts: 3,982
Registered: 4-Aug-2006
Re: Help requested on debugging ext tool on Windows
Posted: 10 Jul 18, 21:45   in response to: RobM in response to: RobM
 
I've rewritten the code, attached, using Ctwist's recommended way of getting the paths to linked objects.
Also moved all of the generated text files to .jalbum subfolder, inline with new jAlbum protocol.

The video is moved from the .jalbum folder to the actual folder after it has been made, hopefully that will fix the clash. If anyone can test it, if it does run properly can you also check if all videos are properly set to 'Do not re-encode'? They should show the small camera icon in the top right of the thumbnails.

It still needs a bit more tidying up, so it isn't the final version, going to set a minimum number of images needed for a movie to be made and allow album wide slideshow to have its own audio track.

Edited by: RobM on 12-Jul-2018 23:54
removed tool, see http://jalbum.net/forum/message.jspa?messageID=328001#328001
JeffTucker

Posts: 8,330
Registered: 31-Jan-2006
Re: Help requested on debugging ext tool on Windows
Posted: 10 Jul 18, 22:19   in response to: RobM in response to: RobM
 
New, different problems.

First, the good news. No crash.

But....

  • The MP4 remains in .jalbum - it doesn't get moved. So, that might still trigger the crash.
  • If I specify both an album-wide and a folder MP4, I get only the album-wide.
  • If I specify only a folder MP4, I get a video only for the top level. It doesn't touch any other folders. There's a .txt file in the folder, but no video.
  • Until I exit jAlbum, the video that's produced is showing a small file size, and can't be played. When I exit jAlbum, the file size jumps up to what it should be, and the video can be played. This suggests that a stream is being left open by the tool.
RobM

Posts: 3,982
Registered: 4-Aug-2006
Re: Help requested on debugging ext tool on Windows
Posted: 10 Jul 18, 22:34   in response to: JeffTucker in response to: JeffTucker
 
jGromit wrote:
New, different problems.

First, the good news. No crash.

But....

  • The MP4 remains in .jalbum - it doesn't get moved. So, that might still trigger the crash.
  • If I specify both an album-wide and a folder MP4, I get only the album-wide.
  • If I specify only a folder MP4, I get a video only for the top level. It doesn't touch any other folders. There's a .txt file in the folder, but no video.
  • Until I exit jAlbum, the video that's produced is showing a small file size, and can't be played. When I exit jAlbum, the file size jumps up to what it should be, and the video can be played. This suggests that a stream is being left open by the tool.
I'm guessing the script din't finish, no popup window saying so. If so then it looks like for Windows I'd have to split the script into two parts, one to make the videos and another to move them. That sucks.

Not sure where to go from here, give up maybe?
JeffTucker

Posts: 8,330
Registered: 31-Jan-2006
Re: Help requested on debugging ext tool on Windows
Posted: 10 Jul 18, 22:43   in response to: RobM in response to: RobM
 
I still think this might be better as an option in NoPages, where at least some of these issues wouldn't arise. The MP4 would be planted in the output directory, for example.

I'll take a run at it in August, when I get back from my next excursion. I'll split the take with you. In fact, for an up-front payment of $1.98, I'll sell you the income stream for the next year. That would put me up $1.98, and put you down by the same amount.
RobM

Posts: 3,982
Registered: 4-Aug-2006
Re: Help requested on debugging ext tool on Windows
Posted: 10 Jul 18, 23:01   in response to: JeffTucker in response to: JeffTucker
 
jGromit wrote:
I still think this might be better as an option in NoPages, where at least some of these issues wouldn't arise. The MP4 would be planted in the output directory, for example.

I'll take a run at it in August, when I get back from my next excursion. I'll split the take with you. In fact, for an up-front payment of $1.98, I'll sell you the income stream for the next year. That would put me up $1.98, and put you down by the same amount.

With so much at stake I’ll have a play at skinning the code just for Windows users, for the Mac I’ll revert the code so the movies just go straight where they belong.
ctwist

Posts: 422
Registered: 27-Sep-2003
Re: Help requested on debugging ext tool on Windows
Posted: 11 Jul 18, 05:34   in response to: RobM in response to: RobM
 
I noticed that the declaration of processFolderContent is wrong. Change "overwrite" to "Boolean overwrite". Add a return type "void".
BTW I am not testing; I just happened to notice.

I am probably sounding like a broken record, but Eclipse or Netbeans finds errors like this at compile time; this speeds up debugging considerably.
RobM

Posts: 3,982
Registered: 4-Aug-2006
Re: Help requested on debugging ext tool on Windows
Posted: 11 Jul 18, 10:02   in response to: ctwist in response to: ctwist
 
ctwist wrote:
I noticed that the declaration of processFolderContent is wrong. Change "overwrite" to "Boolean overwrite". Add a return type "void".
BTW I am not testing; I just happened to notice.

I am probably sounding like a broken record, but Eclipse or Netbeans finds errors like this at compile time; this speeds up debugging considerably.

Guilty as charged, I switched to Netbeans for skins but not for tools as tools are not compiled and BeanShell is more forgiving. I’ll try editing tool code in Netbeans in future.
ctwist

Posts: 422
Registered: 27-Sep-2003
Re: Help requested on debugging ext tool on Windows
Posted: 11 Jul 18, 15:56   in response to: RobM in response to: RobM
 
RobM wrote:
I switched to Netbeans for skins but not for tools as tools are not compiled and BeanShell is more forgiving.
A tool can be compiled, in which case it becomes a .jaext file e.g. http://jalbum.net/forum/thread.jspa?threadID=54051

I am not a big fan of BeanShell's "forgiving" feature. I would rather fix syntax errors than leave it to BeanShell to work out what I intended. With Eclipse's or Netbean's assistance, this only takes a few minutes.
RobM

Posts: 3,982
Registered: 4-Aug-2006
Re: Help requested on debugging ext tool on Windows
Posted: 11 Jul 18, 21:22   in response to: ctwist in response to: ctwist
 
ctwist wrote:
RobM wrote:
I switched to Netbeans for skins but not for tools as tools are not compiled and BeanShell is more forgiving.
A tool can be compiled, in which case it becomes a .jaext file e.g. http://jalbum.net/forum/thread.jspa?threadID=54051

I am not a big fan of BeanShell's "forgiving" feature. I would rather fix syntax errors than leave it to BeanShell to work out what I intended. With Eclipse's or Netbean's assistance, this only takes a few minutes.

Time for another confession, I have looked at some of the plugin NetBeans project files and am just overwhelmed, not knowing what to do, even harder to understand when some don't even open in NetBeans without problems to be fixed.

I looked at your Settings Converter, which has the source code but I'm a monkey see monkey do coder, I need to see a whole NetBeans package, then I can start to hack away trying to do my own thing.

What I think is missing from the developer docs is some nice and easy 'Hello World' type NetBeans projects, really simple examples of how to do the basics.
RobM

Posts: 3,982
Registered: 4-Aug-2006
Re: Help requested on debugging ext tool on Windows
Posted: 11 Jul 18, 22:57   in response to: RobM in response to: RobM
 
A Windows version of the tool is attached, if it runs then it is proof of Windows messing about.
(Although it also seems to have cured the mood atom warning I get sometimes)

All I have done is make the videos in the album's slides folders instead of in the project's.
This would be the same as putting it in a skin, like noPages.

The obvious issue is that there will be no link to the videos, so either they need moving into the project or the skin needs to (maybe be modified) to have a link to them as an option.

The other way of using the script is to use it in finally.bsh of any skin wanting to support such a whacky idea.

Not tidied up either version of the skin's code beyond changing the method to void and making overwrite a Boolean. Still have the minimum number of images to add.

Edited by: RobM on 11-Jul-2018 23:39
Now checks for a slides folder and makes one if it is missing from the album folder

Edited by: RobM on 12-Jul-2018 23:56
Removed tool see http://jalbum.net/forum/message.jspa?messageID=328001#328001
MarkusD

Posts: 866
Registered: 13-Apr-2006
Re: Help requested on debugging ext tool on Windows
Posted: 11 Jul 18, 23:54   in response to: RobM in response to: RobM
 
Hi Rob,

I used the script with the "Sample Portfolio", I checked all options in the scripts options dialog, pressed <OK> and got immediately a dialog "MP4 slidesho create | Slide show movies created, please update the view (Menu/View/Update). I don't have any movies, nor script files for ffmpeg.

Console says:
Sample expressions:
4*(3+2); // Basic calculations
engine.getSkin(); // Use of implicit object
for (AlbumObject ao : selectedObjects) System.out.println(ao); // Iterate over selected objects
window.messageBox("You can interact with any Java object");
Line 275: Method processFolderContent for folder Sample Portfolio
Line 275: Method processFolderContent for folder Sample Portfolio
Line 275: Method processFolderContent for folder People
Line 275: Method processFolderContent for folder Nature
Line 275: Method processFolderContent for folder Objects
Line 275: Method processFolderContent for folder Travel


Stupid me, I forgot to make the album in the first place. OK, again. Starting your script, the status line of JA says: "Making video for folder people", the CPU-value in the Task-Manager goes up to 100% for a second, but still no video files at all. Even when I quit JA, nothing else happens.

Console output see attached file.

It's late, I'm going to bed. ;-)
RobM

Posts: 3,982
Registered: 4-Aug-2006
Re: Help requested on debugging ext tool on Windows
Posted: 12 Jul 18, 00:49   in response to: MarkusD in response to: MarkusD
 
Updated the Windows tool in the previous post.
The Sample Portfolio does not have images in the root folder and there was no 'slides' folder in the album's root folder. The updated (11 July first line of the log) script now creates slides folders if needed.

The script (album_slideshow_files.txt and slideshow_files.txt) have been made but are now in the hidden .jalbum subfolders of the project, along with albumfiles.txt.

It looks like on Windows any problem with file processing in ffmpeg just stops the script dead, on my Mac the Sample portfolio was just missing the album-wide slideshow, the others got made.

The new version should fix it, hopefully.
RobM

Posts: 3,982
Registered: 4-Aug-2006
Re: Help requested on debugging ext tool on Windows
Posted: 12 Jul 18, 01:01   in response to: RobM in response to: RobM
 
And it’s late here too, and I’m to bed now, but before I go a note:
If you are testing it and have problems put a few images in the root folder. Since I moved the video creation to the album I haven’t yet checked for no images in a folder, I just wanted to see if Windows would run the script to completion and if doing it this way would be considered acceptable, that is needing to move the videos or add a link to them via the skin used.
RobM

Posts: 3,982
Registered: 4-Aug-2006
Re: Help requested on debugging ext tool on Windows
Posted: 13 Jul 18, 00:53   in response to: RobM in response to: RobM
 
New file with further changes, try it with a local copy of the Sample Portfolio project first.

You can now set a minimum number of images needed to make a slideshow movie, from 3 to 30.

The root folder can have its own audio track, use 'album_" + audio name set in the tools GUI, eg. set 'slideshow.mp3' for all other folders and add to the root folder 'album_slideshow.mp3' for the album wide video.

I can see no reason for this not to work on Windows now, except for maybe an inherent issue processing ffmpeg via a jAlbum scripted tool.
JeffTucker

Posts: 8,330
Registered: 31-Jan-2006
Re: Help requested on debugging ext tool on Windows
Posted: 13 Jul 18, 01:27   in response to: RobM in response to: RobM
 
RobM wrote:
I can see no reason for this not to work on Windows now....

Lack of imagination. ;)

Many, many problems. With a simple no-folders project, I get an MP4 in the output slides directory, but it's only 189KB, and can't be played. Once I exit jAlbum, the size bounces up to 898KB, and the video is fine. As I said earlier, this shows all the signs of a stream being left open by the tool.

With a project with a couple of folders, using default settings on the tool, I get no videos at all, anywhere. No crash, but no videos. If I blank out the album-wide file name, I get a video for the first folder, but not for any more. And once again, the file is unusable until I exit jAlbum.

If I run it again, it makes a video for the second folder, and no more. And so on....

The results are different if I tell it to make videos just for the folders, but not album-wide, or vice-versa. And I often get a popup telling me that there's nothing that needs to be done, even though it hasn't produced the videos I've asked for. Very, very difficult to test, because I keep having to wade into the project files and delete the slideshow text files, which seem to be what's convincing the tool that it has no work to be done.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums