transcoder icon indicating copy to clipboard operation
transcoder copied to clipboard

Issues with filenames containing spaces

Open dgibbard-cisco opened this issue 6 years ago • 3 comments

Hi there, I'm having some issues getting a clustered setup working, when using files which contain spaces, both streamed and SSH.

Server: Ubuntu 18.04 Encoding Client: Windows 10, Native SSH (not WSL), Streamed config or Mapped Drive config

With streaming, it successfully copies the file over and then reports:

dalgibbard@server:~$ pytranscoder -c home -p hevc_cuda /data/Videos/Films/Short\ Circuit\ 2\ \(1988\)/Short\ Circuit\ 2\ \(1988\)\ Remux-1080p.mkv
----------------------------------------
Host     : fullsteam (streaming)
Filename : Short Circuit 2 (1988) Remux-1080p.mkv
Profile  : hevc_cuda
ssh      : /usr/bin/ssh [email protected] -y -hwaccel cuvid -c:v h264_cuvid -i c:\temp\Short Circuit 2 (1988) Remux-1080p.mkv -preset slow -c:a copy -c:s copy -profile:v main -f matroska -cq:v 23 -rc vbr_hq -rc-lookahead 32 -b:v 1000K -maxrate:v 8M -c:v hevc_nvenc -map 0:0 -map 0:1 -map 0:2 c:\temp\Short Circuit 2 (1988) Remux-1080p.mkv.tmp

(fullsteam):  scp /data/Videos/Films/Short Circuit 2 (1988)/Short Circuit 2 (1988) Remux-1080p.mkv [email protected]:/c:\temp
(fullsteam):  Unknown error encoding on remote

Running the command against the successfully copied file manually gives:

C:\Users\dalgi>ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -i c:\temp\Short Circuit 2 (1988) Remux-1080p.mkv -preset slow -c:a copy -c:s copy -profile:v main -f matroska -cq:v 23 -rc vbr_hq -rc-lookahead 32 -b:v 1000K -maxrate:v 8M -c:v hevc_nvenc -map 0:0 -map 0:1 -map 0:2 c:\temp\Short Circuit 2 (1988) Remux-1080p.mkv.tmp
ffmpeg version git-2019-11-26-59d264b Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20191125
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 36.100 / 56. 36.100
  libavcodec     58. 62.100 / 58. 62.100
  libavformat    58. 35.100 / 58. 35.100
  libavdevice    58.  9.101 / 58.  9.101
  libavfilter     7. 67.100 /  7. 67.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
c:\temp\Short: No such file or directory

With the mapped drive it's a similar story, seems the quotes are being passed in, but not escaped, so they're dropped by the client?

dgibbard-cisco avatar Nov 26 '19 19:11 dgibbard-cisco

The plot thickens; i've tried dropping the spaces when using the mount option, and it's saying the file doesn't exist, but if i take that exact path and do a dir or just dump it into Explorer it opens up fine?:

$ pytranscoder -c home -p hevc_cuda /data/Videos/Films/Casino.Royale.2006/Casino.Royale.2006.HDTV-720p.mkv
----------------------------------------
Host     : fullsteam (mounted)
Filename : Z:\Videos\Films\Casino.Royale.2006\Casino.Royale.2006.HDTV-720p.mkv
Profile  : hevc_cuda
ffmeg    : -y -hwaccel cuvid -c:v h264_cuvid -i "Z:\Videos\Films\Casino.Royale.2006\Casino.Royale.2006.HDTV-720p.mkv" -preset slow -c:a copy -c:s copy -profile:v main -f matroska -cq:v 23 -rc vbr_hq -rc-lookahead 32 -b:v 1000K -maxrate:v 8M -c:v hevc_nvenc "Z:\Videos\Films\Casino.Royale.2006\Casino.Royale.2006.HDTV-720p.mkv.tmp"

(fullsteam):  Did not complete normally: /usr/bin/ssh [email protected] C:/ffmpeg/ffmpeg-20191126-59d264b-win64-static/bin/ffmpeg.exe -y -hwaccel cuvid -c:v h264_cuvid -i "Z:\Videos\Films\Casino.Royale.2006\Casino.Royale.2006.HDTV-720p.mkv" -preset slow -c:a copy -c:s copy -profile:v main -f matroska -cq:v 23 -rc vbr_hq -rc-lookahead 32 -b:v 1000K -maxrate:v 8M -c:v hevc_nvenc "Z:\Videos\Films\Casino.Royale.2006\Casino.Royale.2006.HDTV-720p.mkv.tmp"
(fullsteam):  Output can be found in /tmp/pytranscoder-fullsteam-424.log

$ cat /tmp/pytranscoder-fullsteam-424.log
ffmpeg version git-2019-11-26-59d264b Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20191125
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 36.100 / 56. 36.100
  libavcodec     58. 62.100 / 58. 62.100
  libavformat    58. 35.100 / 58. 35.100
  libavdevice    58.  9.101 / 58.  9.101
  libavfilter     7. 67.100 /  7. 67.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Z:\Videos\Films\Casino.Royale.2006\Casino.Royale.2006.HDTV-720p.mkv: No such file or directory

dgibbard-cisco avatar Nov 26 '19 19:11 dgibbard-cisco

Confirmed however that removing the spaces, and using streaming does work.

dgibbard-cisco avatar Nov 26 '19 19:11 dgibbard-cisco

Thanks for the exhaustive testing. I'll do some digging to see what the deal is. I've used it mostly with WSL but will concentrate on testing with native ffmpeg.

On Tue, Nov 26, 2019 at 2:34 PM dgibbard-cisco [email protected] wrote:

Confirmed however that removing the spaces, and using streaming does work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mlsmithjr/transcoder/issues/8?email_source=notifications&email_token=AAHRMTH4IPDUKMJJ6C5S7JDQVV25FA5CNFSM4JR4PFT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFHGFHA#issuecomment-558785180, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHRMTFN3J64PKMT5H3TCNLQVV25FANCNFSM4JR4PFTQ .

mlsmithjr avatar Nov 28 '19 02:11 mlsmithjr