Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problems with dvd-slideshow and MANY pics [solved with ffmpe
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Tue Feb 28, 2012 9:57 am    Post subject: problems with dvd-slideshow and MANY pics [solved with ffmpe Reply with quote

i want to create a slideshow documenting the building of a building which was photographed around the clock by a webcam over 2,5 years. i have ~11GB of pictures in ~27k jpeg-files. The pictures were originally named YYYY-MM-DD_HH_MM_SS.sss.jpg (sss is millisecs). The whole slideshow should not be longer than 10-20 mins so one can watch the building "grow."

With the latest ~amd64-version of dvd-slideshow (0.8.4-1) its program to create the input-textfile (dir2slideshow) got stuck with a find-error
Code:
Paths must predede expressions (...)
no matter with what i replaced the underscores, hyphens or dots in the filenames. With a handmade textfile this version of dvd-slideshow could not find the files or complained about "invalid jpg file"

So i renamed the files to YYYY-MM-DD_HH_MM_SS-sss.jpg (eg. 2009-06-19_20_00_03-264.jpg) and emerged dvd-slideshow-0.8.2.2. This version created the textfile without problems (~27mb). Then i re-emerged the latest version again. It seemed to work with the textfile created with the older version.

After about 6 hrs of "Parsing the Input File" dvd-slidshow stalled at the second picture because it cannot find one of its tempfiles (which really isn't there):

Code:
[dvd-slideshow] Parsing input file out/b21-test-1.txt
[dvd-slideshow] ############################################################
[dvd-slideshow] Found 27142 images.
[dvd-slideshow] Found 0 audio files.
[dvd-slideshow] Found 1 background slides.
[dvd-slideshow] Found 0 title slides.
[dvd-slideshow] Found 27143 transitions (fadein/fadeout/crossfade/wipe).
[dvd-slideshow] Video: PAL 720x576 25fps 4:3
[dvd-slideshow] Audio: AC3 48000 256k
[dvd-slideshow] Debug=0  Autocrop=0 Subtitles=dvd Border=0
[dvd-slideshow] Using SMP optimizations for multi-processor machines
(...)
[dvd-slideshow] Total video length = 0:4:33.420
[dvd-slideshow] Temp dir is ...ome/ice/b21-pix/dvd-slideshow_temp_16920
[dvd-slideshow] Creating black background
[dvd-slideshow]############################################################
[dvd-slideshow] Creating black background
[dvd-slideshow]############################################################
[dvd-slideshow] Applying Fadein to next image 0:0:1.000
[dvd-slideshow]###########################################################
[dvd-slideshow] 1/27142 .../ice/b21-pix/2008-11-06_11_00_32-736.jpg 0:0:0.010
[dvd-slideshow] Subtitle= 2008-11-06_11_00_32-736.jpg
(...)
[dvd-slideshow]############################################################
[dvd-slideshow] Applying Crossfade between images 0:0:0.010
[dvd-slideshow]##########
cp: cannot stat `/home/ice/b21-pix/dvd-slideshow_temp_16920/fade_0001.ppm': No such file or directory
[dvd-slideshow] 2/27142 .../ice/b21-pix/2008-11-06_12_00_06-100.jpg 0:0:0.010
[dvd-slideshow] Subtitle= 2008-11-06_12_00_06-100.jpg
[dvd-slideshow]############################################################
[dvd-slideshow] Applying Crossfade between images 0:0:0.010
(STALL, but no error)


there is still an ffmpeg-process active in the background
top:
Code:
26627 ice       20   0  276m  14m 6088 S   0,0  0,4   0:00.32 ffmpeg -threads 4 -f yuv4mpegpipe -i /home/ice/b21-pix/dvd-slideshow_temp_16920/dvdss-pipe


Any ideas on how to solve this or better parameters for dvd-slideshow? I'll write another post for different slideshow-progs.
THX!
_________________
DUMM KLICKT GUT.


Last edited by DawgG on Wed Feb 29, 2012 12:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Tue Feb 28, 2012 8:46 pm    Post subject: Reply with quote

I can't answer your question as asked as I stopped using dvd-slideshow a while ago and started using ffmpeg instead, in order to get
far more precise control over the output. In particular I wanted to be able to make Slideshows of images that youtube would accept as High Defintion video. Of course ffmpeg will give you all sorts of outputs at all sorts of qualities and, if you wish, you can get an output that can be converted to and burned as a DVD.

After reading your post I did a test with DVD-slide-show and circa 30,000 images, and found it to be very slow. I killed it before letting it finish.

If you choose to try ffmpeg directly, I suggest that you rename your slides to the 00001.jpg, ..,0010.jpg, --etc naming scheme
using something like

Code:
let i=1
for v in *.jpg
do
mv $v $(printf %05d $i).JPG
let i=$i+1
done

or safer still
Code:
let i=1
for v in *.jpg
do
ln -s  $v $(printf %05d $i).JPG
let i=$i+1
done


To make an *.mp4 video of these I would use something like the following (you no doubt would want to tweak the parameters):

Code:
  ffmpeg -r 1  -i %5d.JPG -b 6000K  -r 30 -s  hd720 test.mp4

The -r1 means that one mage per second will be read, the -r30 means that the movie will be at 30frames per second.
the -s hd720 means that the movie will be in format 720p and the .mp4 causes the output to be in that format
Note that .mp4 is very flexible, so you could even use this:
Code:
   ffmpeg -r 1  -i %5d.JPG -b 4M  -r 1 -s  hd1080 test.mp4


The -b parameter needs to be tested with various values before your production run.
If it is too far off the optimum value, either too high or too low, ffmpeg will exit with an error message.
If ffmpeg runs it will still need tweeking to get a quality that you are satisfied with. I adjust it until the "q" that you see in the ffmpeg output
stays at or close to q=2.

Sorry that I can't help you with dvd-slideshow, but if you decide to proceed with ffmpeg and have any further questions, I would be happy
to try to answer them, if I can.

A couple of slide shows that I made this way can be seen at

http://www.youtube.com/watch?v=01b5YHWzTWM

and

http://www.youtube.com/watch?v=8v9R_4fXXf0

These are intended to look good in full screen mode with the youtube video quality set to hd1080p

PS Added in Edit: I am currently doing a circa 30,000 image slideshow using ffmpeg It is processing the images at 5 persecond.
I shall let you know how it turns out.
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Wed Feb 29, 2012 6:41 am    Post subject: Reply with quote

ffmpeg -r 1 -i %05d.jpg -r 1 -s hd720 -b 2M test.mp4

on 31096 images ran successfully in about 3 hours.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Wed Feb 29, 2012 12:20 pm    Post subject: Reply with quote

BIG BIG THANK YOU!
very good idea. i shamelessly copied your commands/scripts and now i'm playing around with it, i will definitely use that solution. i watched your youtube-videos and they look really good.
i had tried to use mencoder mf:// with xvid 2-pass but the output looked really shitty so i did not pursue that any further. dvd-slideshow is good but too dvd/mpeg2-centric, i think. what i liked was being able to use the filenames (like timestamps in my case) as subs so one could see the build progress with date and time.
i'll stick with ffmpeg.
THX AGAIN!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Wed Feb 29, 2012 4:20 pm    Post subject: Reply with quote

Glad to have been helpful and I really appreciate your thanks.

I'd be interested in seeing your video when it is done, if that is possible.

Added in Edit:

Another useful feature is the -aspect which sets the aspect ratio of the original images. Sometimes it is helpful, other times ffmpeg seems to figure it out on its own.

for example
I use the following on my photos taken with a D2X

Code:
  ffmpeg -r 1 -aspect 1.506  -i %5d.JPG -b 4M  -r 1 -s  hd1080 test.mp4 


and with photos taken on my wife's Fine Pix

Code:
  ffmpeg -r 1 -aspect 4:3  -i %5d.JPG -b 4M  -r 1 -s  hd1080 test.mp4 


Also useful might be information from

(1) https://forums.gentoo.org/viewtopic-t-914090-highlight-.html

(2) http://electron.mit.edu/~gsteele/ffmpeg/ (which got me started on this)

and

(3) http://kavli.nano.tudelft.nl/~gsteele/makegallery/

which includes a script for rotating portrait oriented photos to panorama before putting them in a slide show.
You likely will have to edit the parameters of that script to fit your particular situation.
If your original doesn't have *.EXIF info in it, then you will have to rotate the image manually before running it, but the script will still fit portraits into a panorama slide show. (If you don't do something like this, ffmpeg will distort the aspect ratio of your portrait slides, assuming that the first one is landscape.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Thu Mar 01, 2012 2:31 pm    Post subject: Reply with quote

Quote:
Glad to have been helpful and I really appreciate your thanks.

so welcome because it just works! :)
i'll see what i can do about showing you the video, but it actually belongs to my employer, and, aesthetically, it is not that great :wink: a webcam is just not a D2X. also, i'm not quite finished yet because there are different angles/cams for day and night, so the building "jumps" at the change.
i decided against using symlinks and did copies of the fiels instead, so it was possible to print the timestamp (extracted from the filename) into the pictures and strip the unnecessary stuff with convert.
the links you provide are also useful, THX!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Thu Mar 01, 2012 3:54 pm    Post subject: Reply with quote

Quote:
i'll see what i can do about showing you the video, but it actually belongs to my employer


I understand.


I think that this approach might be of interest to a lot of people. Do you think that it warrants some sort of gentoo doc,
and if so do you know how one gets such done? Perhaps if it comes to that, your experience would be helpful too.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum