HaveAGitGat / Tdarr_Plugins

Tdarr Plugins
GNU General Public License v3.0
140 stars 158 forks source link

Plugin Tdarr_Plugin_a9hd_FFMPEG_Transcode_Specific_Audio_Stream_Codecs fails on aac conversion #201

Closed Willsr71 closed 10 months ago

Willsr71 commented 2 years ago

When attempting to convert to aac the plugin will fail with an "Invalid encoder type 'aac'

ffmpeg -i /mnt/media/Shows/Entourage/Season 1/Entourage - S01E03 - Talk Show Bluray-1080p.mkv -c copy -map 0:v -map 0:0 -c:0 aac -map 0:s? -map 0:d? -max_muxing_queue_size 9999 /temp/Entourage - S01E03 - Talk Show Bluray-1080p-TdarrCacheFile-bjf72XsL_.mkv

Last 200 lines of CLI log:

ffmpeg version 4.2

Copyright (c) 2000-2019 the FFmpeg developers

built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)

configuration: --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --nvccflags='-gencode arch=compute_52,code=sm_52 -O2' --disable-debug --disable-doc --disable-ffplay --disable-static --enable-cuda-nvcc --enable-cuda-sdk --enable-cuvid --enable-ffprobe --enable-gpl --enable-libaom --enable-libass --enable-libfdk_aac --enable-libfreetype --enable-libkvazaar --enable-libmp3lame --enable-libnpp --enable-libopencore-amrnb --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-nonfree --enable-nvdec --enable-nvenc --enable-openssl --enable-shared --enable-small --enable-stripping --enable-vaapi --enable-vdpau --enable-version3

libavutil 56. 31.100 / 56. 31.100

libavcodec 58. 54.100 / 58. 54.100

libavformat 58. 29.100 / 58. 29.100

libavdevice 58. 8.100 / 58. 8.100

libavfilter 7. 57.100 / 7. 57.100

libswscale 5. 5.100 / 5. 5.100

libswresample 3. 5.100 / 3. 5.100

libpostproc 55. 5.100 / 55. 5.100

Input #0, matroska,webm, from '/mnt/media/Shows/Entourage/Season 1/Entourage - S01E03 - Talk Show Bluray-1080p.mkv':

Metadata:

encoder : libebml v1.2.3 + libmatroska v1.3.0

creation_time : 2012-11-21T02:23:12.000000Z

Duration: 00:27:14.18, start: 0.000000

, bitrate: 11494 kb/s

Chapter #0:0: start 0.000000, end 64.147000

Metadata:

title : 00:00:00.000

Chapter #0:1: start 64.147000, end 608.441000

Metadata:

title : 00:01:04.147

Chapter #0:2: start 608.441000, end 1085.167000

Metadata:

title : 00:10:08.441

Chapter #0:3: start 1085.167000, end 1563.812000

Metadata:

title : 00:18:05.167

Chapter #0:4: start 1563.812000, end 1634.176000

Metadata:

title : 00:26:03.812

Stream #0:0: Audio: dts, 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)

Stream #0:1: Video: h264, yuv420p(progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)

Invalid encoder type 'aac'

Tdarr ALERT: NO OUTPUT FILE PRODUCED:

/temp/Entourage - S01E03 - Talk Show Bluray-1080p-TdarrCacheFile-bjf72XsL_.mkv
garlik82 commented 2 years ago

I came across this error. the file has images in it so this fails, what solved it was using Tdarr_Plugin_MC93_MigzImageRemoval before that plugin. give it a try.

Willsr71 commented 2 years ago

Unfortunately that plugin didn't help matters. Here's the ffprobe data from one of the files: https://pastebin.com/sHv9vgJ4

wsegatto commented 2 years ago

I used to have errors like this. This is my current stack. Since then, I haven't received errors for many months now. Please note that the best AAC library is libfdk_aac, if you manage to install it you'd have a better AAC encoding. I use "VBR 5" for best bitrates.

Tdarr_Plugin_MC93_MigzImageRemoval Tdarr_Plugin_vdka_Remove_DataStreams Tdarr_Plugin_lmg1_Reorder_Streams Tdarr_Plugin_MC93_Migz2CleanTitle (options: true/true/blank) Tdarr_Plugin_076a_re_order_audio_streams (options: eng) Transcode Specific Audio Stream Codecs (options: codecs_to_transcode: dts, truehd, eac3; codec: libfdk_aac -vbr 5)

Rsslone commented 2 years ago

I tried everything but Tdarr_Plugin_MC93_Migz2CleanTitle because I wasn't sure what this actually did, threw a hail merry and added it and it worked. Any of these probably could help, but in my case it was the Tdarr_Plugin_MC93_Migz2CleanTitle.

Thanks!

rchovan commented 1 year ago

Hi, I have still same error even with Migz2clean plugins

obrázok

2023-08-20T13:38:59.692Z Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 0, only the last option '-c:0 ac3' will be used.

2023-08-20T13:38:59.692Z [vost#0:0 @ 0x55ed0956e5c0] Invalid encoder type 'ac3'
ovizii commented 11 months ago

Same here, even with Migz2clean plugins.

image

HaveAGitGat commented 10 months ago

If you're using the docker container this should work fine as the aac encoder is included. If not then you may need to download FFmpeg with aac encoder included.

image

Jellyfin FFmpeg has it (what Tdarr uses):

        apt install -y wget && \
        wget https://repo.jellyfin.org/releases/server/ubuntu/versions/jellyfin-ffmpeg/6.0-6/jellyfin-ffmpeg6_6.0-6-focal_amd64.deb && \
        apt install -y \
        ./jellyfin-ffmpeg6_6.0-6-focal_amd64.deb && \
        rm -rf ./jellyfin-ffmpeg6_6.0-6-focal_amd64.deb && \
        ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/local/bin/ffmpeg
ovizii commented 10 months ago

I am running tdarr in docker and I also get the same result as you in your last screenshot, I can see --enable-libfdk-aac and yet, some files trigger this error. Very few though.

TheFeelTrain commented 9 months ago

I have been dealing with the same issue. Not sure why this was closed. If it were the encoder missing from ffmpeg it would fail on all files, not just a few. There is clearly something wrong with the way it is handling and/or mapping the streams in these particular files.

ovizii commented 9 months ago

I have been dealing with the same issue. Not sure why this was closed. If it were the encoder missing from ffmpeg it would fail on all files, not just a few. There is clearly something wrong with the way it is handling and/or mapping the streams in these particular files.

I totally agree, the issue is still there, I now have 17 files with this error.

some possibly relevant info:

2023-11-13T09:09:22.630Z YN_UCcXPS:Node[InternalNode]:Worker[some-snipe]:[2/3] tdarr-ffmpeg -i "/mnt/series/Blade Runner - Black Lotus/Season 01/Blade Runner - Black Lotus - S01E04 - The Doll Hunt WEBDL-1080p.mkv" -c copy -map 0:v -map 0:1 -map 0:4 -c:4 aac -map 0:s? -map 0:d? -max_muxing_queue_size 9999 "/temp/Blade Runner - Black Lotus - S01E04 - The Doll Hunt WEBDL-1080p-TdarrCacheFile-jZxUor-0k.mkv"
2023-11-13T09:09:23.634Z Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 4, only the last option '-c:4 aac' will be used.
2023-11-13T09:09:23.634Z [sost#0:4 @ 0x56450f3ade80] Invalid encoder type 'aac'