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

Spaces Not Handled in FFmpeg Path #70

Closed
Polychronopolis opened this issue Jul 24, 2020 · 1 comment · Fixed by #73
Closed

Spaces Not Handled in FFmpeg Path #70

Polychronopolis opened this issue Jul 24, 2020 · 1 comment · Fixed by #73
Assignees
Labels
Milestone

Comments

@Polychronopolis
Copy link

Polychronopolis commented Jul 24, 2020

Apologies as I'm not very familiar with GitHub etiquette. I have found a bug and can suggest code modification but couldn't seem to figure out how to start a pull request.

It appears that spaces are not properly handed in the FFmpeg path variable. In digging through the code, spaces in the Handbrake path are properly handled.

My FFmpeg path is set to C:\Program Files (x86)\VideoProc

At line 39 in Get-Codec.ps1, this code will fail:
$ffprobeCMD = cmd.exe /c "$ffprobe $ffprobeArgs"

The error indicates a problem with incorrect path quoting .
cmd.exe : 'C:\Program' is not recognized as an internal or external command,

Updating the code to this allows the path to be properly quoted:
$ffprobeCMD = cmd.exe /c ""$ffprobe" $ffprobeArgs"

Line 120 in ConvertFile.ps1 should be updated to
$ffCMD = cmd.exe /c ""$ffmpeg" $ffArgs"

Line 14 in GetAudioStreams.ps1 should be updated to

[int[]] $audioStreamArray = cmd.exe /c ""$ffprobe" $ffprobeArgs"

The post is stripping out the escape characters, but quoting the reply will show their placement...

@BrianDMG BrianDMG self-assigned this Aug 4, 2020
@BrianDMG BrianDMG added the Bug label Aug 4, 2020
@BrianDMG BrianDMG added this to the 4.2 milestone Aug 4, 2020
BrianDMG added a commit that referenced this issue Aug 4, 2020
@BrianDMG BrianDMG mentioned this issue Aug 4, 2020
@BrianDMG
Copy link
Owner

BrianDMG commented Aug 4, 2020

Hey, thanks for pointing this out, I appreciate you bringing it to my attention! I had already escaped for handbrake failover, so it was an oversight on my part. In the future, feel free to create a PR with the suggested changes if you like, happy to merge it and have you show as a project contributor.

@BrianDMG BrianDMG mentioned this issue Aug 4, 2020
BrianDMG added a commit that referenced this issue Aug 4, 2020
- Improved metadata parsing
- Bug fixes
   - Closes #67
   - Closes #68
   - Closes #70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants