There’s no metadata involved. Automatic encoding is triggered by the add_attachment action.
Thank you! I´ve uploaded the video with different post metas from frontend, but it´s not automatically encoded. Is it possible to define a post meta, which triggers die encoding or any other option?
There is no post meta to trigger encoding. The encoding should start when the add_attachment action is triggered. It’s almost impossible for your frontend uploader plugin to skip this step, so there’s some other reason why encoding doesn’t start. Especially if thumbnails are generated automatically but encoding doesn’t start. Both automatic events are part of the same function. Is this a freely available frontend publishing plugin? It’s very difficult for me to just guess at what could be causing this problem.
No, it´s a premium plugin, but I could send it to you, if you would like to. I need to know, what I can tell the plugin support, but it could be that the problem is at your plugin – don´t know, how to test / figure it out.
Hi,
I´ve got updates. Problem is that the encoding path is build wrong, because it mixes the server path with the attachment media url for encoding. That´s because the frontend uploader uses a specific post meta, which upload the file as attachment, but add an url string for the post meta and it seems that your plugin recognizes these url first at media section although the media file looks like all others and thumbnail is generated automatically. It seems that your plugin grabs the file at the wrong position.
Is there a possibility to use if clauses or cases for getting a working file path, if the encoder recognizes a http? Now the path for your plugin looks like:
/var/www/localhost/htdocs/wordpress/wp-content/uploads/http://xy.de/wordpress/wp-content/uploads/2015/10/prism-is-a-dancer-life-of-sven-iphoneswelcome-neo-magazin-royale-mit-jan-bohmermann-zdfneo.mp4: No such file or directory
Regards,
For encoding purposes, my plugin gets the video path using the WordPress function get_attached_file(). That function reads the value of the post meta entry _wp_attached_file, which it expects to be something like ‘/2015/10/videofile.mp4’ and combines it with the file path to the uploads directory. _wp_attached_file is a relative path because it’s also used for functions like wp_get_attachment_url(), which adds the URL to the uploads directory to the value of _wp_attached_file. If for some reason the frontend uploader is saving a complete URL instead of the relative path in _wp_attached_file, then I would ask why the frontend uploader is doing that.