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

Seems to not like whatever kind of subs are in this file? #16

Closed
mattmoon1123 opened this issue Sep 25, 2020 · 4 comments
Closed

Seems to not like whatever kind of subs are in this file? #16

mattmoon1123 opened this issue Sep 25, 2020 · 4 comments
Labels
wontfix This will not be worked on
Milestone

Comments

@mattmoon1123
Copy link

I, [2020-09-25T00:24:43.940640 #1]  INFO -- : correcting permissions on /tmp/movies/Invaders from Mars (1986)
I, [2020-09-25T00:24:44.108533 #1]  INFO -- : transcoding /input/movies/Invaders from Mars (1986)/Invaders from Mars (1986).mp4
E, [2020-09-25T00:24:44.237007 #1] ERROR -- : Error processing /input/movies/Invaders from Mars (1986)/Invaders from Mars (1986).mp4:
E, [2020-09-25T00:24:44.237087 #1] ERROR -- : ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-cuda --enable-nvenc --enable-cuvid --enable-libnpp --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-postproc --enable-small --enable-version3 --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/' --extra-libs=-ldl --prefix=/opt/ffmpeg
  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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/input/movies/Invaders from Mars (1986)/Invaders from Mars (1986).mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2015-12-01T19:03:05.000000Z
    Encoded by      : TBox
    LANGUAGE        : English
    SUBTITLE        : English
    title           : Invaders From Mars - Sci-Fi Horror 1986 Eng Subs 720p [H264-mp4]
    genre           : Sci-Fi
    date            : 1986
  Duration: 01:39:24.03, start: 0.000000, bitrate: 1872 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x544, 1754 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2015-12-01T19:03:05.000000Z
      encoder         : JVT/AVC Coding
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 111 kb/s (default)
    Metadata:
      creation_time   : 2015-12-01T19:03:05.000000Z
    Stream #0:2(eng): Subtitle: mov_text (tx3g / 0x67337874), 1280x60, 0 kb/s (default)
    Metadata:
      rotate          : 0
      creation_time   : 2015-12-01T19:03:05.000000Z
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 3.1.1+1-04b37fdfd2dc
x265 [info]: build info [Linux][GCC 7.4.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main profile, Level-3.1 (Main tier)
x265 [info]: Thread pool created using 24 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(9 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 44 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 15 / 4 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 16 / 1
x265 [info]: Rate Control / qCompress            : CRF-22.0 / 0.80
x265 [info]: tools: rd=2 psy-rd=0.70 rdoq=1 psy-rdoq=5.00 rskip signhide tmvp
x265 [info]: tools: fast-intra strong-intra-smoothing deblock sao
[matroska @ 0x55996cea3740] Subtitle codec 94213 is not supported.
Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented
Error initializing output stream 0:0 --

encoded 0 frames
Conversion failed!

E, [2020-09-25T00:24:44.237152 #1] ERROR -- : transcode failed, took 0.128618944 seconds
I, [2020-09-25T00:24:44.237187 #1]  INFO -- : finished with /input/movies/Invaders from Mars (1986)/Invaders from Mars (1986).mp4```
@lemonjesus
Copy link
Owner

Matroska doesn't support whatever sub codec 94213 is. The solution is to convert it to SRT, but that's undesirable all the time. I'm thinking of adding some error detection stuff to the bot so it can retry using fallback commands if the main one doesn't work.

@wesley5040
Copy link
Contributor

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:[email protected]: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>'

@lemonjesus
Copy link
Owner

@wesley5040 make a separate issue for that, since that's a separate bug.

@lemonjesus lemonjesus modified the milestones: Version 2.2, Version 2.4 Feb 1, 2021
@lemonjesus lemonjesus added the wontfix This will not be worked on label Apr 7, 2022
@lemonjesus
Copy link
Owner

I'm closing this issue since what container supports what codec is out of my control. This can be handled with more complicated transcode rules as will be implemented (some day) in #25 and maybe #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants