Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 174469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:31:40+00:00 2026-05-11T13:31:40+00:00

I’ve created subtitles for a video in mp4 format, that i would like to

  • 0

I’ve created subtitles for a video in mp4 format, that i would like to put online, as an FLV file. Is it possible to have the subtitles played along with the flv file without integrating them into the video images, so keeping them in srt format ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:31:40+00:00Added an answer on May 11, 2026 at 1:31 pm

    I found a way, using JW flv player :

    1. convert your .srt file to an xml file (php code below)
    2. then add a variable ‘captions’ pointing to your xml file:

    s0.addVariable(‘captions’,’path/to/subtitles.xml’);

    live example here

     // script to convert multi-line srt caption files to new-format (02-05-08) tt XML caption files $use_cdata_tags = true; $debug_output = true;  // the directory to write the new files in // it must exist, be writeable, and be outside of the directory that is being scanned $new_directory = '../temp/';  /////////////////////////////////// no user configuration below this \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\  // get filename or scan directory if it's a directory $filename = (isset($_GET['filename'])) ? strval($_GET['filename']) : './';  // read each file into an array $it = new RecursiveDirectoryIterator('$filename');  foreach(new RecursiveIteratorIterator($it) as $file) {  // debug('Filename', $file); exit; // debug('Ext', substr(strtolower($file), (strlen($file) - 4), 4));// exit;  // debug - only use test file // if($file == '.\multi-line_test_file.srt')    // check for .srt extension   if(substr(strtolower($file), (strlen($file) - 4), 4) == '.srt')   {     $ttxml     = '';     $full_line = '';      if($file_array = file($file))     {       // write tt , head, and div elements for the new file      $ttxml .= '';       $ttxml .= '\n';       $ttxml .= '  \n';       $ttxml .= '  \n';       $ttxml .= '  \n';       $ttxml .= '    \n';        foreach($file_array as $line)       {         $line = rtrim($line);  // debug('Line', $line);          // get begin and end         //                00  :  00  :  32  ,   000   -->   00  :  00  :  37  ,   000         if(preg_match('/(\d\d):(\d\d):(\d\d),(\d\d\d) --> (\d\d):(\d\d):(\d\d),(\d\d\d)/', $line, $match))         {           $begin = $match[1] . ':' . $match[2] . ':' . $match[3] . '.' . $match[4];           $end   = $match[5] . ':' . $match[6] . ':' . $match[7] . '.' . $match[8];           $full_line = '';         }         // if the next line is not blank, get the text         elseif($line != '')         {           if($full_line != '')           {             $full_line .= '
    ' . $line; } else { $full_line .= $line; } } // if the next line is blank, write the paragraph if($line == '') { // write new paragraph // Nothing is going on. if($use_cdata_tags) { $ttxml .= ' \n'; } else { $ttxml .= ' ' . $full_line . '\n'; } // debug('Text', $line); // debug('ttxml', $ttxml); exit; $full_line = ''; } } // write ending tags $ttxml .= ' \n'; $ttxml .= ' \n'; $ttxml .= '\n'; // write new file $new_file = $new_directory . substr($file, 0, (strlen($file) - 4)) . '.xml'; $fh = fopen($new_file, 'w') or die('Can\'t open: ' . $new_file); fwrite($fh, $ttxml) or die('Can\'t write to: ' . $new_file); fclose($fh); } } } function debug($title, $value) { global $debug_output; if ($debug_output) { print '
    ';     if (is_array($value))     {       print $title . ':\n';       print_r($value);     }     else     {       print $title . ': ' . $value;     }     print '

    \n'; } } ?>

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I have a reasonable size flat file database of text documents mostly saved in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.