[Request] Add new Configuration that doesn't touch the video stream
Closed this issue · 8 comments
For my TV, I've found that Media Server only reencodes the audio for a video if the "transcode video" option is also checked. However, this results in encoding all video streams to mpeg2 whether or not the original stream could be played. Is it possible for you to add an option so that we can configure the Advanced Installer to do FIRST STREAM= AAC 5.1 512kbps
and don't touch the video stream?
For example:
- Original video:
x265 + DTS -> video works, audio cannot be played - Wrapper + audio and video transcode setting enabled on Media Server
x265 + DTS -> mpeg2 + AAC 5.1 -> both can be played - New configuration with Wrapper + audio and video transcode setting enabled on Media Server
x265 + DTS -> x265 + AAC 5.1
Yeah It's possible. I will need to know exactly all the flags to be able to output the original video from ffmpeg.
By default Media Server transcodes HEVC to H264. That does not send it to the Wrapper. It will only go to the Wrapper when you have a codec not supported by Media Server. When a HEVC video is sent to the Wrapper, it should not touch the video codec and only change the audio to a more universal or compatible format such as AAC 5.1 512Kbps.
Now I remember why I didn't put this option at the video level, because it didn't give good performance in real time. In addition, it broke streaming to web browsers, since they do not accept HEVC, I have made a Wrapper to test this new functionality and try not to break streaming to Video Station, WEB browsers and always have HEVC going through MediaServer.
Please go to this route:
/var/packages/CodecPack/target/pack/bin
And load this new file called to the file called ffmpeg41 in the last path:
ffmpeg41-wrapper-DSM7_X-TEST
Please, try it this new Wrapper.
You only need to change the content of the ffmpeg41 file (in /var/packages/CodecPack/target/pack/bin) with the content of the TEST file (ffmpeg41-wrapper-DSM7_X-TEST) that I have uploaded to the repository. You don't have to reinstall Wrapper or do anything else. Try it and tell me if it worked well for you.
Regards.
Thank you so much for looking into this!
Unfortunately, when I tried the script, my TV says 'This file cannot be recognized'. I've attached the log file as well as a mediainfo dump of the video in case you need it.
mediainfo.txt
wrapper_ffmpeg.log
Also for reference, here's what the TV metadata shows when it plays the video without the wrapper (i.e. video works, audio doesn't)
[HEVC][Unknown][3840X2160][HDR][BT.2020]
With the actual version is working fine all but your video is converted to H264 correct? But with this test version not, right?
I am also seeing that you have the Medium profile, this profile saves bandwidth but lowers the quality. I recommend that you set the Original profile or at least High in Video Station. Stay with the stable versión, please reinstall the Wrapper to remove the Wrapper Test that we uploaded a few days ago. Don't worry about it being in H264, if you put it in those profiles you won't lose quality and it will be much more compatible with everything.
The current production script works for x264 but seems to convert the video stream to mpeg2, based on what the TV's metadata is saying. The test script gives me a 'This file cannot be recognized' so nothing plays. I'm only using the Media Server DNLA, not Video Station. It think it's picking the lower resolution by default.
Here's some logs for an x264 video
Current production script (i.e. video gets converted x264-> mpeg2 and audio DTS -> AAC)
wrapper_ffmpeg_rushhour_production_script.log
Test script (unplayable)
wrapper_ffmpeg_rushhour_test_script.log
MediaInfo for the file
rushhour.MediaInfo.txt
I want to keep everything from the original video as-is (no reencodes no matter the source codec) and only do the audio conversion (DTS->AAC) for all videos; which would be like a simpler version of the current production script logic.
You can close this issue if you want. I tried changing all the references of "-vcodec *" to "-vcodec copy" and that seems to do what I need. There's just some weird intermediate conversions that might need optimization, but I can live with this.