lisamelton / other_video_transcoding

Other tools to transcode videos.
MIT License
543 stars 24 forks source link

[Eval @ 0x16f2d0810] Undefined constant or missing '(' in 'bt470bg' #121

Closed johncoxon closed 2 years ago

johncoxon commented 2 years ago

Trying to transcode some files and I'm getting a weird error. The files are all off the first disc of a four-disc set, and the other three discs worked fine; it's just this one that's failing. I have ffmpeg 4.4_2 installed according to homebrew, and I'm on an M1 iMac. The output from Terminal is below.

John@Yavin ~ % other-transcode --add-audio "eng" --add-subtitle "auto" --add-subtitle "eng" Movies/MakeMKV/Ross\ Noble\ -\ Randomist.mkv 
Verifying "ffprobe" availability...
Verifying "ffmpeg" availability...
Verifying "mkvpropedit" availability...
Finding encoders...
Trying "h264_videotoolbox" video encoder...
Scanning media...
duration = 01:55:47.88
Stream mapping:
 0 = h264_videotoolbox / 1500 Kbps
 1 = copy
 2 = copy
 3 = dvd_subtitle
Command line:
ffmpeg -loglevel error -stats -i Movies/MakeMKV/Ross\ Noble\ -\ Randomist.mkv -map 0:0 -filter:v yadif -c:v h264_videotoolbox -b:v 1500k -color_primaries:v bt470bg -color_trc:v bt470bg -colorspace:v bt470bg -metadata:s:v title\= -disposition:v default -map 0:1 -c:a:0 copy -metadata:s:a:0 title\= -disposition:a:0 default -map 0:2 -c:a:1 copy -metadata:s:a:1 title\= -disposition:a:1 0 -map 0:3 -c:s:0 copy -disposition:s:0 0 -metadata:g title\= -default_mode passthrough Ross\ Noble\ -\ Randomist.mkv
Transcoding...
[h264_videotoolbox @ 0x13c846600] [Eval @ 0x16ce44810] Undefined constant or missing '(' in 'bt470bg'
[h264_videotoolbox @ 0x13c846600] Unable to parse option value "bt470bg"
[h264_videotoolbox @ 0x13c846600] Error setting option color_trc to value bt470bg.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
/opt/homebrew/lib/ruby/gems/3.0.0/bin/other-transcode: transcoding failed: Ross Noble - Randomist.mkv
lisamelton commented 2 years ago

@johncoxon I'm sorry you're having this problem. This is a known bug with certain DVD content. See issue #112 for more details. The good news is that I'm working on a fix already.

johncoxon commented 2 years ago

I looked through to see whether it was a known bug but I hadn't put two and two together to match this to that one – glad to hear that it's already in the works! Thanks for a great tool.

lisamelton commented 2 years ago

@johncoxon OK, I have finally checked in the workaround for this problem. My apologies for the long delay. Please test it if you are able. Thanks! I hope to release it soon.

johncoxon commented 2 years ago

I am travelling till tomorrow but will be able to test tomorrow evening and/or Monday!

sweaver2 commented 2 years ago

I was hitting this issue, and grabbing the latest off master solved it. Thanks!

johncoxon commented 2 years ago

I installed with gem and this is the only thing I've ever used that's ruby, so I'm not sure how to safely install this by cloning the repo – what's the equivalent of python setup.py install for this?

skj-dev commented 2 years ago

other-transcode is a self contained script. If you clone the repository and either copy the two files in /bin, or symlink them into /usr/local/bin then they will work. This is the approach I take, since I don't normally interact with Ruby things.

sweaver2 commented 2 years ago

I had never had to install a gem from head, wound up using another gem called specific_install

johncoxon commented 2 years ago

I used specific_install (which is great!) and it seems to be working fine; I've set it running over all the files that failed in the interim and will let you know if any fail mysteriously. Thank you!

lisamelton commented 2 years ago

I'm closing this now since a fix for this is already checked in and a release is imminent.