I'm looking for a way to index video subtitles within Alfresco. Ideally I'd like to return the specific point in a video where the caption was found.
Does anyone know of a way to do this with standard .mp4 and .srt files?
Related
I have several .ts files, generated by ffmpeg from live stream. All of them have the same length (well, approximately). Ideally, they are being generated constantly, with names representing the datetime when they have been recorded (for example, "2019-04-11_10-51-40.ts"). But it may happen so, that for any technical reasons recording was being stopped for a while and files have not been generated.
Now, I have a task to create a playlist of these files for a certain datetime range - and if there are no files for part of this range, I need to show just a black screen. I have a black video for this purpose with the same length as other files. So, I'm trying to manually create an .m3u8 file and insert this black video in all gaps between normal videos that I have. For example:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:34
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:30.07,
http://example.com/black_video.ts
#EXTINF:30.07,
http://example.com/black_video.ts
#EXTINF:33.33,
http://example.com/2019-04-11_10-51-40.ts
#EXTINF:33.33,
http://example.com/2019-04-11_10-52-15.ts
#EXTINF:25.00,
http://example.com/2019-04-11_10-52-48.ts
#EXT-X-ENDLIST
The problem is that when I'm trying to play this playlist, it does not play correctly: depending on player either only one black part is being played no matter how much of them there are in a sequence (VLC), or player is getting stuck after first black video ("Play HLS M3u8" extension for Chrome or player on our own service, based on hls.js).
I also tried to use #EXT-X-DISCONTINUITY; in this case all videos are being played, but progress bar drops to the very beginning after each #EXT-X-DISCONTINUITY appearance, which is also an undesired behaviour. Example:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:34
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:30.07,
http://example.com/black_video.ts
#EXT-X-DISCONTINUITY
#EXTINF:30.07,
http://example.com/black_video.ts
#EXTINF:33.33,
http://example.com/2019-04-11_10-51-40.ts
#EXTINF:33.33,
http://example.com/2019-04-11_10-52-15.ts
#EXTINF:25.00,
http://example.com/2019-04-11_10-52-48.ts
#EXT-X-ENDLIST
As for black videos themselves, I tried several options: each link was to the same file; each link was to a different symlink to the same file; each link was to a separately generated black video - none of them worked.
As of now the only way I found is to collect all normal videos for the time range, fill the gaps with black video files and then combine them into one file with ffmpeg -f concat and split the concatenated file back to parts. But this approach works way longer than manual m3u8 file creation, so I would like to avoid it.
So, what could be the reason of manually formed playlist not working correctly and how could I fix that? May it be the problem with playlist itself, or playlist is technically fine but players I used possibly don't fully implement the specification?
TLDR: I am creating m3u8 playlist manually and I want to insert the same video multiple times into this playlist. Unfortunately, such playlist is not being played correctly: depending on player either this inserted video is being played only once no matter how many times has it been included, or playing is getting stuck after the first inserted video part. May it be that there is something wrong with playlist and how can this be fixed?
Add a #EXT-X-DISCONTINUITY tag before and after black_video.ts file and change the #EXT-X-VERSION tag to 5. That should fix the issue. This solution worked for me on VLC player.
I'm building a project where people can upload files, I would like to then display those files in a browser where people can interact with them (vote, comment etc)
However, this means I need to programatically build the html depending on the format of the video or image. Is there a way to feed a file (or filename) into a library, and determine whether I need to display it in a video element or an image element? Even a list of video formats vs image formats would help but I haven't seen anything in regards to that.
No module can reliably determine the file type. The user could either change the extension or even the magic number of the file to obfuscate it. The only reliable way it to try to pass file to some image / video transcoder to let it decide or error out if the format is invalid. This way you know you are working with known formats since all files are transcoded to your specific extensions. That could be mp4 or png. I recommend using handbrake for videos and sharp for images. Leaving the NPM links down below:
https://www.npmjs.com/package/handbrake-js
https://www.npmjs.com/package/sharp
Is there a way to download subtitles/closed captions from pluzz fr or the beta version, http://pluzz.francetv.fr, please?
Here's an example video that comes with closed captioning (Tout le monde veut prendre sa place): http://pluzz.francetv.fr/videos/tout_le_monde_veut_prendre_sa_place_,69573658.html
By the way, you'll need a French IP to watch the video.
Regards.
I've been looking into this as well and have made some progress. To update your example, (to a video that is available for the next 6 days) I've used http://pluzz.francetv.fr/videos/tout_le_monde_veut_prendre_sa_place_,70697467.html
Using the ID number at the end of that URL, go to this URL to get the XML-like info file about that program i.e. www.pluzz.fr/appftv/webservices/video/getInfosOeuvre.php?mode=zeri&id-diffusion=70697467
If you look in that resulting file, you will see various into about the program including at the end: incrust type="accessibilite". If subtitles are available, this is followed by a relative URL pointing to the subtitle file. For this example, you can see:
<incrust type="accessibilite">/appftv/webservices/video/getFichierSmi.php?smi=france2/70697467.smi&source=azad</incrust>
Prefix that relative link with the pluzz website, and the result is: http://www.pluzz.fr/appftv/webservices/video/getFichierSmi.php?smi=france2/70697467.smi&source=azad
which which provides you with the subtitles in SAMI format (file extension .smi). This is an XML like subtitle format, but I haven't (yet!) found any player that can correctly display them nor found an easy way to convert them into a clean SRT format. However, I do think it would be a relatively simple task (for someone with some programming skills) to convert it into SRT format, but that isn't me... Perhaps the OP has those skills and can take it from here??
PS. Also of interest is the fact that you don't need a French IP to access the info file or the subtitles file, just the video file.
I am now trying to write a music player using Gstreamer.I know that mp3 files are made up with frames (data frame and tag frame).what i want to do is extract the data frame and calculate its hash to identify a file. what should i do?
thinks in advince!
this all is done by gstremer mad element. So if you are writing application then use this element.
NOTE: mad element is comes inside gst-plugin-bad package which you can download from gstremer site
How do you display audio files like an imagepicker? I'm using the MPMediaplayer class but I can't get it to work. My requirement is to click on a tableviewcell, and have audio files appear like an imagepicker.
simple get the path of all audio files. and parse the name only from the path. store all the names in array and display in UITableView. just read about how to use nsfilemanager.