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


Permlink Replies: 56 - Pages: 4 [ Previous | 1 2 3 4 ] - Last Post: 14 Jul 17, 22:59 Last Post By: RobM Threads: [ Previous | Next ]
RobM

Posts: 3,820
Registered: 4-Aug-2006
Re: Images to movie with ffmpeg
Posted: 11 Jul 17, 22:22   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
It seems that I'm a hopeless case. I tried your latest bsh file with the JA sample album. I created the album with <F9> and then opened "Tools|External tools|images to video". The message "MP4 slideshows created" appeared in a fraction of a second. I then watched the whole output folders, no MP4 file at all, but several "slideshow_files.txt" files. Context e. g.

I do have a file "C:\Users\MDrück\AppData\Roaming\jAlbum\bin\ffmpeg.exe" dated 06/24/2017, (36,3 MB (38 119 936 byte)), so it should be fine to start the ffmpeg.exe for the script.

Please tell me that I'm doing something terribly wrong. ;-)

Well, you are using Windows, which in my book is doing something far worse than terribly wrong ;)

Can you open the tool in a text editor and change line 234 from
Boolean debugTool = false;//change to true when debuging
to
Boolean debugTool = true;	//change to true when debuging
Then quit jAlbum, relaunch it with your project and then run the tool. Open the system console (F7) and copy the text, then paste it into a text document and attach it to a reply here. I can then see exactly what ffmpeg is doing.
RobM

Posts: 3,820
Registered: 4-Aug-2006
Re: Images to movie with ffmpeg
Posted: 11 Jul 17, 22:51   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
I'm going to take a wild guess that the problem will be in your path, specifically MDrück - UTF encoding needed again.

From a quick search there doesn't seem to be an easy way around this, it looks like something you might need to do with your Java environment - JAVA_TOOL_OPTIONS can be used to specify this property, normally done like this:
java -Dfile.encoding=UTF-8 … com.x.Main
MarkusD

Posts: 627
Registered: 13-Apr-2006
Re: Images to movie with ffmpeg
Posted: 12 Jul 17, 20:07   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Open the system console (F7) and copy the text, then paste it into a text document and attach it to a reply here. I can then see exactly what ffmpeg is doing.

Here we go:
jAlbum 13.10 system console running BeanShell (BeanShell Engine)
This section captures debug prints sent to System.out and System.err
The top section evaluates expressions.
Press Ctrl+E to evaluate an expression. (Evaluates selected text if selection is active)
You have access to the basic jAlbum implicit objects such as engine and window
 
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");
Make album: 3.191s
writing to C:\Users\MDrück\Pictures\2017 05 23 ausgebüxte Bienen\2017 05 23 ausgebüxte Bienen\slideshow_files.txt
Standard output of the command:
 
Errors and details of the command (if any):
 
ffmpeg version N-76278-gd897d4c Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      55.  4.100 / 55.  4.100
  libavcodec     57. 10.100 / 57. 10.100
  libavformat    57. 11.100 / 57. 11.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 14.100 /  6. 14.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
[concat @ 0000022ea753b0a0] Impossible to open 'C:\Users\MDrück\Pictures\JAlbum\Neuigkeiten/C:\Users\MDrück\Pictures\JAlbum\Neuigkeiten\2017 05 23 ausgebüxte Bienen -> C:\Users\MDrück\Pictures\2017 05 23 ausgebüxte Bienen\2017 05 23 ausgebüxte Bienen/P1170363.JPG'
C:\Users\MDrück\Pictures\JAlbum\Neuigkeiten/album_slideshow_files.txt: Invalid argument
Standard output of the command:
 
Errors and details of the command (if any):
 
ffmpeg version N-76278-gd897d4c Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      55.  4.100 / 55.  4.100
  libavcodec     57. 10.100 / 57. 10.100
  libavformat    57. 11.100 / 57. 11.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 14.100 /  6. 14.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
C:\Users\MDrück\Pictures\JAlbum\Neuigkeiten\2017 05 23 ausgebüxte Bienen -> C:\Users\MDrück\Pictures\2017 05 23 ausgebüxte Bienen\2017 05 23 ausgebüxte Bienen/slideshow_files.txt: Invalid argument


Today I decide to reincarnate as: Markus Schmitt, Rosenweg 7, Berlin. And all the problems with "strange" characters are gone. OK, and never travel to München, Tromsø, Svolvær, Malmö... What a dogs's life... ;-)

Thanks.
MarkusD

Posts: 627
Registered: 13-Apr-2006
Re: Images to movie with ffmpeg
Posted: 12 Jul 17, 20:16   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
I'm going to take a wild guess that the problem will be in your path, specifically MDrück - UTF encoding needed again.

From a quick search there doesn't seem to be an easy way around this, it looks like something you might need to do with your Java environment - JAVA_TOOL_OPTIONS can be used to specify this property, normally done like this:
java -Dfile.encoding=UTF-8 … com.x.Main

How would I change this setting on my Windows machine? I searched for "JAVA_TOOL_OPTIONS" in the Registry, found nothing. Searching for "Java" just gives to many results.
karlmistelberger

