Git Product home page Git Product logo

Comments (28)

Jack000 avatar Jack000 commented on June 25, 2024

weird. What does this give you?

find . -type d ! -path ".*/_*" | sort
find . -maxdepth 1 ! -path . ! -path ".*/_*" | sort

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

image

Desktop/gallery » find . -type d ! -path ".*/_*" | sort
.
./00 Anreise
./01 Valley of Fire
./02 Death Valley
./03 Red Rock Canyon
./04 Konferenz
./05 Zion Canyon
./06 Grand Canyon
./07 Abreise
Desktop/gallery » find . -maxdepth 1 ! -path . ! -path ".*/_*" | sort
./00 Anreise
./01 Valley of Fire
./02 Death Valley
./03 Red Rock Canyon
./04 Konferenz
./05 Zion Canyon
./06 Grand Canyon
./07 Abreise
Desktop/gallery » 

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

oh right, how about

find "/Users/npiccolotto/Desktop/gallery" -type d ! -path "/Users/npiccolotto/Desktop/gallery*/_*" | sort
find "/Users/npiccolotto/Desktop/gallery/02 Death Valley" -maxdepth 1 ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley" ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley*/_*" | sort

are there any errors for the 00 and 01 galleries?

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Hmmm, nope 😞

Desktop/gallery » find "/Users/npiccolotto/Desktop/gallery" -type d ! -path "/Users/npiccolotto/Desktop/gallery*/_*" | sort
/Users/npiccolotto/Desktop/gallery
/Users/npiccolotto/Desktop/gallery/00 Anreise
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire
/Users/npiccolotto/Desktop/gallery/02 Death Valley
/Users/npiccolotto/Desktop/gallery/03 Red Rock Canyon
/Users/npiccolotto/Desktop/gallery/04 Konferenz
/Users/npiccolotto/Desktop/gallery/05 Zion Canyon
/Users/npiccolotto/Desktop/gallery/06 Grand Canyon
/Users/npiccolotto/Desktop/gallery/07 Abreise

Desktop/gallery » find "/Users/npiccolotto/Desktop/gallery/00 Anreise" -maxdepth 1 ! -path "/Users/npiccolotto/Desktop/gallery/00 Anreise" ! -path "/Users/npiccolotto/Desktop/gallery/00 Anreise*/_*" | sort
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000001.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000001.md
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000003.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000003.md
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000012.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000012.md
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000014.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000014.md
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000016.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000016.md
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000030.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000030.md
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000031.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000031.md
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000033.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000033.md
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000041.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000041.md
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000057.jpg
/Users/npiccolotto/Desktop/gallery/00 Anreise/L1000057.md

Desktop/gallery » find "/Users/npiccolotto/Desktop/gallery/01 Valley of Fire" -maxdepth 1 ! -path "/Users/npiccolotto/Desktop/gallery/01 Valley of Fire" ! -path "/Users/npiccolotto/Desktop/gallery/01 Valley of Fire*/_*" | sort
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000061.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000061.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000070.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000070.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000078.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000078.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000088.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000088.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000102.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000102.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000107.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000107.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000134.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000134.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000139.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000139.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000140.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000140.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000147.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000147.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000151.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000151.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000153.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000153.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000154.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000154.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000165.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000165.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000180.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000180.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000181.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000181.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000201.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000201.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000207.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000207.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000229.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000229.md
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000241.jpg
/Users/npiccolotto/Desktop/gallery/01 Valley of Fire/L1000241.md

Desktop/gallery » find "/Users/npiccolotto/Desktop/gallery/02 Death Valley" -maxdepth 1 ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley" ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley*/_*" | sort
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000243.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000243.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000254.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000254.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000256.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000256.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000257.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000257.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000258.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000258.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.mp4
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000261.mp4
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000263.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000263.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000276.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000276.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.mp4
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000296.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000296.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000308.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000308.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000310.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000310.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000318.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000318.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000319.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000319.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000320.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000320.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000327.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000327.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000333.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000333.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000335.jpg

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

It seems to happen after a video file. If I remove files 260 and 261 from gallery 002, it happens at 284 which is after 280 (a video).

Reading files...............................................................................convert: unable to open image '/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg': No such file or directory @ error/blob.c/OpenBlob/2675.

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Not finished yet (encoding right now), but when I remove file 284 from gallery 02 as well, it works. So maybe just "bad" video files? Because I have some more videos…

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

