srt

Making Batch file code with VBScript to work with Unicode symbols

故事扮演 提交于 2019-12-08 11:09:06
问题 So recently I asked for help with creating .srt subtitles. Here is the link. I got the help and everything works fine until the videofile in the folder has unicode symbols in its name. If it does, then VBScript error appears. Question is how to make this code work correctly with Unicode symbols. Here is the code: @echo off&cls ::The Path of your Videos files set "$VideoPath=C:\FolderwithVideos" ::If you want your Code in this BAT remove the REMs Below : rem dir "%$VideoPath%" /O:S /b /-p /o

support srt/vtt subtitle and syncing in video player flutter

浪子不回头ぞ 提交于 2019-12-08 09:50:46
问题 I want to play srt subtitles in my app. I have integrated srt_parser so far. Also, I am able to get the current position of the player by this code inMilliseconds = _videoPlayerController.value.position.inMilliseconds; Here is srt parse code. String data = '''1 00:00:01,600 --> 00:00:04,200 English (US) 2 00:00:05,900 --> 00:00:07,999 This is a subtitle in American English 3 00:00:10,000 --> 00:00:14,000 Adding subtitles is very easy to do'''; srtParser() { List<Subtitle> subtitles = parseSrt

Parse a SRT file with jQuery Javascript

醉酒当歌 提交于 2019-12-05 03:31:15
问题 I'm trying to parse .srt but I get an internal error and I can't figure out what is it. Here is my code: var subtitles; jQuery.get('SB_LKRG-eng.srt', function(data) { //alert(data); function strip(s) { return s.replace(/^\s+|\s+$/g,""); } srt = data.replace(/\r\n|\r|\n/g, '\n'); //alert(srt); srt = strip(srt); //alert(srt); var srt_ = srt.split('\n\n'); alert(srt_); var cont = 0; for(s in srt_) { st = srt_[s].split('\n'); alert(st); if(st.length >=2) { n = st[0]; i = strip(st[1].split(' --> '

Parse a SRT file with jQuery Javascript

最后都变了- 提交于 2019-12-03 20:12:25
I'm trying to parse .srt but I get an internal error and I can't figure out what is it. Here is my code: var subtitles; jQuery.get('SB_LKRG-eng.srt', function(data) { //alert(data); function strip(s) { return s.replace(/^\s+|\s+$/g,""); } srt = data.replace(/\r\n|\r|\n/g, '\n'); //alert(srt); srt = strip(srt); //alert(srt); var srt_ = srt.split('\n\n'); alert(srt_); var cont = 0; for(s in srt_) { st = srt_[s].split('\n'); alert(st); if(st.length >=2) { n = st[0]; i = strip(st[1].split(' --> ')[0]); o = strip(st[1].split(' --> ')[1]); t = st[2]; if(st.length > 2) { for(j=3; j<st.length;j++) t +

Mapping corners to arbitrary positions using Direct2D

我的梦境 提交于 2019-12-02 04:38:27
问题 I'm using WIC and Direct2D (via SharpDX) to composite photos into video frames. For each frame I have the exact coordinates where each corner will be found. While the photos themselves are a standard aspect ratio (e.g. 4:3 or 16:9) the insertion points are not -- they may be rotated, scaled, and skewed. Now I know in Direct2D I can apply matrix transformations to accomplish this... but I'm not exactly sure how. The examples I've seen are more about applying specific transformations (e.g.

Mapping corners to arbitrary positions using Direct2D

我的梦境 提交于 2019-12-01 23:18:32
I'm using WIC and Direct2D (via SharpDX) to composite photos into video frames. For each frame I have the exact coordinates where each corner will be found. While the photos themselves are a standard aspect ratio (e.g. 4:3 or 16:9) the insertion points are not -- they may be rotated, scaled, and skewed. Now I know in Direct2D I can apply matrix transformations to accomplish this... but I'm not exactly sure how. The examples I've seen are more about applying specific transformations (e.g. rotate 30 degrees) than trying to match an exact destination. Given that I know the exact coordinates (A,B

Looking for a working example of addTimedTextSource for adding subtitle to a video from an .srt file in Android 4.1

ε祈祈猫儿з 提交于 2019-11-28 03:57:43
I have been trying to use an .srt file for a timed text source (Only available in android 4.1+ http://developer.android.com/about/versions/android-4.1.html#Multimedia ) . The first problem has to do with getting a file descriptor for the .srt file (in the assets folder, how else would you bundle it in your app?). The file gets compressed automatically so you won't be able to even see the file without changing compile settings or doing a custom build. The easiest solution was to rename the .srt file to .jpg so that it does not get compressed and the openFD method still works. I am now adding

Use ffmpeg to add text subtitles

本小妞迷上赌 提交于 2019-11-27 16:38:38
I am trying to add text subtitles to an .mp4 container using ffmpeg: ffmpeg -i input.mp4 -i input.srt -map 0.0 -map 0.1 -map 1.0 output.mp4 When I am trying to run this line, it gives me an error : Nmber of stream maps must match number of output streams. If I try to change the mp4 to mkv (although mp4 supports text subtitles), like this: ffmpeg -i input.mp4 -i input.srt -map 0.0 -map 0.1 -map 1.0 output.mkv It correctly maps the streams, but gives an error : Encoder (codec id 94210) not found for output stream #0.2 When I launch ffmpeg -codecs I can see that srt codec is supported as decoder

Looking for a working example of addTimedTextSource for adding subtitle to a video from an .srt file in Android 4.1

人走茶凉 提交于 2019-11-27 05:17:51
问题 I have been trying to use an .srt file for a timed text source (Only available in android 4.1+ http://developer.android.com/about/versions/android-4.1.html#Multimedia) . The first problem has to do with getting a file descriptor for the .srt file (in the assets folder, how else would you bundle it in your app?). The file gets compressed automatically so you won't be able to even see the file without changing compile settings or doing a custom build. The easiest solution was to rename the .srt

Use ffmpeg to add text subtitles

帅比萌擦擦* 提交于 2019-11-26 15:01:44
问题 I am trying to add text subtitles to an .mp4 container using ffmpeg: ffmpeg -i input.mp4 -i input.srt -map 0.0 -map 0.1 -map 1.0 output.mp4 When I am trying to run this line, it gives me an error : Nmber of stream maps must match number of output streams. If I try to change the mp4 to mkv (although mp4 supports text subtitles), like this: ffmpeg -i input.mp4 -i input.srt -map 0.0 -map 0.1 -map 1.0 output.mkv It correctly maps the streams, but gives an error : Encoder (codec id 94210) not

工具导航Map