events.action: opened
events.author: mmccoo
events.masked_author: username_0
events.text: <!--
  
  Hi!
  
  Thanks for taking the time to submit a feature request or bug report. Please try to fill out the relevant fields, and remove any irrelevant section from this template.
  
  -->
  
  This is mostly a set of observations. Even if my feature suggestions are stupid, note that I had some missing files (light gallery). Once I copied the files, I went from no video, to everythings a ok.
  
  ## Feature request
  1) ability to give two separate max heights for video and pics. I'd like to limit the size of final output. I'm not really trying to build a page, but rather a way to browser what I have on my system. Copying video at higher resolutions defeats this purpose
  
  2) perhaps the ability to just link to the original file instead of making a copy?
  
  3) the ability to add metadata to the album view. For videos, I'd like to see the length. For pics, the resolution. Kinda like an adobe lightroom view.
  
  4) one of the other issues expressed annoyance at failure on the first corrupt image. First, it didn't really tell me "hey, I think this image is corrupt". Instead it just said "unexpected error." Secondly, it stopped after the first one (what if I have a bunch?). Last, a placeholder, "dude, I had trouble with this image" and moving on, would have been preferred.
  
  5) in debug mode, it could be useful to have a listing of cmd line invocations of gm. Then i can rerun it myself and see why gm croaks. Once I get gm to run, I have confidence that thumbsup will work
  
  
  ## Bug report
  
  I'm running on arch linux. I had to copy light gallery js's (to public/light-gallery/js) to get video to work. I think you had an issue on this before.
  
  to fnd this, I opened the page in chrome's inspect page and saw some load errors. not everyone would know to do this.
  
  I'm running thumbsup 2.3.1 installed through arch pkg manager.
  
  also, note that on arch, the dependency on gcc6 made thumbsup a pain to install.
  
  hope it's helpful.
  Miles
  
  If running as an npm package:
  
  ```
  Thumbsup version: __________
  Node version: __________
  NPM version: __________
  Operating system: __________
  ```
  
  If running as a Docker container:
  
  ```
  Thumbsup image tag: __________
  Docker version: __________
  Operating system: __________
  ```
  
  About the bug...
  
  - Are you getting an error message?
  - Have you tried running `DEBUG="*" thumbsup <args>` to get more troubleshooting info?
  - Is the behavior different from expected?
  - Can you provide steps to reproduce the issue?