hmm.. the problem is that these paths are wrong, probably not related to the files themselves. Even if the video -> still frame conversion fails, I don't see how it's affecting the next iteration of the loop..

here's a small test program. Save it anywhere and try to execute in the shell:

while read file
do

    echo "$file"

    format=$(identify -format "%m" "$file" 2>/dev/null | tr '[:upper:]' '[:lower:]')

    if [ "$format" != "jpeg" ] && [ "$format" != "png" ] && [ "$format" != "gif" ]
    then

        extension=$(echo "${filename##*.}" | tr '[:upper:]' '[:lower:]')

        # identify command may not be reliable, trust that extensions aren't lying if available
        if [ "$extension" = "jpg" ] || [ "$extension" = "png" ] || [ "$extension" = "gif" ]
        then
            format="$extension"
        else
            # must be a video file
            format="video"
        fi
    fi

    if [ "$format" = "video" ]
    then
        # any errors here?
        ffmpeg -loglevel error -y -i "$file" -vf "select=gte(n\,1)" -vframes 1 -qscale:v 2 test.jpg
    fi


done < <(find "/Users/npiccolotto/Desktop/gallery/02 Death Valley" -maxdepth 1 ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley" ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley*/_*" | sort)

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Heh, there it is again. See iccolotto and s/npiccolotto/....

/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.md: Invalid data found when processing input
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.mp4
At least one output file must be specified
iccolotto/Desktop/gallery/02 Death Valley/L1000261.mp4
iccolotto/Desktop/gallery/02 Death Valley/L1000261.mp4: No such file or directory
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000263.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000263.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000263.md: Invalid data found when processing input
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000276.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000276.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000276.md: Invalid data found when processing input
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.md: Invalid data found when processing input
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.mp4
At least one output file must be specified
s/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg
s/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg: No such file or directory
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.md: Invalid data found when processing input

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

alright, getting closer. How about just:

while read file
do
echo "$file"

done < <(find "/Users/npiccolotto/Desktop/gallery/02 Death Valley" -maxdepth 1 ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley" ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley*/_*" | sort)

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Nope, sorry.

/Users/npiccolotto/Desktop/gallery/02 Death Valley/.DS_Store
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000243.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000243.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000254.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000254.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000256.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000256.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000257.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000257.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000258.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000258.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.mp4
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000261.mp4
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000263.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000263.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000276.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000276.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.mp4
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000296.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000296.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000308.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000308.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000310.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000310.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000318.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000318.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000319.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000319.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000320.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000320.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000327.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000327.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000333.jpg
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000333.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000335.jpg

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

ok, then:

ffmpeg -loglevel error -y -i "/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.mp4" -vf "select=gte(n\,1)" -vframes 1 -qscale:v 2 test.jpg

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Works for all videos (260, 261, 280).

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

hm.. definitely something strange there. try this:

while read file
do

filename=$(basename "$file")
extension=$(echo "${filename##*.}" | tr '[:upper:]' '[:lower:]')

echo "$extension $filename $file"

if [ "$extension" = "mp4" ]
then
    # any errors here?
    ffmpeg -loglevel error -y -i "$file" -vf "select=gte(n\,1)" -vframes 1 -qscale:v 2 test.jpg
fi

echo "$file"

done < <(find "/Users/npiccolotto/Desktop/gallery/02 Death Valley" -maxdepth 1 ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley" ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley*/_*" | sort)

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Thanks for your patience, man! Leading slash gets stripped.

md L1000260.md /Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.md
mp4 L1000260.mp4 /Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.mp4
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000260.mp4
mp4 L1000261.mp4 Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000261.mp4
Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000261.mp4: No such file or directory
Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000261.mp4

/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.md
mp4 L1000280.mp4 /Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.mp4
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000280.mp4
jpg L1000284.jpg Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg
Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg
md L1000284.md /Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.md
/Users/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.md

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

I have patience in abundance : ]

yeah, some of those paths don't have a leading /, I'm not sure what could be causing that.

If you run that test script multiple times, are they always the same ones that are missing the /?
Do you see any pattern in which files are missing the /?

what if you remove the "| sort" from the end of

