Tests were done with W7x64, Python 3.8.1, 20 runs. 16596 files in 439 (partially nested) subfolders.
find_files is from and lets you search for several extensions.
fast_scandir was written by myself and will also return a list of subfolders. You can give it a list of extensions to search for (I tested a list with one entry to a simple if ... == ".jpg" and there was no significant difference).
Your original solution was very nearly correct, but the variable "root" is dynamically updated as it recursively paths around. os.walk() is a recursive generator. Each tuple set of (root, subFolder, files) is for a specific root the way you have it setup.
You are trying to mux subtitles as a subtitle stream. It is easy but different syntax is used for MP4 (or M4V) and MKV. In both cases you must specify video and audio codec, or just copy stream if you just want to add subtitle.
MKV container supports video and audio codecs Virtually anything and also supports subtitles and DVD menus. So you can just copy codecs from input video to output video with MKV container with subtitles. First you should convert SRT to ASS subtitle format
I will provide a simple and general answer that works with any number of audios and srt subtitles and respects the metadata that may include the mkv container. So it will even add the images the matroska may include as attachments (though not another types AFAIK) and convert them to tracks; you will not be able to watch but they will be there (you can demux them). Ah, and if the mkv has chapters the mp4 too.
-Windows Metro App for Emby Theater (from Windows Store): same as Chromecast, sometimes it plays two subtitles tracks out of three (not joking, with same files used with Chromecast), so slightly more robust than Chromecast
What is very strange is that the tracks are embedded into the files, all in same SRT format...probably the Chromecast bug is the one that "bothers" more, for the other platforms there are alternatives often...
Thanks for the advice, I'll definitely try to use external subtitles, even if it has always seemed nicer to me to have everything embedded in a file; for instance other players which access the network storage via SMB or NFS are easier to manage with everything embedded in a file, even if they'd probably work with external subs as well..
What worries me is that I should manually extract the SRT files from lots of files, unless I find some plugin or subtitle service which completely re-downloads the subtitles...but again I've never used them to be fair, for fear of lack of sync of the downloaded subtitles with the video, for instance in OpenSubtitles there are so many versions of subtitles for a movie in a language. How can I be sure that it finds the correct one? I've never tried, but if it works it would be even too nice to be true!!
Finding the subs again can be painful and that is exactly what I had to do... It took me 2 weeks for my whole collection testing various subs through OpenSubtitles and similar sites (most of the time I knew the encoding so no synchronisation was needed) but I think it is worth your time and you'll do it only once. I suggest start using this tool (for mac and windows) : which has a trial mode that is fully functional and the ones you see that are not matching, download them manually through any subtitle website.
In mid-February, from PS4 browser, I saw a movie in mkv format with spanish subtitles embedded inside. It works perfect as always adn exactly the same with de other files in the same situation. (As well as other devices: android, ipad, and pc)
Later in March (always with the PS4 browser), I tried to watch similar movies and in the same format, but there was no way to watch them with subtitles. (Other devices are not affected by this issue).
The strangest thing is that the same movies that I could previously see under these conditions, I can no longer see them with subtitles!
What happened in between? Maybe I changed some settings on the server or the changes in the PS4 browser did not reach my device?
I always enbed the spanish audio tracks and externals subtiltles inside de MKV container with the MKVTOOLNIX tool, but reading this post, I dont think it is the best practice anymore. Is this correct? Is it preferable in separate files?
Finally, the same SRT file used on LinkedIn can be used on other platforms as well. Closed captions work nicely on Facebook, Vimeo, Wistia, and YouTube. As a special note about YouTube, closed captions are actually their preferred method for captioning. YouTube allows video creators to include multiple subtitle files in different languages. This allows viewers to select the language that meets their needs.
But there is one downside to this: I have to write the output name manually. In a batch, you don't know if the subtitles are .srt, .ass or maybe even a different format, so writing blindly subs.srt does not sound like a good idea.
There is no mkvextract subtitles as mkvextract considers the subtitles as part of tracks. So if track order is messed up and subtitles is not the 3rd track, using a similar command with mkvextract won't work.
I'm a new emby user since a week or two. But there is a problem that keeps occuring. When a streamed a video to my chromecast it showed subtitles, but this was only the first day. Now when I try to stream the same movie (or other) it doesn't show any subtitles. When I pauze the video on mobile when it shows a subtitle and than stream it, it will show that sentence for a split second and nothing after.
HI there @@Highmere, can you please go over an example? Are you sure your subtitles have text at that time of the video? If you play directly on the mobile device instead of Chromecast, how does that compare?
I fixed the my problem.there was one file that messed it up. Maybe try to redownload the file and try again. I use opensubtitles to get my subtitles. I solved my problem by using a new file and not using selfdownloaded subtitles.
I have this issue with chromecast but only on certain shows/seasons. The subs play fine on the android app or in the browser, they are named correctly, but they just don't appear when casting. I've tried replacing the srt files with ones downloaded through emby but they still don't show.
Unlike captions, subtitles do not include the non-speech elements of the audio (like sounds or speaker identifications). Subtitles are also not considered an appropriate accommodation for deaf and hard of hearing viewers.
The subtitles come in many different forms -- over 25, according to the report -- and the way media files such as VLC or services such as Popcorn Time use them is often insecure. If a malicious user slips in a dangerous file instead of an actual subtitle, he can do a lot of damage to the victim's computer. Check out how an attacker can take control of the victim's machine in the video, below.
These subtitles are typically found on specialized websites such as Opensubttiles.org, where they're ranked according to user scores, giving users a sense of security that they're downloading a tried and tested version of the subtitle. But these scores can easily be manipulated as to push a malicious files on top of the rankings.
People who are used to subscription services such as Netflix, and those who don't watch a lot of media in a foreign language, typically don't need to download subtitles online. But a lot of people do; Check Point claims affected users are in the hundreds of millions.
Check Point says it found vulnerabilities related to the way subtitles are handled in four popular media players and services: VLC, Kodi, Popcorn Time and Stremio. The company did not share details about the vulnerabilities, or what platforms are affected, but it did say that PCs, mobile devices and even Smart TVs are at risk.
Speaking of Celia, her character and this entire two-episode conflict was pretty much a huge trainwreck, lacking any mystery or subtlety whatsoever. It was weird that Daniel didn't convey his discovery to his fellow survivors. He knew that she was harboring zombies and that she'd murdered a few dozen people in cold blood. Perhaps if he'd mentioned this to people, Nick wouldn't have been suckered in. Maybe the group wouldn't have split up and would have worked to get out of there instead. Salazar instead tries to escape with just Ofelia because, in his suddenly warped brain, his dead wife was waiting for them. This sort of delusional thinking might have worked if his madness had been established over time, but here it just felt...rushed and contrived.
582128177f