wolveix / plexus

A suite of tools to help manage your media collection.
https://plexus.wolveix.com
GNU General Public License v3.0
97 stars 11 forks source link

Transcode error (ts files) #15

Open iamthew4lrus789 opened 4 years ago

iamthew4lrus789 commented 4 years ago

Describe the bug Plexus failing to convert files recorded by Plex DVR function (.ts). Suspect the issue relates to subtitles.

Subtitles are not needed in this instance and could be dropped.

To Reproduce Steps to reproduce the behavior:

  1. Create list using plexus list
  2. Run plexus encode -l ~/.plexus/list1.txt --verbose

Expected behavior Expect files to be transcoded from TS to MKV.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here. 2019-11-04 10_35_12-Settings

Paste logs below this line

Copying: 8 Out of 10 Cats Does Countdown (2013) - 2018-12-23 21 00 00 - Christmas Special (copy 1).ts
          1.62G 100%   50.18MB/s    0:00:30 (xfr#1, to-chk=0/1)

File copied.

File codecs:
Audio = mp2
mp2 -> libfdk_aac
Container = ts -> mkv
Video = h264
h264 -> h264

ffmpeg version 4.2.git-6023b9f Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
  configuration: --pkgconfigdir=/home/plex/ffmpeg-build/workspace/lib/pkgconfig --prefix=/home/plex/ffmpeg-build/workspace --pkg-config-flags=--static --extra-cflags=-I/home/plex/ffmpeg-build/workspace/include --extra-ldflags=-L/home/plex/ffmpeg-build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libvidstab --enable-libaom
  libavutil      56. 35.100 / 56. 35.100
  libavcodec     58. 59.102 / 58. 59.102
  libavformat    58. 33.100 / 58. 33.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 62.100 /  7. 62.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mpegts, from '/root/.plexus/encode/convert/8 Out of 10 Cats Does Countdown (2013) - 2018-12-23 21 00 00 - Christmas Special (copy 1)/8 Out of 10 Cats Does Countdown (2013) - 2018-12-23 21 00 00 - Christmas Special (copy 1).ts':
  Duration: 01:06:59.12, start: 1.400000, bitrate: 3234 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 128 kb/s
    Stream #0:2[0x102](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (mp2 (native) -> aac (libfdk_aac))
  Stream #0:2 -> #0:2 (dvb_subtitle (dvbsub) -> ass (ssa))
Subtitle encoding currently only possible from text to text or bitmap to bitmap

An unknown error occurred with FFmpeg.

Error: /torrents/_Complete/TV/8.Out.Of.10.Cats.Does.Countdown.S08E01.HDTV.x264-TLA[ettv]/Season 14/8 Out of 10 Cats Does Countdown (2013) - 2018-12-23 21 00 00 - Christmas Special (copy 1).ts could not be encoded.

Moving onto the next line.
wolveix commented 4 years ago

Hey!

Thanks for using Plexus, sorry that you've encountered an error.

The subtitle stream for that file is encoded in dvd_subtitle, which essentially stores subtitles as bitmap images rather than genuine text. Unfortunately, MKVs don't support this format, and we can't easily extract the subtitles for external usage either.

Plexus is currently undergoing a complete rewrite in Golang for v2.0, so I'll add this as one of the planned features for release. In the meantime, I would recommend manually converting that file and map out the subtitles:

ffmpeg -y -i "/torrents/_Complete/TV/8.Out.Of.10.Cats.Does.Countdown.S08E01.HDTV.x264-TLA[ettv]/Season 14/8 Out of 10 Cats Does Countdown (2013) - 2018-12-23 21 00 00 - Christmas Special (copy 1).ts" -map 0 -map -0:2 -preset faster -max_muxing_queue_size 1024 -movflags faststart -threads 2 -crf 20 -level 4.1 -c:v libx264 -c:a libfdk_aac -stats "/encoded/8.Out.Of.10.Cats.Does.Countdown.S08E01.HDTV.x264-TLA[ettv]/Season 14/8 Out of 10 Cats Does Countdown (2013) - 2018-12-23 21 00 00 - Christmas Special (copy 1).mkv"

iamthew4lrus789 commented 4 years ago

Thank you!