videojs_media_migrate
Provides Migration API configurations to migrate VideoJS Mediablock block content entities to the modern VideoJS Media content entities. If you are moving from the videojs_mediablock module to videojs_media, this module automates that data migration via Drush.
Features
The videojs_mediablock module stores all video/audio content in a single block content bundle with up to five media fields. The videojs_media module replaces that with five lean, bundle-based content entities — one per media type — each carrying only the fields it needs.
This module bridges the two by providing five Migration API configurations (one per destination bundle) and a custom source plugin that inspects each videojs_mediablock block, determines the correct destination bundle, and maps its fields accordingly:
- videojs_migrate_local_video — local MP4/WebM/OGG video files
- videojs_migrate_local_audio — local MP3/OGG/AAC audio files
- videojs_migrate_remote_video — HLS, DASH, or remote video URLs
- videojs_migrate_remote_audio — remote audio stream URLs
- videojs_migrate_youtube — YouTube URLs or video IDs
Shared fields (poster image, subtitles) are copied to all destination bundles. Drupal's migration tracking means you can roll back, reset, and re-run safely. All five migrations are grouped under videojs_media so they can be run or rolled back together with a single Drush command.
Post-Installation
After enabling this module, use Drush to run the migrations:
- Check status:
drush migrate:status --group=videojs_media— you should see all five migrations listed. - Run all at once:
drush migrate:import --group=videojs_media - Or run individually, e.g.:
drush migrate:import videojs_migrate_local_video
To undo: drush migrate:rollback --group=videojs_media
If a migration gets stuck: drush migrate:reset-status videojs_migrate_local_video
Uninstalling this module after a successful migration does not delete the migrated entities — they remain in your database.
Additional Requirements
- Drupal ^10.3 or ^11
- VideoJS Media module (the migration destination)
- VideoJS Mediablock module (the migration source — can be disabled but must remain installed)
- Migrate Plus
- Migrate Tools
Install the contrib dependencies before enabling this module:
composer require drupal/migrate_plus drupal/migrate_tools drush en migrate migrate_plus migrate_tools drush en videojs_media_migrate
Recommended modules/libraries
No additional modules are recommended beyond those listed above. Once migration is complete you may uninstall videojs_mediablock, videojs_media_migrate, migrate_plus, and migrate_tools if they are no longer needed.
Similar projects
- VideoJS Mediablock — the predecessor block-based module this migration moves data away from.
- VideoJS Media — the modern entity-with-bundles destination module.
Supporting this Module
This module is provided as free, open-source software under the GPL-2.0+ license. Contributions, bug reports, and feature requests are welcome via the drupal.org issue queue.
Community Documentation
Full usage instructions, field mapping tables, troubleshooting steps, and architecture details are available in the README.md included with this module.