done < <(find "/Users/npiccolotto/Desktop/gallery/02 Death Valley" -maxdepth 1 ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley" ! -path "/Users/npiccolotto/Desktop/gallery/02 Death Valley*/_*" | sort)

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Aside from the fact that they are all videos I copied from my Android phone via Airdroid it seems pretty much random.

Edit: It seems more like the path name itself is contaminated. Whichever file (content does not matter) starts with the bad path name is determined erroneous by the test script.

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

I think I've replicated this on my mac, but for me it only errors when there are both .webm and .mp4 files in the same directory. (just mp4 or just webm, with the same files, gives no errors)

definitely very strange..

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Hmm, I don't have any webm's. For me the issue seems to be where the filename is in the list. I have one folder where even items are consistently broken.

Consider:

01.mp4
02.mp4
03.mp4
04.mp4

2 and 4 are kaputt. mv 04.mp4 00.mp4:

00.mp4
01.mp4
02.mp4
03.mp4

Now 1 and 3 are kaputt.

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

Order seems to matter on my end too, but it's every 3 files. If I have just a folder of mp4s the error also doesn't occur

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

What I also don't understand is why the path is "damaged" only after invoking ffmpeg. If you comment that part out everything looks like it should.

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

yeah I don't get it either. It's not even related to the files, merely invoking the ffmpeg decoder causes the error.

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

ok, so the problem seems to be that ffmpeg is eating the input somehow. Adding -nostdin to the ffmpeg command fixes it on my end.

I pushed a commit that should fix this issue, try it again now : ]

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Hm, not for me 😞

Desktop/gallery » rm -rf _site && expose -d
Draft mode On
Scanning directories.........
Populating nav.........
Reading files..........................................................................s/npiccolotto/Desktop/gallery/02 Death Valley/L1000261.mp4: No such file or directory
.......convert: unable to open image `rs/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg': No such file or directory @ error/blob.c/OpenBlob/2675.
convert: no images defined `txt:-' @ error/convert.c/ConvertImageCommand/3212.
identify: unable to open image `rs/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg': No such file or directory @ error/blob.c/OpenBlob/2675.
identify: unable to open image `rs/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg': No such file or directory @ error/blob.c/OpenBlob/2675.
identify: unable to open image `rs/npiccolotto/Desktop/gallery/02 Death Valley/L1000284.jpg': No such file or directory @ error/blob.c/OpenBlob/2675.
/Users/npiccolotto/Applications/Expose/expose.sh: line 424: [: : integer expression expected
/Users/npiccolotto/Applications/Expose/expose.sh: line 431: res*height/width: division by 0 (error token is "h")

Building HTML............................../Users/npiccolotto/Applications/Expose/expose.sh: line 459: [: : integer expression expected
/Users/npiccolotto/Applications/Expose/expose.sh: line 459: [: : integer expression expected
/Users/npiccolotto/Applications/Expose/expose.sh: line 459: [: : integer expression expected
/Users/npiccolotto/Applications/Expose/expose.sh: line 459: [: : integer expression expected
^C%        

But it does fix our test, running this on 02 gallery (or the whole folder with adjusted maxdepth) does not show bad paths:

#!/bin/bash
dir="/Users/npiccolotto/Desktop/gallery/02 Death Valley"
while read file
do

filename=$(basename "$file")
extension=$(echo "${filename##*.}" | tr '[:upper:]' '[:lower:]')

if [ "$extension" = "mp4" ]
then
    # any errors here?
    ffmpeg -nostdin -loglevel error -y -i "$file" -vframes 1 -qscale:v 2 test.jpg
fi


if [ "$extension" = "jpg" ]
then
    # any errors here?
    identify -format "%wx%h\n" "$file"
fi

echo "$file"

done < <(find "$dir" -maxdepth 1 ! -path "$dir" ! -path "$dir*/_*" | sort)

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

can't reproduce at the moment, so it'll be a bit tough again. But what if you replaced this line:

ffmpeg -loglevel error -nostdin -y -i "$filepath" -vf "select=gte(n\,1)" -vframes 1 -qscale:v 2 "$temppath" < /dev/null

with

echo "$filepath"

does it output a truncated path still? Are there any truncated paths from subsequent commands/errors?

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Okay, I tracked it down to this line (~350):

format=$(identify -format "%m" "$file" 2>/dev/null | tr '[:upper:]' '[:lower:]')

If I comment the format detection out and instead rely on the file extension, it works.

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

thanks for doing the legwork. It's election day here but I'll have a look when I get back.

identify shouldn't have the same issue ffmpeg did, not sure what could be causing this one.

from expose.

Jack000 avatar Jack000 commented on June 25, 2024

we're trusting the file extensions anyways, so I just removed that line

from expose.

prayerslayer avatar prayerslayer commented on June 25, 2024

Yay 🎉

from expose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.