lemonjesus/TranscodeBot

Unable to FORCE_CMD

wesley5040 opened this issue · 2 comments

Setting the env var FORCE_CMD to, for the above sub type:

ffmpeg -y -i \"$input\" -map 0:v:0 -map 0:a -map 0:s? -max_muxing_queue_size 9999 -c:v libx265 -preset fast -x265-params crf=22:qcomp=0.8:aq-mode=1:aq_strength=1.0:qg-size=16:psy-rd=0.7:psy-rdoq=5.0:rdoq-level=1:merange=44 -c:a copy -c:s srt \"$output\"

Gives this in the log:

I, [2021-02-01T05:08:09.567491 #1]  INFO -- : TranscodeBot started
I, [2021-02-01T05:08:09.567863 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e01 - The Summer Palace.mp4
I, [2021-02-01T05:08:09.567886 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e05 - Tern Haven.mp4
I, [2021-02-01T05:08:09.567943 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e09 - DC.mp4
I, [2021-02-01T05:08:09.567967 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e07 - Return.mp4
I, [2021-02-01T05:08:09.567988 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e10 - This Is Not for Tears.mp4
I, [2021-02-01T05:08:09.568001 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e04 - Safe Room.mp4
I, [2021-02-01T05:08:09.568020 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e08 - Dundee.mp4
I, [2021-02-01T05:08:09.568040 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e06 - Argestes.mp4
I, [2021-02-01T05:08:09.568059 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e03 - Hunting.mp4
I, [2021-02-01T05:08:09.568078 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e02 - Vaulter.mp4
I, [2021-02-01T05:08:10.568937 #1]  INFO -- : working on /input/tv/Succession (2018)/Season 2/Succession - s02e02 - Vaulter.mp4 -> /output/tv/Succession (2018)/Season 2/Succession - s02e02 - Vaulter.mkv
I, [2021-02-01T05:08:10.569244 #1]  INFO -- : not correcting permisions on /tmp/tv/Succession (2018)/Season 2 - FMODE, UID, or GID missing.
I, [2021-02-01T05:08:10.835107 #1]  INFO -- : transcoding /input/tv/Succession (2018)/Season 2/Succession - s02e02 - Vaulter.mp4
#<Thread:0x00005593b7e251d0@TranscodeBot.rb:117 run> terminated with exception (report_on_exception is true):
TranscodeBot.rb:58:in `gsub!': can't modify frozen String (FrozenError)
	from TranscodeBot.rb:58:in `transcode'
	from TranscodeBot.rb:95:in `process_file'
	from TranscodeBot.rb:120:in `block (2 levels) in <main>'
	from TranscodeBot.rb:118:in `loop'
	from TranscodeBot.rb:118:in `block in <main>'

Still crashes:

I, [2021-02-01T23:20:12.059033 #1]  INFO -- : TranscodeBot started

I, [2021-02-01T23:20:12.059364 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e01 - The Summer Palace.mp4

I, [2021-02-01T23:20:12.059391 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e05 - Tern Haven.mp4

I, [2021-02-01T23:20:12.059414 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e09 - DC.mp4

I, [2021-02-01T23:20:12.059437 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e07 - Return.mp4

I, [2021-02-01T23:20:12.059490 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e10 - This Is Not for Tears.mp4

I, [2021-02-01T23:20:12.059519 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e04 - Safe Room.mp4

I, [2021-02-01T23:20:12.059619 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e08 - Dundee.mp4

I, [2021-02-01T23:20:12.059635 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e06 - Argestes.mp4

I, [2021-02-01T23:20:12.059677 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e03 - Hunting.mp4

I, [2021-02-01T23:20:12.059695 #1]  INFO -- : enqueuing /input/tv/Succession (2018)/Season 2/Succession - s02e02 - Vaulter.mp4

I, [2021-02-01T23:20:13.059763 #1]  INFO -- : working on /input/tv/Succession (2018)/Season 2/Succession - s02e01 - The Summer Palace.mp4 -> /output/tv/Succession (2018)/Season 2/Succession - s02e01 - The Summer Palace.mkv

I, [2021-02-01T23:20:13.060165 #1]  INFO -- : not correcting permisions on /tmp/tv/Succession (2018)/Season 2 - FMODE, UID, or GID missing.

I, [2021-02-01T23:20:13.123223 #1]  INFO -- : transcoding /input/tv/Succession (2018)/Season 2/Succession - s02e01 - The Summer Palace.mp4

E, [2021-02-01T23:20:13.147631 #1] ERROR -- : Error processing /input/tv/Succession (2018)/Season 2/Succession - s02e01 - The Summer Palace.mp4:

E, [2021-02-01T23:20:13.147704 #1] ERROR -- : ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers

  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)

  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/opt/ffmpeg/include -I/opt/ffmpeg/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/opt/ffmpeg/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/'

  libavutil      56. 22.100 / 56. 22.100

  libavcodec     58. 35.100 / 58. 35.100

  libavformat    58. 20.100 / 58. 20.100

  libavdevice    58.  5.100 / 58.  5.100

  libavfilter     7. 40.101 /  7. 40.101

  libavresample   4.  0.  0 /  4.  0.  0

  libswscale      5.  3.100 /  5.  3.100

  libswresample   3.  3.100 /  3.  3.100

  libpostproc    55.  3.100 / 55.  3.100

: No such file or directory


#<Thread:0x000055a20d8b9688@TranscodeBot.rb:117 run> terminated with exception (report_on_exception is true):

TranscodeBot.rb:102:in `process_file': undefined local variable or method `queue' for main:Object (NameError)

	from TranscodeBot.rb:120:in `block (2 levels) in <main>'

	from TranscodeBot.rb:118:in `loop'

	from TranscodeBot.rb:118:in `block in <main>'

The stacktrace is actually an error - but the transcode error appears to be FFMPEG complaining that it can't find the file.