support mp4 video via HTML5 <video> tag

865 views
Skip to first unread message

vpl

unread,
Sep 29, 2017, 12:42:27 PM9/29/17
to TiddlyWiki
Hi,

I'm trying to embed a video located on my file system where my tiddlywiki file is based

I'm using 

<video width="320" height="240" controls>
  <source src="video/Chorus-newJazz-132132321.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

I get the video but no sound. !! 
I can start / stop the video 
I've tested on Firefox and Chrome

When I open the video with VLC media I can hear the sound.

Any idea ?

Something that I'm not doing right ?

Thanks again for your support and help

Regards

Vpl

Mark S.

unread,
Sep 29, 2017, 1:04:16 PM9/29/17
to TiddlyWiki
I've had various trouble with the video tag and kind of gave up on it.

If you load the path to your file in your browser (without TW) can you see and hear it? If the browser codecs can't do it, then neither will TW.

Good luck,
Mark

Xavier Cazin

unread,
Sep 29, 2017, 1:18:39 PM9/29/17
to tiddl...@googlegroups.com
Hello Vpl, Mark,

What about creating a dedicated tiddler, with a mime type of value video/mp4 and a _canonical_uri field of value ./video/Chorus-newJazz-132132321.mp4 (assuming video/ is a directory immediately below your tiddlywiki's directory) At least, it works for me.

Cheers,

-- Xavier Cazin

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c8d1c0d1-ccd8-4fb5-a26f-85d97e39ec12%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

pedruchini

unread,
Sep 29, 2017, 6:08:34 PM9/29/17
to TiddlyWiki

If you are using mac OS X, if the video.mp4 uses the audio mp3 codec then it plays just fine everywhere but QuickTime, in QuickTime the video plays but there is not audio (works just fine in VLC player tho.)

If we encode the same file but use AAC for the audio codec then it works just fine in QuickTime.

In don't know for web browsers, but on mac OS X it is best and safer to use AAC (i.e. will it work on a broad range of devices).

Check with vlc what audio codec is using your mp4 video file. If it's mp3, then try to transcode it into acc. 

Greg Davis

unread,
Sep 29, 2017, 6:59:47 PM9/29/17
to TiddlyWiki
Hi vpl,

Agree with pedruchini.

Your code appears to be correct,  I've been playing around with embedding videos https://groups.google.com/d/msg/tiddlywiki/TL8N40F0DVQ/B0NlKmA9FAAJ

You mentioned the sound did not work in Firefox or Chrome but did work in VLC. You did not mention which OS.

I do my initial work on an old Windows XP laptop. In Firefox, MP4s would not work at all. If converted to WEBM or OGV they would, but those are using different codecs.

The MP4s would play in Chrome on XP, it includes some codecs. The MP4s would play in both Firefox and Chrome under Windows 8.1.

It is possible that your OS does not support, or have, the audio codecs for the MP4. VLC includes many popular codecs so it may recognize your MP4.

In VLC under Tools you can check the codecs, both video and audio. If the audio is not something common like AAC or MP3 that might be your problem.

If you must have that video, you might try converting it.

Good Luck,
Greg


vpl

unread,
Sep 30, 2017, 12:36:20 PM9/30/17
to TiddlyWiki
Hi

Thanks very much for these different directions of work
In fact I've not done the test to try to play directly the .mp4 into the browser.
And that does not work...

Meaning that the problem is really around the browser video format supprt ..!

I was able to transform the original format to one which is correcly rendered by my browser and that works perfectly on TiddlyWiki

This space of video format is not something easy to manage..!

Thanks a lot

Vpl
Reply all
Reply to author
Forward
0 new messages