darknebular/Wrapper_VideoStation

Offline convert always results in AAC 2.0 only

jkruse opened this issue · 9 comments

jkruse commented

With the advanced wrapper installed, doing an offline conversion of a video with a 5.1 or 7.1 audio track always results in a file with only an AAC 2.0 audio track. Doesn't seem to matter how the wrapper is configured.

It could be normal, my Wrapper only works when a movie does not have the allowed codecs. When you use a Synology-enabled codec, all native system binaries and their native conversion forms are used and that is: 2.0.
Please send me the log from: /tmp/wrapper_ffmpeg.log

Greetings.

jkruse commented

Example log from an offline conversion:

2024-01-02 19:32:35 - FFM7510 - *** PROCESS START REV AME_12.4.3 DS420+ (geminilake) PID 7510 ***
2024-01-02 19:32:35 - FFM7510 - MOVIE    = /volume1/data/media/movies/test.mkv
2024-01-02 19:32:35 - FFM7510 - VCODEC   = h264 (High)
2024-01-02 19:32:35 - FFM7510 - ACODEC   = truehd
2024-01-02 19:32:35 - FFM7510 - PARAM_ORIG  =
2024-01-02 19:32:35 - FFM7510 -          = -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i /volume1/data/media/
2024-01-02 19:32:35 - FFM7510 -          = movies/test.mkv -vcodec h264_vaapi -vf format
2024-01-02 19:32:35 - FFM7510 -          = =nv12|vaapi,hwupload,scale_vaapi=format=nv12 -vsync 2 -bf 0 -b:v 15000000 -acodec aac -ab 128k -ac 2 -progress - -f mp4
2024-01-02 19:32:35 - FFM7510 -          = -skip_displaymatrix 1 -max_muxing_queue_size 1024 -map 0:0 -map 0:1 -y /volume1/data/@eaDir/@tmp/17a441f458dfc40dd16860e
2024-01-02 19:32:35 - FFM7510 -          = a42581055_1899740081
2024-01-02 19:32:35 - FFM7510 - MODE     = MP4_TRANSCO-VS
2024-01-02 19:32:35 - FFM7510 - FFMPEG   = /var/packages/ffmpeg6/target/bin/ffmpeg
2024-01-02 19:32:35 - FFM7510 - PARAM_WRAP  =
2024-01-02 19:32:35 - FFM7510 -          = -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i /volume1/data/media/
2024-01-02 19:32:35 - FFM7510 -          = movies/test.mkv -vcodec h264_vaapi -vf format
2024-01-02 19:32:35 - FFM7510 -          = =nv12|vaapi,hwupload,scale_vaapi=format=nv12 -vsync 2 -bf 0 -b:v 15000000 -acodec aac -ab 128k -ac 2 -progress - -f mp4
2024-01-02 19:32:35 - FFM7510 -          = -skip_displaymatrix 1 -max_muxing_queue_size 1024 -map 0:0 -map 0:1 -y /volume1/data/@eaDir/@tmp/17a441f458dfc40dd16860e
2024-01-02 19:32:35 - FFM7510 -          = a42581055_1899740081
2024-01-02 19:32:35 - FFM7510 - CHILDPID = 7563
2024-01-02 19:59:51 - FFM7510 - *** CHILD END ***
2024-01-02 19:59:51 - FFM7510 - *** PROCESS END ***

Looks like "PARAM_ORIG" and "PARAM_WRAP" are identical, in which case I don't understand what you mean with the "Offline Transcoding" section of the graphic in your README.

The installation part of the log file:

[2023-12-28 12:49:53] INFO: Your system has a low performance, I recommend to you install the Simplest Wrapper.
[2023-12-28 12:50:01] INFO: ==================== Installation of the Advanced Wrapper: START ====================
[2023-12-28 12:50:01] INFO: Backup the original ffmpeg41 as ffmpeg41.orig.
[2023-12-28 12:50:01] INFO: Injection of the ffmpeg41 wrapper using this injector: X-Advanced.
[2023-12-28 12:50:05] INFO: Fixing permissions of the ffmpeg41 wrapper.
[2023-12-28 12:50:05] INFO: Adding of the KEY of this Wrapper in /tmp.
[2023-12-28 12:50:05] INFO: Backup the original libsynovte.so in VideoStation as libsynovte.so.orig.
[2023-12-28 12:50:05] INFO: Fixing permissions of /var/packages/VideoStation/target/lib/libsynovte.so.orig
[2023-12-28 12:50:05] INFO: Patching /var/packages/VideoStation/target/lib/libsynovte.so for compatibility with DTS, EAC3 and TrueHD
[2023-12-28 12:50:05] INFO: Adding of the KEY of this Wrapper in DLNA MediaServer.
[2023-12-28 12:50:05] INFO: Backup the original libsynovte.so in MediaServer as libsynovte.so.orig.
[2023-12-28 12:50:05] INFO: Fixing permissions of /var/packages/MediaServer/target/lib/libsynovte.so.orig
[2023-12-28 12:50:05] INFO: Patching /var/packages/MediaServer/target/lib/libsynovte.so for compatibility with DTS, EAC3 and TrueHD
[2023-12-28 12:50:05] INFO: Restarting CodecPack...
[2023-12-28 12:50:09] INFO: Restarting VideoStation...
[2023-12-28 12:50:20] INFO: Restarting MediaServer...
[2023-12-28 12:50:26] INFO: ==================== Installation of the Advanced Wrapper: COMPLETE ====================
[2023-12-28 12:51:04] INFO: Your system has a low performance, I recommend to you install the Simplest Wrapper.
[2023-12-28 12:52:10] INFO: Changing to use FIRST STREAM= AAC 5.1 512kbps (or AC3 5.1 640kbps), SECOND STREAM= MP3 2.0 256kbps in VIDEO-STATION.
[2023-12-28 12:52:11] INFO: ==================== Configuration of the Advanced Wrapper: COMPLETE ====================

Hello, "Offline Transcoding" is this MODE called MP4_TRANSCO-VS.

Yeah, In this mode you will always doing in 2.0.

I don't have enough time to review it well, but I think that a modification of arguments could be made to have 5.1 in OffLine conversions, just as they are done with Video Station streamings.

Regards.

jkruse commented

So then what does this mean?

image

Doesn't that say that your wrapper, in advanced mode, supports 5.1 audio on Offline Transcoding?

Yeah, I did a mistake there.

From this file: /var/packages/CodecPack/target/pack/bin/ffmpeg41
Could you change the line 349 from:
$bin1 "${args[@]}" 2> /tmp/ffmpeg-${streamid}.stderr &

to this new line and try again?
$bin1 "${args1vs[@]}" | $bin2 "${args2vs[@]}" 2> /tmp/ffmpeg-${streamid}.stderr &

Regards.

With this change works for you?

jkruse commented

It actually read $bin2 "${args[@]}" 2> /tmp/ffmpeg-${streamid}.stderr & (note "bin2", not "bin1").

I changed it to the new line. Offline convert now takes longer than before, but the new video has 5.1 and 2.0 audio.

So yes, it works!

When I find some time I will bring these changes to the new version of the Wrapper. It is normal that it takes a little longer, the process of transcoding the audio to 5.1 is more difficult.

Thank you so much.

Fixed in the new version SCPT_3.9.7.

Best Regards.