Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

File Path Issue #4

Open
wants to merge 1 commit into from

3 participants

@TheKidCoder

When trying to load up a file that had spaces in the directory path, FFMpeg was throwing errors. Threw in a quick gsub method to add an escape slash.

@anatol

I see the same issue with filenames that have spaces. Is there any chance to see this bugfix accepted?

@jgnewman

I'm also seeing this issue with spaces in file names. Any word on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 13, 2011
  1. @TheKidCoder
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/rvideo/inspector.rb
View
6 lib/rvideo/inspector.rb
@@ -43,7 +43,7 @@ def initialize(options = {})
file = options[:file]
@filename = File.basename(file)
@path = File.dirname(file)
- @full_filename = file
+ @full_filename = make_unix_safe(file)
raise TranscoderError::InputFileNotFound, "File not found (#{file})" unless FileTest.exist?(file.gsub("\"",""))
@raw_response = `#{@ffmpeg_binary} -i #{@full_filename} 2>&1`
else
@@ -515,6 +515,10 @@ def fps
end
private
+
+ def make_unix_safe(path)
+ return path.gsub(/\s+/, "\\ ")
+ end
def bitrate_match
/bitrate: ([0-9\.]+)\s*(.*)\s+/.match(@raw_metadata)
Something went wrong with that request. Please try again.