events.title: Observations on getting thumbsup to work (awful title. sorry)
events.type: issue
events.action: created
events.author: rprieto
events.masked_author: username_1
events.text: Hi @username_0, thanks a lot for all the comments.
  
  1. this is a good idea. Current the max height only applies to photos. Video are only transcoded to `libx264` and down-sampled to `1200k` - I'll admit, arbitrary bitrate that I thought was acceptable. I'll have a look at resizing videos, otherwise what do you think about a configurable bitrate? Or both?
  2. You should be able to do this already with `--download-photos link` or `--download-photos symlink` (see https://thumbsup.github.io/docs/3-configuration/output-settings/). Let me know if it doesn't work.
  3. Do you mean rendering the metadata on the HTML pages? For example right under the thumbnail? This could be a good idea for a "give me all the info you have" theme. Custom there should be available very soon, keep an eye on https://github.com/thumbsup/thumbsup/issues/97.
  4. That's a very good point. I understand how it could even make someone give up if it happens on the first try. I'll have a think about how to implement your idea.
  5. Can you try `--log trace`? Let me know if that's not enough info.
  6. About lightgallery, that's very strange. I'm about to push a big change to master that changes how lightgallery is installed, do you mind trying again maybe when I'm finished?
  
  Cheers!
events.type: comment
events.action: created
events.author: rprieto
events.masked_author: username_1
events.text: Hi, (4) above is fixed on master, it now move on and print a summary at the end. The log file containd all errors, including the exact `gm` command.
  
  I’ll close this issue and open a new one for (1) about the video size. Thanks for all the feedback!
events.type: comment
events.action: closed
events.author: rprieto
events.masked_author: username_1
events.type: issue
events.action: created
events.author: mmccoo
events.masked_author: username_0
events.text: hello,
  
  I'm glad the feedback was helpful. With bug reports, I never know how much
  the author actually cares. From your reply, I get the sense that you care
  very much, so here are a couple addtions:
  
  
  Reducing video size
  ============
  On video size, I'll give an example. I have a folder representing my wife's
  phone from 2017.
  the original is 23GB. The thumbsup gallery is 7.3GB. Of that, total mp4
  size is 15GB -> 6GB
  
  I don't -really- know how much can be squeezed out, but there two thoughts
  that come to mind. First, instead of bitrate, use/allow giving a crf value. see
  here <https://trac.ffmpeg.org/wiki/Encode/H.264>. Theoretically, this would
  say "this is how bad/bad the video needs to be while hopefully using
  minimal space". Reducing resolution may also be more effective than
  bitrates or quality factors. I'm far from an expert on this.
  
  I did an experiment. I took that largest video from my wife's area.
  
  original size is 1.3G
  
  the mp4 in my thumbsup area is:
  443M Jun  8 18:42
  ./robie_2017/media/large/2017/02/18/170218-VID_20170218_094254.mp4
  
  Using a 1200k bitrate that you mentioned before
  ffmpeg -i
  /bubba/picturesDS_2017/robie_phone/2017/02/18/170218-VID_20170218_094254.mp4
  -f mp4 -c:a copy -c:v libx264 -b:v 1200k 1200k.mp4
  
  86M Jun 11 11:21 1200k.mp4  - quality is noticeably worse but given the
  size reduction, there are scenarios where I could be happy. It might enable
  her to keep on a card on her phone.
  
  Theoretically, it should be about the same size as the one generated by
  thumbsup
  
  Using the defaults to libx264 (medium and crf 23)
  ffmpeg -i
  /bubba/picturesDS_2017/robie_phone/2017/02/18/170218-VID_20170218_094254.mp4
  -f mp4 -c:a copy -c:v libx264 -preset medium -crf 23 crf23_medium.mp4
  
  the size reduces to 441M
  
  
  pushing it a bit:
  for crf in 27 30 34 36 40; do
     ffmpeg -i
  /bubba/picturesDS_2017/robie_phone/2017/02/18/170218-VID_20170218_094254.mp4
  -f mp4 -c:a copy -c:v libx264 -preset medium -crf $crf crf${crf}_medium.mp4
  done
  
  441M Jun 11 10:35 crf23_medium.mp4
  86M   Jun 11 11:21 1200k.mp4
  264M Jun 11 12:05 crf27_medium.mp4
  185M Jun 11 12:41 crf30_medium.mp4
  121M Jun 11 13:10 crf34_medium.mp4
  100M Jun 11 13:44 crf36_medium.mp4
  71M   Jun 11 13:55 crf40_medium.mp4
  
  
  The default thumbsup behavior is probably better than trying to push the
  limits of bitrates and such. A new user would likely be disappointed with
  the 1200k bitrate. If you make someone explicitly use a lower quality
  they'll explicitly know to expect quality degradation.
  
  Still, it doesn't seem to be using the 1200k you mentioned.
  
  I didn't try changing the resolution. I could if you'd like.
  
  On linking
  ======
  I reran with this cmdline
  thumbsup --download-videos symlink --download-photos  symlink --input
  /bubba/picturesDS_2017/robie_phone  --output .
  
  I then searched for a random mp4.
  original size is 257M
  
  In the thumbs area, I see these:
  lrwxrwxrwx 1 username_0 audio 76 Jun 11 10:44
  ./robie_2017_linked/media/original/2017/08/31/170831-VID_20170831_182040.mp4
  ->
  /bubba/picturesDS_2017/robie_phone/2017/08/31/170831-VID_20170831_182040.mp4
  -rw-r--r-- 1 username_0 audio 6.3K Jun 11 10:44
  ./robie_2017_linked/media/thumbs/2017/08/31/170831-VID_20170831_182040.jpg
  -rw-r--r-- 1 username_0 audio 223K Jun 11 10:44
  ./robie_2017_linked/media/large/2017/08/31/170831-VID_20170831_182040.jpg
  -rw-r--r-- 1 username_0 audio 72M Jun 11 10:55
  ./robie_2017_linked/media/large/2017/08/31/170831-VID_20170831_182040.mp4
  
  compared to my previous run
  -rw-r--r-- 1 username_0 audio 223K Jun  8 16:26
  ./robie_2017/media/large/2017/08/31/170831-VID_20170831_182040.jpg
  -rw-r--r-- 1 username_0 audio 95M Jun  8 16:45
  ./robie_2017/media/large/2017/08/31/170831-VID_20170831_182040.mp4
  -rw-r--r-- 1 username_0 audio 6.3K Jun  8 16:26
  ./robie_2017/media/thumbs/2017/08/31/170831-VID_20170831_182040.jpg
  
  I still see the one in the "large" directory at 72M. I had expected it to
  be gone. In other words, I had thought that when clicking to play the
  video, it would have gone directly to the original with no intermediate
  necessary.
  On the one hand, I'd like a small, self contained page structure that my
  wife could use to see the basics of of old pics. If needed she/I could then
  get the original somewhere else
  On the other hand, I want a simple html wrapper around her stuff. The
  originals would still be online (all this is mostly on our home network)
  but why eat up more space than necessary.
  
  
  
  
  
  On metadata and themes.
  ================
  
  I like the idea of themes. different people will want their data in
  different places. From the 30 secconds I skimmed the themes documentation,
  I only saw look and feel stuff. Would things like video duration, image
  resolution, time of day be supported. Per image/video things. I imagine
  that allowing exiftool style tags as placeholders could be a generic path.
  
  On log trace, I don't see the cmdline that shrinks the video. I see the
  creation of the big image for before the user clicks play (I think that's
  what I'm seeing) and the thumbnail. But not the recompression of the video.
  I've pasted the log trace below.
  
  
  
  
  
  On light gallery missing stuff.
  ==================
  
   I tried reinstalling using npm and I couldn't get it to install. I'm not a
  node guy so that's my fault. I'm using the arch linux install.
  
  
  
  On log trace
  =======
  
  thumbsup:info Finished [title changed] +0ms
    thumbsup:info media/thumbs/VID-20170519-WA0003.jpg [title changed] +0ms
    thumbsup:debug video:thumbnail from
  /bubba/picturesDS_2017/robie_phone/2017/05/19/VID-20170519-WA0003.mp4 to
  /tres/thumbsDS/test/media/thumbs/VID-20170519-WA0003.jpg +882ms
    thumbsup:trace ffmpeg exited with code 0 +0ms
    gm gm "identify" "-ping" "-format" "%[EXIF:Orientation]"
  "/tres/thumbsDS/test/media/thumbs/VID-20170519-WA0003.jpg" +2s
    gm gm "convert" "-quality" "90"
  "/tres/thumbsDS/test/media/thumbs/VID-20170519-WA0003.jpg" "-resize"
  "120x120^" "-gravity" "Center" "-crop" "120x120+0+0" "+profile" "\"*\""
  "+comment" "/tres/thumbsDS/test/media/thumbs/VID-20170519-WA0003.jpg" +47ms
    thumbsup:info Processing media (10/18) [title changed] +865ms
    thumbsup:info Finished [title changed] +1ms
    thumbsup:info media/large/VID-20170519-WA0003.jpg [title changed] +0ms
    thumbsup:debug video:poster from
  /bubba/picturesDS_2017/robie_phone/2017/05/19/VID-20170519-WA0003.mp4 to
  /tres/thumbsDS/test/media/large/VID-20170519-WA0003.jpg +866ms
    thumbsup:info Processing media (11/18) [title changed] +126ms
    thumbsup:info Finished [title changed] +1ms
    thumbsup:info media/large/VID-20170519-WA0003.mp4 [title changed] +0ms
    thumbsup:debug video:resized from
  /bubba/picturesDS_2017/robie_phone/2017/05/19/VID-20170519-WA0003.mp4 to
  /tres/thumbsDS/test/media/large/VID-20170519-WA0003.mp4 +127ms
    thumbsup:info Processing media (12/18) [title changed] +61ms
    thumbsup:info Finished [title changed] +0ms
  
  
  
  
  so, I hope all that is not TMI but hopefully you managed to slog through it
  all.
  
  Miles
events.type: comment