Giter Site home page Giter Site logo

Comments (17)

gtatters avatar gtatters commented on May 29, 2024

hmm. I'm not sure. It works on my machine.

Could you provide more information on where you have the file stored, since the error looks like system2 is unable to write files to the location. This might be a windows problem since you need to keep the files in user locations where you have write permission. It also might be related to white space in your folder names, but I cannot tell since the since I do not know what path your system has.

Maybe ignore my SampleSEQ.seq file and just put your file on your home desktop and try from there. Please let me know if that works.

from thermimage.

shaktalerv avatar shaktalerv commented on May 29, 2024

thank for your reply

Could you provide more information on where you have the file stored
C:\Users\Rr\Documents\FLIR

I tried differents locations in my harddisc and others disc (C:, D:, E:)
now I proved
C:\Users\Rr\Desktop
setwd("C:/Users/Rr/Desktop")

same warning with the "SampleSEQ.seq" and my file in this location.

Note: My Windows account is Administrator.

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

and you have installed ffmpeg?

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

so, it's possible the problem was in how I detect OS of user and then call ffmpeg. I have added functionality to detect the OS and then call either 'ffmpeg" or "ffmpeg.exe", the latter being the windows version.

If you can re-install Thermimage from github, the updated functions should be in v 4.0.1 and I'd be happy to hear if they fixed the problem.

from thermimage.

shaktalerv avatar shaktalerv commented on May 29, 2024

and you have installed ffmpeg?
yes, in:
C:\ffmpeg and add FFmpeg to Windows Path, ffmpeg V4.2

If you can re-install Thermimage from github, the updated functions should be in v 4.0.1 and I'd be happy to hear if they fixed the problem.

same problem, I tried re installed pearl to W 64x (strawberry, ActivePerl. latest version) and ImageMagick. same Warning messages.

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

can you post the precise error message again. My changes should have led to something new happening.

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

next time you try, please set verbose = TRUE, and post the entire output

from thermimage.

shaktalerv avatar shaktalerv commented on May 29, 2024

can you post the precise error message again. My changes should have led to something new happening.

ffmpeg -r 30 -f image2 -vcodec tiff -s 640x480 -i "temp/frame%05d.tiff" -vcodec jpegls -s 640x480 "output/201603020001.SEQ.avi" -y

[1] FALSE
Warning messages:
1: In system2("ffmpeg", args = args, stdout = TRUE) :
running command '"ffmpeg" -r 30 -f image2 -vcodec tiff -s 640x480 -i "temp/frame%05d.tiff" -vcodec jpegls -s 640x480 "output/201603020001.SEQ.avi" -y' had status 1
2: In file.remove("./temp") :
cannot remove file './temp', reason 'Permission denied'

next time you try, please set verbose = TRUE, and post the entire output

fff files merged into thermalvid.raw file in temp folder.

Break thermalvid.raw video into separate files in temp folder:
perl.exe -f C:/Users/Rr/Documents/R/win-library/3.6/Thermimage/perl/split_tiff.pl < temp/thermalvid.raw

thermalvid.raw file split into tiff files in temp folder.

Convert files with call to ffmpeg:

ffmpeg -r 30 -f image2 -vcodec tiff -s 640x480 -i "temp/frame%05d.tiff" -vcodec jpegls -s 640x480 "output/201603020001.SEQ.avi" -y

[1] FALSE
Warning messages:
1: In system2("ffmpeg", args = args, stdout = TRUE) :
running command '"ffmpeg" -r 30 -f image2 -vcodec tiff -s 640x480 -i "temp/frame%05d.tiff" -vcodec jpegls -s 640x480 "output/201603020001.SEQ.avi" -y' had status 1
2: In file.remove("./temp") :
cannot remove file './temp', reason 'Permission denied'

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

let me try it all out on a windows machine to troubleshoot. I'll get back with an answer once I figure it out. the error above should say "running command "ffmpeg.exe" not "ffmpeg" for a windows machine. I'll see if I can work out why, and update here. Might take me a day.

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

making progress, but the problem is how windows handles system pipe commands and the perl scripts. Thermimage was designed for mac / unix environments, and so these windows issues pop up. I'm going to have to re-write the perl script to work with little endian more effectively between OSs. I managed to replicate most of your issues above on a windows 7 machine, so now I have a path forward. But other things have arisen that might delay a fix.

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

So I think I have a working version now. Still v4.0.1 if you want to re-install and try again. I edited the perl script, and tried to simplify matters for myself in the future. I have tested on Windows 10, R 3.6.1. I had to remember how to add perl and ffmpeg to the path before I could get it all working.

I'll close the comment for now, but please respond if I have created new problems.

from thermimage.

shaktalerv avatar shaktalerv commented on May 29, 2024

I updated to v4.0.1
Same problem

convertflirVID(f, exiftoolpath="installed", perlpath="installed",
               fr=30, res.in=res.in, res.out=res.in, outputcompresstype="jpegls", outputfilenameroot=NULL,
               outputfiletype="avi", outputfolder="output", verbose=T)
fff files merged into thermalvid.raw file in temp folder. 


Break thermalvid.raw video into separate files in temp folder:
perl.exe  -f C:/Users/Rr/Documents/R/win-library/3.6/Thermimage/perl/split_tiff.pl < temp/thermalvid.raw

thermalvid.raw file split into tiff files in temp folder. 



Convert files with call to ffmpeg:


ffmpeg -r 30 -f image2 -vcodec tiff -s 640x480 -i "temp/frame%05d.tiff" -vcodec jpegls -s 640x480 "output/201603020001.SEQ.avi" -y

[1] FALSE
Warning messages:
1: In system2("ffmpeg", args = args, stdout = TRUE) :
  running command '"ffmpeg" -r 30 -f image2 -vcodec tiff -s 640x480 -i "temp/frame%05d.tiff" -vcodec jpegls -s 640x480 "output/201603020001.SEQ.avi" -y' had status 1
2: In file.remove("./temp") :
  cannot remove file './temp', reason 'Permission denied'
> 

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

i don't think the update is taking effect. I made changes to the output so I could keep track of error messages, and the text above is from 4.0.0. Are you removing the old package and then installing using devtools::install_github("gtatters/Thermimage")?

Alternatively, could you consider downloading the convertflirVID.R function from here, https://github.com/gtatters/Thermimage/blob/master/R/convertflirVID.R, rename it to convertflirVID2 locally, place into your local environment (i.e. run the function to save to memory), and see if your code above works in place of the one in the package?

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

another idea is could you run the following from your Rstudio environment and tell me what the output is:

Sys.info()["sysname"]

I am assuming it is "Windows" but maybe I've made an assumption about different OS.

from thermimage.

shaktalerv avatar shaktalerv commented on May 29, 2024

reinstalled v4.0.1. (devtools::install_github("gtatters/Thermimage"))

output png

201603020001 SEQ00009

1st stage completed.

Thanks a lot!

from thermimage.

shaktalerv avatar shaktalerv commented on May 29, 2024

I am assuming it is "Windows" but maybe I've made an assumption about different OS.

Sys.info () ['sysname']
sysname
"Windows"

from thermimage.

gtatters avatar gtatters commented on May 29, 2024

excellent!! Phew. Hope it stops giving you grief. I guess the package didn't fully install/overwrite the older version.

from thermimage.

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.