Jump to content
adrian

Video Fieldtype

Recommended Posts

Hello,

For a current project (the same that is the first with so many specific requirements, and for which I use some of your modules), YouTube is ultimately not a (good) choice (viewers have to be blocked from being able to go to YouTube from the embedded video).

So I've just installed FieldtypeVideo.

I've tried to upload a 16.9 (Mo) mp4 video, but the "spinning-wheel" animated icon and the 100% on the red row are still there after several minutes. It doesn't change.

I've also tried with a 12.4 (Mo) file.

Apparently, the shared hosting (OVH) doesn't have ffmpeg and ffmpeg-php activated. So I guess it's probably the reason...

(Or could it be because of the sizes of the files?)

Does someone have (alternative) solutions?

I know there's vimeo plus/pro (but it's not really a solution for the association).

NB: I've tried to hide the YouTube icon at the bottom-right corner with css, but of course it doesn't work/is not "allowed".

Perhaps with js(?)

If I use Video.js, are ffmpeg and ffmpeg-php still needed? (Yes,) probably.

If there's no solution, I'll just let them be downloadable as they were on the old website.

Share this post


Link to post
Share on other sites

Hi @Christophe,

I expect the issue is the missing ffmpeg on the server, although they are only used for making the video thumbnail/poster image, so I could probably do a class check and if it's not available, just not generate the image. Would this be acceptable for your needs? It would of course mean that the player would have blank black screen until it starts playing the video.

Share this post


Link to post
Share on other sites

Hi @adrian,

This would be (very) good enough.

