Seeking a method to read mp4 meta data or file name and overlay as title and description in stream

zeikai

New Member
I'd like to show the meta data, (title and comment), from the MP4 file when streaming, similar to any music video TV (MTV, VH1 etc). This will need to be when using VLC source playlist. As each file loads to the player, the meta is read and printed at the bottom left (or where ever assigned) and fade out after x seconds, then intermittently display throughout the play time of the video.

Can this be achieved with a .Lua script? If so, can anyone point me to a guide resource to develop this process?

get-file-meta.jpg
 

zeikai

New Member
I was able to get the UI created but unable to deliver the desired output due to lacking knowledge of the OBS output methods, and there is no time to learn all that right now. Having input from the development community with full knowledge of the processes would get the simple script completed.

I tried various methods to get the active VLC source properties in order to build the display but nothing delivers. I have attached the .lua file for development. if anyone wants to contribute to the project and make it available to the community, please edit and post in replies.

Expected result
2023-04-28 17_49_57.jpg


Script settings​

  • Media Source: select the VLC playlist
  • After start display: duration in seconds for the title to show until fade out at the start of the video
  • Before end display: seconds before video end when the title displays again until X seconds to end
  • Left offset: margin in pixels from left of video frame
  • Bottom offset: margin in pixels from bottom of video frame
  • Font family: select from system font library
  • Font case: set all caps, word first letter cap, sentence cap, small
  • Font color: set the text color
  • Background color: set a background color with transparency

Output​

The text should be sourced from the file name as each file is loaded to the player, either read from the file path or more simply from the source properties window. Using character delimiters to create formatting with `:gsub()`
Example: a file name as boulevard of broken dreams-green day-released_1992.mp4
returns
Boulevard Of Broken Dreams
Green Day
Released: 1992


The text should display within the selected VLC source without requiring addition of a text source for simplicity, however if the text source method is best, make it so.

2023-04-28 17_41_12.jpg
 

Attachments

  • vid-playlist-titles.zip
    2.1 KB · Views: 58

zeikai

New Member
I can't understand how to use it... Please!
Sorry you missed the bold statement in orange that indicates it's a project for DEVELOPMENT

also
Having input from the development community with full knowledge of the processes would get the simple script completed.

If you are a developer and wish to join the project, the plan is outlined above. The script is just a proposal and starting point. It is not functional.
 

NAZARUIZ

New Member
W
Sorry you missed the bold statement in orange that indicates it's a project for DEVELOPMENT

also


If you are a developer and wish to join the project, the plan is outlined above. The script is just a proposal and starting point. It is not functional.
Woo, sorry, you're right. But this is a feature that can be very useful. For examble you can show "You're watching Transformers" or "Next Terminator Genesis".
 

zeikai

New Member
W

Woo, sorry, you're right. But this is a feature that can be very useful. For examble you can show "You're watching Transformers" or "Next Terminator Genesis".
There are other plugins available that will do the task like the one called Tuna, or txt trigger, however most are a bit complex and I just wanted the basic and simple process. I just haven't been able to commit more time to the project due to pending projects which existed before. If any dev with greater knowledge of the OBS programming methods get involved to get it working as proposed and it becomes stable, it will be published to the section for Scripts download.
 

NAZARUIZ

New Member
There are other plugins available that will do the task like the one called Tuna, or txt trigger, however most are a bit complex and I just wanted the basic and simple process. I just haven't been able to commit more time to the project due to pending projects which existed before. If any dev with greater knowledge of the OBS programming methods get involved to get it working as proposed and it becomes stable, it will be published to the section for Scripts download.
Tuna doesn't work with videos but I think your project is very promising for users who stream music videos, movies, tv shows, etc...
 

zeikai

New Member

Still seeking developer assistance​


After some weekend reading and testing I've defined a method to make the script as a multiple instance source with obs_register_source(object)

However I cannot define the process to read the selected vlc_source properties to retrieve the playlist data. I need some guidelines for that.

Adding the source​

The script can now be added as a source per scene as needed instead of globally attaching to all scenes

add-source.jpg


Set the source properties​

Nothing displays when the Media Source is selected. The expected process when on_event() is triggered is the properties of the chosen source would be accessed as an object and the playlist could be targeted for the data EG: selected_src.playlist

How can I get the selected source's properties?

methods tried
obs_get_source_properties("rajakumari") // null
obs_source_properties("rajakumari") // null


as-source.jpg


The script now has no properties to set​


script-enabled.jpg
 

zeikai

New Member

Update​


There's no time to learn the OBS API for this project and there's no community to gain any assistance. The Discord channel seems to comprise of child-minded aggressors that constantly attack. Therefore I've abandoned this script development for what is now the best solution for me. May not be suitable for everyone.

Solution - OBS + Virtual DJ​

I was able to achieve precisely what was desired (and much more) by implementing the free version of Virtual DJ. The application has a native function that reads file meta data, and the video skin coding is XML markup which provides command syntax to call specific data lines as needed and define the transition method, eg: `fadein="1500ms" fadeout="1500ms"`. While VDJ will connect to a streaming server, it is best to use OBS to connect and source VDJ for the media via Window Capture and Application Audio Capture This allows the benefit of scene changing and source layering.

The output
The media file title, artist, year, comment fields are read and displayed at start then fade out and shown again X seconds into play back time.

2023-05-19 11_44_37.jpg


Additional benefits
  • AutoMix playlist (seamless crossover)
  • Sampler bank
  • BPM mixing
  • Video effects on the fly (shake, luminance, spectral etc)
  • Meta data editor which updates during play
  • Lyric editor and on screen scrolling display
  • Annotation display by interval during video play
  • Microphone ducking and vocal effects

Conclusion​

This software streaming playback combination allows for an ideal studio like broadcast
  • Producer / director - OBS
    Scene changes, advertising overlays, on screen notifications, chat moderation
  • Show host - Virtual DJ
    Visual and aural stimulation
 
Top