php_ffmpeg v0.19 break php_ffmpeg service

Created on 3 February 2022, over 2 years ago
Updated 25 May 2024, about 1 month ago

Problem/Motivation

This module use drupal/php_ffmpeg and breacks with newest version of the php-ffmpeg (v0.19.0).

https://www.drupal.org/project/php_ffmpeg/issues/3256578 🐛 Incompatible with newest version of the php-ffmpeg (v0.19.0) package, Drupal 10 compatibility Fixed

Steps to reproduce

Update composer packages with "composer update"

Proposed resolution

Either lock the version of the dependency to v0.18.0, or fix #3256578 🐛 Incompatible with newest version of the php-ffmpeg (v0.19.0) package, Drupal 10 compatibility Fixed

Feature request
Status

Closed: outdated

Version

1.1

Component

Code

Created by

🇮🇹Italy arturopanetta Grotteria (RC)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States sidgrafix

    Hello, I'm attempting to work with this module (more specifically version 1.2 of this module) but since it is currently locked to php-ffmpeg library v0.18, composer won't install it because it conflicts with existing requirements. Unfortunately I need to stay with version 0.19 minimum of the php-ffmpeg library for other modules to work properly.

    Do you know what "breaks" in this module (per title of this issue)? Perhaps it is something I can work on or offer patches for to make this module work with a minimum of php-ffmpeg v0.19 as I am using the patch listed above (issue: 3256578) with the php_ffmpeg module.

    Also, I was wondering why there is no 'current dev' version for this module which is useful when applying patches or modifying locally for testing (especially for things like this "using php-ffmpeg v0.19 and testing versus v0.18"). Usually a dev version would include the latest module version plus any additions for testing (features, bug fixes, etc.) for future releases of a module. I suppose I can just manually download modify and install the latest version removing the requirement to test, but a current dev version would be nicer considering you can't patch a composer.json file for a module because patching happens after composer calculates dependencies and installs packages or I would have removed the dependency myself just to poke around and test. For example a current dev version of this module could have a requirement set to ^0.18 making v0.18 the minimum requirement to work but allow for testing with v0.19 or even v1.x (as the php-ffmpeg library has actually progressed to v1.1.0).

    From appearances this module looks to be a lot farther along and is actually useable with FFMPEG transcoding where many other modules like the "video" module don't actually currently do anything (which in part has made my life hell trying to migrate/rebuild a huge Drupal 7 site that is heavily dependent on transcoding using the video module to Drupal 9 or 10) - that said I'm looking to use this module as a replacement to the video module as I've given up hope for that module working in the next month or so as Drupal 7 end of life nears ever closer. Plus it makes more sense to use this module over the video module regardless because this has adaptive streaming - it was kind of a fluke I stumbled onto this module as I was starting down a road to build the site it's own module to handle transcoding on video upload and while searching FFMPEG and php-ffmpeg documentation throughout I noted several references to adaptive streaming which lead me to start researching adaptive streaming (figured if I got to build it from scratch adaptive would be the way to go) and a few searches later this module popped up and seamed to be the answer for the needs of site I'm working on. "Fingers crossed it is..."

  • 🇮🇹Italy arturopanetta Grotteria (RC)

    Hi sidgrafix,
    this is first commit for D10 compiance https://git.drupalcode.org/project/streaming/-/commit/83525409b950317912...

    See also https://www.drupal.org/project/php_ffmpeg/issues/3365929 Port to D10? Closed: duplicate

    Ciao :)

  • 🇮🇹Italy arturopanetta Grotteria (RC)
  • 🇮🇹Italy arturopanetta Grotteria (RC)
  • 🇺🇸United States sidgrafix

    @arturopanetta, I'm happy to see your moving forward towards D10.

    I've actually been successfully using this with php-ffmpeg v0.19 for a couple weeks now playing with some things. Had to patch a few things, some in the streaming library as well (plus one other module we use media_thumbnail_video), I am currently working on adding a transcoding queue submodule to better facilitate upload media fields (set to streaming video) on node-content type for users that don't have access to the media library interface (non-admin accounts). Using a QueueWorker and Cron. At some point I wanna try and add real-time feedback (percent processed, time remaining, etc.) as part of the manual transcoding trigger from the media library page at admin/streaming/transcode-media/$mid instead of just redirecting back to the content/media library page and waiting (for what could be well over an hour depending on the original video file size) and yes I did find you didn't actually have to wait on the redirect page for the transcoding success or failure confirmation if you didn't want to which was at least nice being some of the videos I've run through this module are upwards of 4GB plus and they transcode without error now. I also have been testing with pretty much every video format as the upload source and everything works quite beautifully (but on that note we only use HLS .ts encoded with H.264) so I have no way of knowing if any format would also transcode to dash). So everything I'm doing and have done may only apply to HLS or at least for now as it stands.

    Plus...and this is a personal preference (I made the libraries for the player locally served) as well as any other externally sourced file by downloaded them added them to assets (for now and rewrote the libraries.yml to reflect it) The reason is part personal preference and part security being we use CSP (Content Security Module) having them locally served uncomplicates a few things with CSP. I think in this situation it may be better to offer users the option of loading from external source or adding as a local library (many modules offer that as an option), not too mention if you serve locally you don't have to worry that a CDN or remote file resource goes offline or get deleted, changed or removed.

    At some point I was planning to create a fork to at least offer the options to others with possibly even a new branch in the future. However right now I'm over my head in working to get a massive D7 site rebuilt to D9/10 where this module is replacing the video module used in D7 so when I can actually get to that may not be for quite some time. It's a bit unfortunate migrate wasn't an option for the site in question as most modules used either don't have a D9/10 version available or if it does "like the video module" it's incomplete and doesn't really do anything in it's current state. So I'm not only trying to replace the video module but quite a few others as well and time is running out.

    I do have to say I'm loving this module "it actually works!" Thank you...

    Next chance I get I'll run through my notes and at least list the files I've patched and the errors and warnings I was getting prior to patching, some of which may be PHP version related.

  • 🇮🇹Italy arturopanetta Grotteria (RC)

    Thanks for the feedback, I'm carrying out this module in my free time (which isn't much). If you want to send some code it's really welcome <3

  • 🇺🇸United States sidgrafix

    Awesomsauce... I'd be happy to offer some code to this project. Would you prefer it as a patch here, or as a new branch. Just give me a day or two (end of week the latest) to clean a couple things up and I'll post what I've got.

    Aside from patches I've got a queue working as a sub module to streaming like streaming_media_views (wouldn't call it pretty) I've got a bit left to do on it yet for all the bells and whistles but it works. Currently it's called streaming_transcode_queue which uses a cron queue worker as well as a manual queue interface with a table to view queue items and process them manually or in bulk.

    Anyway, let me know your preference on submitting code to the project and it will be done.

  • 🇮🇹Italy arturopanetta Grotteria (RC)

    @sidgrafix Thank you and what a wonderful thing you are doing.

    For the queue module I opened a specific issue https://www.drupal.org/project/streaming/issues/3393523 Feature: streaming_transcode_queue Active , click on the button to create your fork on git and then send a merge request.

    For other issues I think it is better to open other issues so we can keep track of everything.

    Thanks for what you're doing

  • Status changed to Closed: outdated about 1 month ago
  • 🇮🇹Italy arturopanetta Grotteria (RC)

    I am closing this page as php_ffmpeg has been updated to drupal 10

Production build 0.69.0 2024