Posts: 124
Registered: 5-Dec-2013
Re: Images to movie with ffmpeg
Posted: 12 Jul 17, 21:13   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
Today I decide to reincarnate as: Markus Schmitt, Rosenweg 7, Berlin. And all the problems with "strange" characters are gone. OK, and never travel to München, Tromsø, Svolvær, Malmö... What a dogs's life... ;-)

Actually this is overkill. Two years ago I created http://karlmistelberger.jalbum.net/D%C3%BCck/

A few minutes ago I created http://mistelberger.net/Sample%20Portfolio/D%C3%BCck/index.html which contains a nice slideshow. jAlbum and its helpers deal with all Unicode entities properly, even this one: U+1F595 aka 🖕
MarkusD

Posts: 627
Registered: 13-Apr-2006
Re: Images to movie with ffmpeg
Posted: 12 Jul 17, 21:54   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
The creation of the album is not the problem, that works fine. It seems that one function which gets the path to the ffmpeg.exe-file is the trouble maker. I'll create a new user (mdrueck) on my windows machine and try what happens when I use the script.
karlmistelberger

Posts: 124
Registered: 5-Dec-2013
Re: Images to movie with ffmpeg
Posted: 12 Jul 17, 22:04   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
The creation of the album is not the problem, that works fine. It seems that one function which gets the path to the ffmpeg.exe-file is the trouble maker. I'll create a new user (mdrueck) on my windows machine and try what happens when I use the script.

How would I change this setting on my Windows machine?

You may try to set the environment as described here:

https://www.computerhope.com/issues/ch000549.htm

You need to create a new variable, if it isn't already there.
RobM

Posts: 3,820
Registered: 4-Aug-2006
Re: Images to movie with ffmpeg
Posted: 12 Jul 17, 22:07   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
The error is due to part of the paths not being read as UTF8 encoded. There are two instances in your readout of
C:\Users\MDrück\Pictures\JAlbum\Neuigkeiten/ 
Elsewhere, specifically the paths to the images in the slideshow_files.txt files, your user name is encoded correctly.

That indicates the error is at line 208, in the use of
String imageFolder = ao.getFile().toString().replaceAll(" ","\\ ");
In this line 'ao' (an albumObject) is the folder being processed, it is just returning the path to that folder, the script then adds the slideshow image list file, for example "/slideshow_files.txt".

If I make a project with the 'imageFolder' having a path of '/Users/robert/MDrück test' I get the following output
writing to /Users/robert/MDrück test/2017 05 23 ausgebÅxte Bienen/MDrück/slideshow_files.txt
writing to /Users/robert/MDrück test/2017 05 23 ausgebÅxte Bienen/ausgebÅxte/slideshow_files.txt
imageFolder = /Users/robert/MDrück test
imageFolder = /Users/robert/MDrück test/2017 05 23 ausgebÅxte Bienen/MDrück
imageFolder = /Users/robert/MDrück test/2017 05 23 ausgebÅxte Bienen/ausgebÅxte


How would I change this setting on my Windows machine? I searched for "JAVA_TOOL_OPTIONS" in the Registry, found nothing. Searching for "Java" just gives to many results.
No idea, sorry, I keep well away from that stuff as it is bad for your health.
RobM

Posts: 3,820
Registered: 4-Aug-2006
Re: Images to movie with ffmpeg
Posted: 12 Jul 17, 22:36   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
Today I decide to reincarnate as: Markus Schmitt, Rosenweg 7, Berlin. And all the problems with "strange" characters are gone. OK, and never travel to München, Tromsø, Svolvær, Malmö... What a dogs's life... ;-)
I am with the BBC, never found the need for diacriticals. I must admit though a non-native english speaker might not know how to pronounce our borrowed foreign words unless it is one of their own.
karlmistelberger

Posts: 124
Registered: 5-Dec-2013
Re: Images to movie with ffmpeg
Posted: 14 Jul 17, 14:33   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Making some progress.
The attached now:
Respects excluded images
Respects file order
Works with links
Works with diacriticals marks

Made some real test and converted 43,000 jpegs to 1354 slideshows in 46 seconds, the load of each of the 4 processors being exactly 100,00%. images to video.bsh is well done! :-)
RobM

Posts: 3,820
Registered: 4-Aug-2006
Re: Images to movie with ffmpeg
Posted: 14 Jul 17, 14:50   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:
RobM wrote:
Making some progress.
The attached now:
Respects excluded images
Respects file order
Works with links
Works with diacriticals marks

Made some real test and converted 43,000 jpegs to 1354 slideshows in 46 seconds, the load of each of the 4 processors being exactly 100,00%. images to video.bsh is well done! :-)

Thanks for confirming it works on such a large scale without memory issues :)

I'm having a break before I trying it with the filter effects using the command line. If I can get a cross fade that way I can try to figure out how to wrap it up to work with the tool. I'm still open to collaboration though if anyone knows how to do it through the Java Process method ;)
RobM

Posts: 3,820
Registered: 4-Aug-2006
Re: Images to movie with ffmpeg
Posted: 14 Jul 17, 22:59   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Updated the tool here with a bug fix - auto exclude audio track wasn't working. Added note to check file encoding is set to UTF8 and a link to a sample album.
Legend
Forum admins
Helpful Answer
Correct Answer

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