(Using UIkit,) I could perhaps (also) add a lightbox (http://getuikit.com/docs/lightbox.html)

I was thinking of perhaps inserting an image, and when clicking on it the lightbox would appear with the video, perhaps with a black background or another color before it (auto-)starts.

Meanwhile, I've found another "solution".

Using mp4 files (converted, optimized... by YouTube), they seem to be well played in different browsers.

It seems good enough for this project.

I'm using a file field (mp4 format only).

I'm thinking about using UIKit's lightbox also.

It can also just open in a new tab after clicking on a image.

Before finding your module I had thought about using videojs, creating pages with a video template, and perhaps fetching a video with a page field(?).

But, perhaps your module with your solution is better here.

Share this post


Link to post
Share on other sites

iam looking for a way to use this without ffmpeg (not supported by my hosting environment). I won't mind to upload a thumbnail manually.

are there any plans to support this?

youtube or vimeo are not an option for me.

thanks!

  • Like 1

Share this post


Link to post
Share on other sites

@jploch,

It sounds like you have the same needs as @Christophe. I have been meaning to take care of this but haven't managed to get to it just yet. I am currently traveling (mostly vacation), so can't guarantee when I will get to this, but it would be good to get this done shortly and tune this up for official release in the modules directory.

  • Like 4

Share this post


Link to post
Share on other sites

@adrian

sounds great! i think that would help a lot of people that can't use ffmpeg or have no experience on how to set it up.

enjoy your vacation! 

Share this post


Link to post
Share on other sites

@Christophe and @jploch - I have committed a very quick fix that allows this module to work even if you don't have ffmpeg installed. 

Obviously the ability to grab poster images for the video won't work. Also it won't be able to determine the length of the video. Both of these require ffmpeg.

I will revisit this again when I am back from vacation and add the ability to manually upload a poster image, but for now at least this module will work and you can now have the benefits of automatically playing videos with a simple:

echo $page->video_field->play;

Hope that helps as an interim improvement.

  • Like 3

Share this post


Link to post
Share on other sites

@adrian

thanks for your quick reply! now i get a error, when I install the module (new version from github):

Parse Error: syntax error, unexpected '[' (line 50 of /www/htdocs/w00dd152/projekte/jp/site/modules/FieldtypeVideo/InputfieldVideo.module) This error message was shown because you are logged in as a Superuser. Error has been logged.

Share this post


Link to post
Share on other sites

Sorry about that - you must be running PHP 5.3.x. I had some code in there that was 5.4+ only. I have made a fix so that it will work on 5.3. Please try again with the latest version on Github.

  • Like 3

Share this post


Link to post
Share on other sites

Hey!
Thank you for this module!
It worked fine for me with PW 2.6. without ffmpeg.

Now Iam working on a website running PW 3.0 and when I upload a video (mp4) it keeps loading even when it reaches 100% and the upload will not complete.
The same video is working and uploading just fine with PW 2.6.

Iam not sure if this is working with PW 3.0. so it would be great if someone could confirm this.

Share this post


Link to post
Share on other sites
4 hours ago, jploch said:

Hey!
Thank you for this module!
It worked fine for me with PW 2.6. without ffmpeg.

Now Iam working on a website running PW 3.0 and when I upload a video (mp4) it keeps loading even when it reaches 100% and the upload will not complete.
The same video is working and uploading just fine with PW 2.6.

Iam not sure if this is working with PW 3.0. so it would be great if someone could confirm this.

It's working fine for me on PW 3 - what's the ajax error that is stopping things? console > network tab 

Share this post


Link to post
Share on other sites

Thanks for the quick reply!
Here is the error: 

Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Function.parseJSON (JqueryCore.js?v=1487348736:2)
    at XMLHttpRequest.<anonymous> (InputfieldFile.js:256)
parseJSON @ JqueryCore.js?v=1487348736:2
(anonymous) @ InputfieldFile.js:256

 

 

Share this post


Link to post
Share on other sites

@jploch - you need to dig a little deeper - we need to see the Response tab for the file that results in error - there will be an error message in the returned response that is breaking the upload.

Share this post


Link to post
Share on other sites
9 minutes ago, adrian said:

@jploch - you need to dig a little deeper - we need to see the Response tab for the file that results in error - there will be an error message in the returned response that is breaking the upload.

Sorry Iam not sure how to see the response tab in chrome (more designer, than developer, but Iam learning).

On the source tab I get this error. Maybe this helps?

<br />
<b>Notice</b>:  Trying to get property of non-object in <b>/www/htdocs/w00dd152/projekte/jp-relaunch/site/modules/ImageExtra/ImageExtra.module</b> on line <b>722</b><br />
[{"error":false,"message":"Added file: portfolio_screencap_02.mp4","file":"\/jp-relaunch\/site\/assets\/files\/1162\/portfolio_screencap_02.mp4","size":3214711,"markup":"<li id='file_c17b44756649023a42ba014c5b29202c' class='InputfieldFile InputfieldImage InputfieldVideo ui-widget'>\n\t\t<p class='InputfieldFileInfo ui-widget ui-widget-header'>\n\t\t\t<span class='ui-icon ui-icon-arrowthick-2-n-s'><\/span>\n\t\t\t<span class='InputfieldFileName'>portfolio_screencap_02.mp4<\/span> \n\t\t\t<span class='InputfieldFileStats'>• 3,139 kB • <\/span> \n\t\t\t<label class='InputfieldFileDelete'><input type='checkbox' name='delete_video_repeater1162_c17b44756649023a42ba014c5b29202c' value='1' \/><span class='ui-icon ui-icon-trash'>Delete<\/span><\/label>\n\t\t\t<a class='InputfieldFileMove InputfieldFileMoveBottom' href='#'><span class='ui-icon ui-icon-arrowthickstop-1-s'><\/span><\/a> \n\t\t\t<a class='InputfieldFileMove InputfieldFileMoveTop' href='#'><span class='ui-icon ui-icon-arrowthickstop-1-n'><\/span><\/a> \n\t\t<\/p>\n\t\t\t<div class='InputfieldFileDescription'><label for='description_video_repeater1162_c17b44756649023a42ba014c5b29202c' class='detail'>Description<\/label><input type='text' name='description_video_repeater1162_c17b44756649023a42ba014c5b29202c' id='description_video_repeater1162_c17b44756649023a42ba014c5b29202c' value='' \/><\/div>\n\t\t<br \/><label class='InputfieldFileDescription'><span class='detail'>Subtitles<\/span>\n\t\t<br \/><br \/>In templates, you can access this subtitles file (portfolio_screencap_02.srt) using: <code>$page->video->eq(0)->subtitles<\/code><br \/>In templates you can access a formatted transcript (converted from subtitles entered in SRT format), by using: <code>$page->video->eq(0)->transcript<\/code>\n\t\t<br \/><br \/><textarea rows='10' name='subtitles_video_repeater1162_c17b44756649023a42ba014c5b29202c' \/><\/textarea>\n\t\t\t<input class='InputfieldFileSort' type='text' name='sort_video_repeater1162_c17b44756649023a42ba014c5b29202c' value='0' \/>\n\t\t<\/p><\/li>","replace":false,"overwrite":0}]

 

Share this post


Link to post
Share on other sites

Ok, so based on the error, it's clear it's an issue with the ImageExtra module. Make sure you are using the latest version of that module and if you're still having problems you may need to request support in its forum thread, although it might be as simple as disabling that module on this video field.

 

  • Like 2

Share this post


Link to post
Share on other sites

you are right!
even with the newest version it wasn't working.
after disabling the module it worked as expected.

I will post this issue in the image extra forum thread, maybe someone can fix this.
Thanks for your help!

Share this post


Link to post
Share on other sites

Hi adrian,

thanks for this module.
i´ve installed the module with pw 3.0.56.
my problem ist, that i can´t save a mp4 file. i can drag the file but after pushing the "save"-button the mp4-file dissapears.
Do you have any suggestions, what i could try to get this to work?

Many Tanks!

  • Like 1

Share this post


Link to post
Share on other sites

Hi, FYI, Adrian is still away for a few weeks, see:

 

  • Like 2

Share this post


Link to post
Share on other sites

Hi @itsberni - looks like that is a new issue in recent versions of PW. I have committed a fix which seems to take care of things here - can you please test and let me know if it works for you?

  • Like 3

Share this post


Link to post
Share on other sites

Hi Adrian, thanks for this Information. I'am quite busy at the Moment. I will test it out asap.

Share this post


Link to post
Share on other sites

@adrian Saving works now. Many thanks!!!
But there is no poster-file generated. The file the modules generates is poster="/site/assets/files/1/". But this file doesn´t exist ( according to fire-Bug )

Share this post


Link to post
Share on other sites
9 hours ago, itsberni said:

But there is no poster-file generated.

Do you have ffmpeg and ffmpeg-php installed and running correctly? Maybe that's not the issue and there is something else new that is breaking poster generation, but please confirm that you have those.

Share this post


Link to post
Share on other sites

i think my hoster( strato )doesn't support that . Does anybody from you know how to get this working with strato?
@adrian without this, there is no solution for a poster-image, right?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...