Search the Community
Showing results for tags 'mkv files'.
-
Fix MKV resume, fast forward and rewind issues WITHOUT remuxing.
pmurphy0881 posted a topic in Tools and Utilities
I have seen many people have been switching to using mkv over mp4 in recent times and others complaining about playback issues with mkv. Many know that remuxing can help but it's very time consuming to do so, but it works. The issue is that the cues of a mkv file are normally written to the end of the file. This is an issue that's been corrected with mp4 files with -movflags faststart option when encoding mp4 files, but with mkv it's a little different. The script I have put together makes use of a program to move the cues to the front of the mkv and optimize the file for faster playback and better skipping and resume support. So I have a rather large library and it's become a bit of a problem for me so I found a program called mkclean from matroska that is used to fix and move the cues to the start of the mkv file. With very little documentation on the issue I had to go through a lot of trial and error to get things to work properly, but I put together a python script to fix this. Attached is that python script for those of you who would like to try it out. As of right now this guide is only for Windows machines but I still believe those that are using linux are more than capable of adapting this info for their environment. Step 1: Download the MKClean file to a directory. https://www.matroska.org/downloads/mkclean.html My files are located in a separate drive lettered K: so I created a folder called K:\mkclean to house my mkclean.exe file. Step 2: Download and install Python on your machine if you don't already have it installed. You can see the link below for that. https://www.python.org/downloads/windows/ Step 3: Open a command prompt as administrator and update pip to the latest then download the watchdog feature to python to be able to monitor your folders for newly added files. Use the following command python -m pip install --upgrade pip when done then run python -m pip install watchdog Step 4: Once both of these commands are completed update your system environment PATH with an entry for mkclean. Settings -> System -> About -> Advanced System Settings -> Environment Variables... In the system variable section scroll down and select path and click on the edit button. Then click on New to add an entry for the folder containing the mkclean.exe file. (In my case it was K:\mkclean) Once done click ok and reboot your system. Step 5: Not it's time to create your python file. Attached is a .txt version of the python file I created for myself and have been running. You will need to edit it some, but I'm here to help with that. NOTE THAT WHEN ENTERING A PATH YOU MUST ENTER IT WITH \\ AS EXAMPLE BELOW K:\mkclean WILL FAIL BUT K:\\mkclean WILL WORK. (Below is the path were you want your database of the the files it's processed to be stored at, update it to the path you want your database created at, but please leave the files_processed.db name for ease of use of you will have to edit more lines.) LINE 9: DATABASE_FILE = 'K:\\mkclean\\files_processed.db' (Below is the path to make the connection to the database you created on line 9, be sure that the path matches what you have entered on line 9) LINE 65 conn = sqlite3.connect('K:\\mkclean\\files_processed.db') LINE 77: conn = sqlite3.connect('K:\\mkclean\\files_processed.db') (Below are lines identifying the folders to work it's way through looking for .mkv files and running this mkclean optimization script on. Change each line to identify your library folders. You will need 1 line per folder that you are looking to process and it will search recursively through them for any .mkv file) LINE 95 process_existing_files("K:\\TV_Shows") LINE 96: process_existing_files("K:\\Movies") (Below is a line to identify the folders to monitor after it has completed it's initial task of recursively working it's way through your files and checking for .mkv files to optimize. When new ones are added it will find them and run the optimization on them again making them perfect for streaming.) On this line all the folders to monitor should be comma seperated values inside of double quotes and AGAIN take note of using \\ when entering a path vs a single \. LINE 99: folders_to_watch = ["K:\\Movies", "K:\\TV_Shows"] Step 6: Now when you go to save this I recommend saving this in the same folder as your database and the mkclean.exe file so you can locate it easily, but save it once with a txt extension for ease of updating later, and then save it again with a .py extension. Step 7: Now you can run the file by opening a command prompt and entering this command. python "K:\mkclean\mkclean_optimization_script.py" NOTE: To stop the running program hit CTRL+C with the command window active. Step 8: Many of you would probably like to have this also start up when your system starts so it's easy enough to do by creating a .bat file and placing it in your startup folder. I'm not going to walk you though that in this tutorial, but the code is simple enough to add for you and for you to make your edits to so it's below. @echo off python "K:\mkclean\mkclean_optimization_script.py" PLEASE NOTE I AM NOT THE BEST PYTHON PROGRAMMER OUT THERE BY FAR AND THIS IS A PERSONAL PROJECT OF MINE THAT I'M MAKING AVAILABLE FOR YOU TO USE IF YOU LIKE, BUT I TAKE NO RESPONSIBILITY FOR IT IN ANY WAY. PLEASE TEST OUT ON SOME COPIES OF FILES FIRST AND USE AT YOUR OWN RISK. Other than that enjoy and let me know if this helped you out at all. mkclean_optimization_script.txt- 1 reply
-
- 1
-
- fast forward
- resume
-
(and 6 more)
Tagged with:
-
IOS app ass subtitle and HLS problem (hevc h.265 with subset fonts)
Efina posted a topic in Apple iOS / macOS
Sorry if this is addressed somewhere else in advance. I was testing if I can play a mkv file with hevc x1, flac x2, ass x1, and ttf subset x5 (media info as below) I want to ensure the video on my server can be directly played while showing ass effect with fonts properly on android, ios and PC platforms without encoding (hard-sub) PC: web is not okay for ass effect, but the PC client I am using (not standard emby theater) is able to show correctly (directly play) Android: app is not smooth enough (Exoplayer I assumed?), switched to VLC player, became smooth and ass display is correct (directly play) IOS(both on iPad and iphone): container is not compatiable and HLS format is needed, HEVC is directly played, while flac needs to be transcoded to mp3 (while the same flac is directly played with AVC + Flac in mkv container), fonts of ass is not used and turned to be the default font. (not directly play) I would like to know: 1. What is the compatiable container for IOS app? HLS format appeared even if the audio is aac in mkv container or flac in mp4 container with HEVC as video stream. Any way to get around this? 2. I think the emby app can support ass effect with fonts, but it turned out not the case in IOS. Is there any method to show embed fonts for ass subtitle on IOS platform? ___________________________________________________________________________________________________________ It shows HVC1 in MPC-HC player Video: HVC1 1920x1080 23.976fps [V: hevc rext L4.0, yuv444p10le, 1920x1080 [default]] Audio: FLAC (framed) 48000Hz stereo 2304kbps [A: flac, 48000 Hz, stereo, s24 [default]] Audio: FLAC (framed) 48000Hz stereo 2304kbps [A: コメンタリー (flac, 48000 Hz, stereo, s24)] Subtitle: Advanced SubStation Alpha [S: 繁體 [cht] (ass) [default]] Subtitle: UTF-8 [S: No subtitles] ___________________________________________________________________________________________________________ General Unique ID : 156709209093414132247110442661145388684 (0x75E51888AB9ECBEF1F908B7C139AA68C) Complete name : \\...xxxxx...S01.E02.[AI-Raws].mkv Format : Matroska Format version : Version 4 File size : 1.16 GiB Duration : 23 min 41 s Overall bit rate mode : Variable Overall bit rate : 7 020 kb/s Movie name : S01.E02.[AI-Raws] Writing application : Lavf58.76.100 Writing library : Lavf58.76.100 ErrorDetectionType : Per level 1 Attachments : 仓耳今楷01 W05.146F4902.ttf / 方正粗圆_GBK.1C4025C1.ttf / 方正新楷体_GBK.3819E60D.ttf / 方正仿宋_GBK.E9AA63B2.TTF / 仓耳今楷01-27533 W03.1C19A3A6.ttf Video ID : 2 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Format Range@L4@High Codec ID : V_MPEGH/ISO/HEVC Duration : 23 min 41 s Bit rate : 4 242 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Chroma subsampling : 4:4:4 Bit depth : 10 bits Bits/(Pixel*Frame) : 0.085 Stream size : 719 MiB (60%) Writing library : x265 2.9+8-27d8424c799d:[Windows][MSVC 1900][64 bit] 10bit Encoding settings : cpuid=1111039 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=3 / input-res=1920x1080 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / radl=0 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=6 / crqpoffs=6 / rc=crf / crf=14.5 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=25600 / vbv-bufsize=10240 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=31 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Audio #1 ID : 3 Format : FLAC Format/Info : Free Lossless Audio Codec Codec ID : A_FLAC Duration : 23 min 41 s Bit rate mode : Variable Bit rate : 1 474 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 11.719 FPS (4096 SPF) Bit depth : 24 bits Compression mode : Lossless Stream size : 250 MiB (21%) Default : Yes Forced : No Audio #2 ID : 4 Format : FLAC Format/Info : Free Lossless Audio Codec Codec ID : A_FLAC Duration : 23 min 41 s Bit rate mode : Variable Bit rate : 1 296 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 11.719 FPS (4096 SPF) Bit depth : 24 bits Compression mode : Lossless Stream size : 220 MiB (18%) Title : コメンタリー Default : No Forced : No Text ID : 1 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Duration : 23 min 40 s Compression mode : Lossless Title : 繁體 Language : cht Default : Yes Forced : No Menu 00:00:00.000 : :第 01 章 00:00:23.023 : :第 02 章 00:01:53.030 : :第 03 章 00:11:17.051 : :第 04 章 00:17:50.027 : :第 05 章 00:19:20.076 : :第 06 章 00:23:35.039 : :第 07 章 ___________________________________________________________________________________________________________ -
Hey, I know the title of this thread is a bit non-descript, but perhaps someone can help me figure this out. Also, didn't really know what else to title it. LOL! I have a number of MKV files that are encoded as HEVC, and when played on devices such as my smartphone, and a few TVs around the house, they all direct play from Emby correctly. I'd like to continue to direct play, as to not kill my CPU usage on my Synology NAS, and avoid transcoding all together. However, on Windows-based devices, specifically, I have discovered that it forces the transcoding process all around. I've tried this on multiple Windows PCs, not sure if Microsoft's problem or if there is something I can do on my end. I host a number of family members that utilize Windows OS to stream Emby, and I'd ideally like to continue that. Any tips on how to fix this? I am happy to provide server logs privately, just shoot me a DM. Here's a small snippet of Luke Cage S01E01 doing this. 8312639228eaa0892b6b7501b71fb181.mp4
- 2 replies
-
- mkv files
- glitch on video playback
-
(and 1 more)
Tagged with:
-
Hello, Is it possibele to play MKV with chaters? I have my video files create with chapters when I play this files with Emby I can't choose this chapters. It is also not possible to skip to next chapter. When I play this files with VLC player everything works fine.
-
Ok I recently converted some of my blu ray 's into MKV format. The issue is that some will play and some dont. They were all converted during the same period. The only difference in them is that they were put in different folders. Ex. ASIAN CINEMA and MOVIES. Was just wondering if I might of missed a step or something. I am using MBC version 3.0.243.0 , MBS Version 3.0.5490.2