Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errno::ENOENT: No such file or directory #9

Closed
ttseng opened this issue Sep 27, 2013 · 10 comments
Closed

Errno::ENOENT: No such file or directory #9

ttseng opened this issue Sep 27, 2013 · 10 comments

Comments

@ttseng
Copy link

ttseng commented Sep 27, 2013

When I try running the thumbnailer on my video, I get the error:

Errno::ENOENT: No such file or directory

Here are my logs:

Started POST "/videos" for 127.0.0.1 at 2013-09-27 15:52:34 -0400
Processing by VideosController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"5lMoFtM5Rrdu4Ra8ut8rD3jYv3FJ0cxo38QW5ATw9ZQ=", "video"=>{"project_id"=>"4", "step_id"=>"22", "saved"=>"true", "embed_url"=>"", "video_path"=>#<ActionDispatch::Http::UploadedFile:0x007fc09b974420 @original_filename="2013-08-02 17.19.02.mp4", @content_type="video/mp4", @headers="Content-Disposition: form-data; name="video[video_path]"; filename="2013-08-02 17.19.02.mp4"\r\nContent-Type: video/mp4\r\n", @tempfile=#File:/var/folders/dc/c0nfvwy96lq7p4ll94mklnmr0000gp/T/RackMultipart20130927-20398-qyz4qz>}, "button"=>""}
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Project Load (0.2ms) SELECT "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1 [["id", "4"]]
Running....ffmpegthumbnailer -i /Users/.../Website/public/uploads/tmp/1380311554-20398-7589/thumb_2013-08-02_17.19.02.mp4 -o /Users/.../Website/public/uploads/tmp/1380311554-20398-7589/tmpfile.png -c png -q 10 -s 158 -f
Success!
Errno::ENOENT: No such file or directory - (/Users/.../Website/public/uploads/tmp/1380311554-20398-7589/tmpfile.png, /Users/.../Website/public/uploads/tmp/1380311554-20398-7589/thumb_2013-08-02_17.19.02.mp4)

This is what my uploader file looks like:

class VideoPathUploader < CarrierWave::Uploader::Base
include CarrierWave::Video
include CarrierWave::Video::Thumbnailer

process encode_video: [:mp4]

Choose what kind of storage to use for this uploader:

storage :fog

Override the directory where uploaded files will be stored.

This is a sensible default for uploaders that are meant to be mounted:

def store_dir
"#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end

version :thumb do
process thumbnail: [{format: 'png', quality: 10, size: 158, strip: true, logger: Rails.logger}]
def full_filename for_file
png_name for_file, version_name
end
end

def png_name for_file, version_name
%Q{#{version_name}_#{for_file.chomp(File.extname(for_file))}.png}
end

end

@ttseng
Copy link
Author

ttseng commented Sep 27, 2013

I confirmed that ffmpegthumbnailer works when I run the command by itself in the command line:

ffmpegthumbnailer -i thumb_Untitled.mov -o tmpfile.png

However, it doesn't seem to be working using the thumbnail process outlined in the readme.

@ttseng ttseng closed this as completed Sep 27, 2013
@ttseng ttseng reopened this Sep 27, 2013
@argent-smith
Copy link
Contributor

/Users/.../Website/public/uploads/tmp/1380311554-20398-7589/tmpfile.png

Is this file actually there?

@argent-smith
Copy link
Contributor

Looks like it doesn’t find a tmp file in place when it’s going to process it further.

@ttseng
Copy link
Author

ttseng commented Sep 28, 2013

yes, that's the problem; it says that it successfully runs ffmpegthumbnailer, but it hasn't actually saved the file.

@argent-smith
Copy link
Contributor

Hmm.. I’ll try to reproduce it. BTW, is it 100% reproducible on your
machine?

2013/9/28 ttseng notifications@github.com

yes, that's the problem; it says that it successfully runs
ffmpegthumbnailer, but it hasn't actually saved the file.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-25306561
.

Yours truly, Pavel.

@ttseng
Copy link
Author

ttseng commented Sep 29, 2013

yes, it's reproducible. do you have some sample code besides what's in the README? I'm using the exact same code that's there, and my app can't seem to save the tmpfile.

@argent-smith
Copy link
Contributor

Thanks for the report. I’ll try to make a test app ASAP.

2013/9/29 ttseng notifications@github.com

yes, it's reproducible. do you have some sample code besides what's in the
README? I'm using the exact same code that's there, and my app can't seem
to save the tmpfile.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-25314232
.

Yours truly, Pavel.

@argent-smith
Copy link
Contributor

BTW what OS are you using to run the app?

2013/9/29 ttseng notifications@github.com

yes, it's reproducible. do you have some sample code besides what's in the
README? I'm using the exact same code that's there, and my app can't seem
to save the tmpfile.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-25314232
.

Yours truly, Pavel.

@ttseng
Copy link
Author

ttseng commented Sep 29, 2013

I'm using OS X 10.8.5 and using Rails 3.2.14

@ttseng
Copy link
Author

ttseng commented Oct 2, 2013

I found the issue! It was having problems with my path, which had spaces. Once I got rid of the spaces, it worked correctly!

@ttseng ttseng closed this as completed Oct 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants