More htmlVideoLoader woes ...

Help for using specific functions

More htmlVideoLoader woes ...

Postby Robert Stevenson » Sat Nov 15, 2014 3:35 pm

I have been "playing" with one page of an older book that required updates to sound and video files to work on the web. Sounds have been converted to .mp3 and stored in the (treemanaged) folder "sounds" and video converted from .swf to .mp4 and stored in "videos" folder. On export the sound file appears in the exported "sounds" folder and the "Movie1.mp4" appears in the exported "videos" folder. So far so good. When I view the exported page locally I get the sound but no video (Error "FLASH:srcnot found". Launched from a web server I don't get the sound or the video (but do get the same error message). On setting up in the AE I notice that what use to be "srcMP4" is now "srcMP4_youTube" which I have specified as "..videos/Movie1.mp4" tbName = "videofield" and loop is set to "true". Any thoughts as to why this isn't launching?
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: More htmlVideoLoader woes ...

Postby Clifton » Sat Nov 15, 2014 3:45 pm

Robert Stevenson wrote:I have been "playing" with one page of an older book that required updates to sound and video files to work on the web. Sounds have been converted to .mp3 and stored in the (treemanaged) folder "sounds" and video converted from .swf to .mp4 and stored in "videos" folder. On export the sound file appears in the exported "sounds" folder and the "Movie1.mp4" appears in the exported "videos" folder. So far so good. When I view the exported page locally I get the sound but no video (Error "FLASH:srcnot found". Launched from a web server I don't get the sound or the video (but do get the same error message). On setting up in the AE I notice that what use to be "srcMP4" is now "srcMP4_youTube" which I have specified as "..videos/Movie1.mp4" tbName = "videofield" and loop is set to "true". Any thoughts as to why this isn't launching?


Just happened to be online and can see the following issues:
  • srcMP4_youTube should be "../videos/Movie1.mp4" as the string you have specified is an invalid path.
  • loop should be true without the quotation marks as the value must be boolean or else the function treats it as false.

Generally, the video will not play unless run from a server.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: More htmlVideoLoader woes ...

Postby Robert Stevenson » Sat Nov 15, 2014 7:48 pm

Missing something here. I can't see a difference in what I posted for the path specified as "..videos/Movie1.mp4" and what you showed as the correct path. I'll stare while longer on it.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: More htmlVideoLoader woes ...

Postby Robert Stevenson » Sat Nov 15, 2014 7:51 pm

I see the light! Back to the project. Thank you.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: More htmlVideoLoader woes ...

Postby Robert Stevenson » Sat Nov 15, 2014 8:14 pm

Hmmm ... video doesn't play automatically but when you do click on play I get a black movie ... no sound file playing on the page either
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: More htmlVideoLoader woes ...

Postby Clifton » Sat Nov 15, 2014 9:09 pm

Remember that the sound must be loaded using pgSoundLoader() and that the folder location is something like "../sounds/myfile.mp3". Note the forward slashes. If the content cannot find the file in the path it won't play.

Regarding the black video:
This sounds like an encoding issue. If the video area becomes black, then the file has been located just fine; but the encoding may not be compatible with the CODECS for web deployment. Sometimes people will encode mp4 video as mpeg and then wonder why they will not play. The best CODEC for web use is h.264 and I find the best encoding video converter is the program called "Super Simple Video Converter". The program is freely available on the web and is very easy to use. Some have submitted their non-playing videos to me and all I've done is just re-encode them using the Super Simple Video Converter and they play fine. The only other reason for a black video is that the video player is buffering the entire movie before it begins playing. This problem is also related to the way the video was encoded, but I don't think this is the issue you are experiencing.

Regarding having to click to play:
Set autoPlay = true (no quotation marks or the function will assume autoPlay = false)

So in conclusion:
  1. I think your video is attempting to play, but is not encoded in a way that the browser can understand. It may play in Firefox, but not IE, but the point is the encoding is not very cross-browser compatible.
  2. I think your sound does not play because the function cannot find the file in the path for the parameter called url_playList. And it is important to use pgSoundLoader() to load and play the mp3 files.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: More htmlVideoLoader woes ...

Postby Robert Stevenson » Sun Nov 16, 2014 7:20 pm

Video now plays! Yes! (Although I am curious if there is an ideal container size to play the video that avoids the black bars at either side). Still trying to get the sound to play on the same page at the same time. Is that an issue ... "on load page" playing both an .mp3 and an .mp4 file. It is playing in the export file locally ...
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: More htmlVideoLoader woes ...

Postby Robert Stevenson » Sun Nov 16, 2014 8:01 pm

Sound is now good ... one of those upper-case/lowercase issues. Dang.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: More htmlVideoLoader woes ...

Postby Clifton » Sun Nov 16, 2014 9:45 pm

You can use htmlVideoStyles() to make the video background transparent.

However, the best approach is to calculate the aspect ratio (x/y size) of the video and size the ToolBook container to the same aspect ratio. Then the video will completely fill the container without revealing the canvas background.
  • Example: If your video is encoded at 800 x 600 and the width of your ToolBook field is 400px:
    800 / 600 = 400 / y
    300 = y
    (In this case you would set you field (container) height to 300px.)
    Now when the video plays it will exactly fill the field or container area without revealing any background canvas.
You can play sound and video at the same time. You can even set timeMarkers that a sound specific and ones that are video specific. The user events will be sent to which ever field is being used as the target container for the media (whether video or audio). One note, though is that if your video is intended to synchronize with the audio, it is better to encode them as one file to maintain synchronization. But if that is not required, then you can keep the media files separate without a problem.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: More htmlVideoLoader woes ...

Postby Robert Stevenson » Mon Nov 17, 2014 1:58 am

Video is now great ... sound is working ... but an 11 page book update is still causing my ulcers to burn. Could possibly suggest why on export a navigation panel would be disabled for the "next" button? I earlier had a situation where it would progress nicely to the 6th page but then refused to move to page 7. Its got me baffled ... widget is one right out of the catalog.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am


Return to Function Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron