Zum Inhalt

HTMLHelp (DRAFT !!!)

Compiled Help (CHM) and video format

The short answer is - I am not aware of any application that works with integrated .mp4 videos today.

After a few current attempts, I can only confirm the statement already made by Tim Green in 2014 (see link under comments):

.. CHM now only permits embedding of SWF video files. All other video file formats must be external to the CHM, otherwise they won't play.

Please note following hints quoted from About using video files

Use online video services in CHM. Help+Manual handles this so that the online site is only accessed when the user actually clicks on the preview image to start the video.

Local video formats will always cause problems in CHM files for at least some of your users and should be avoided.

Since the termination of Flash support, Microsoft CHM files no longer support embedding for any video formats. MP4 video files can be embedded in Windows eWriter eBooks. All other video files must be distributed with your help as separate files.

Some links for further information:

For special cases I remember some old stuff to leave the video files outside the help file and use scripting to reference them. Including large video files in your help project could result in an enormous compiled help file. There may also be times when you need to update these files.

        <title>Example link to video</title>
        <script type="text/javascript">

function GetCurrDir() {

  // This function gets the absolute path to the directory that contains
  // the help file. See http://tinyurl.com/yv5xlt for an explanation of
  // what these lines are doing.

  var X, Y, sl, a, ra, dir, dir2;

  ra = /::/;
  a = location.href.search(ra);
  if (a <= 0) return("");
  X = 0;
  ra = /:/;
  a = location.href.search(ra);
  if (a == 2) X = 14; else if (a > 2) X = a+1;
  sl = "\\";
  Y = location.href.lastIndexOf(sl);
  dir = location.href.substring(X, Y);
  dir2 = unescape(dir);
  return(dir2 + "\\");

function playVideo(theVideo) {
  // Get the absolute path to the current help directory.

  var path =  GetCurrDir();
  // Make a new Media Player control.
  var control = "<object id='mediaPlayer' " +
                "classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' " +
                "type='application/x-oleobject'>" +
                "<param name='fileName' value='"+ path + theVideo + "'>" +
                "<param name='autoStart' value='true'>" +
                "<param name='showControls' value='true'>" +
                "</object>" +
                "<p><a href='JavaScript:history.back()'>Go back</a></p>";

  // Add the new control to the page.


    <h1>Test case for video</h1>
    <h2>Video 1</h2>
    <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
    <!-- Clicking this image passes the name of the required video file to the playVideo function above. -->
    <a href="JavaScript:playVideo('external-files/HTMLHelp-CHM.mp4')"><img src="../images/extlink.gif" /></a>

Microsoft Docs Example: Link to a File Outside of Your Help System


Some sample test files for creating a CHM file.