NextPreviousHomexml dynamic content - separate output files

colint | 2 months ago | 10 comments | 1 like | 299 views

songbaojin likes this!

My two most recent projects with bluff have used XML Dynamic Content to produce a series of short related videos. Bluff exports one long video containing all iterations of the show which I spilt into individual videos using:

ffmpeg -i %1 -force_key_frames expr:gte(t,n_forced*<showDuration>) -f segment -segment_time <showDuration> -reset_timestamps 1 -map 0 -segment_format_options movflags=+faststart -segment_start_number 1 "%~dp1%%03d%~x1"

(this gives individually numbered videos of length <showDuration>, which is the duration of the bluff show)

Could bluff be enhanced to optionally include this last step? e.g. When exporting video, on the "Export as video" dialog panel, another checkbox for "Separate files", with the resulting videos named "MyVideo_1, MyVideo_2", etc for each iteration of the show when using XML Dynamic Content?

I also need an image of one frame from each iteration of the show when using XML Dynamic Content. I do this by setting the show duration to 1 second and exporting the video at 1 frame per second to give a series of 1 second videos with a single frame in each, then use:

ffmpeg -i %1 "%~dpn1-%%03d.jpg"

Again, could bluff be enhanced to optionally save an image for each iteration of the show when using XML Dynamic Content? (e.g. similar to video, on the "Export as picture" dialog panel, another checkbox for "Separate files", with the resulting pictures named "MyPicture_1, MyPicture_2", etc for each iteration of the show when using XML Dynamic Content?




Share this on FacebookShare this on X

This sounds like a lot of complex technology to render separate shows as separate videos.

Instead of splitting the video I would split the XML.

michiel, 2 months ago


Thank you for your quick reply Michiel. Splitting the XML wouldn't make sense. It's a very simple XML file with only one data item per show iteration, so splitting it would mean one data item per XML file, which is pointless. In that case, it would be better to just have one show per dynamic data item.

An alternative solution would be to pre-process the .bt show file using sed or similar to provide the dynamic content. But then each show has to be run in bluff and saved as video. I'm looking for a better way to automate this.

colint, 2 months ago

Is this the export as video/picture command line request in disguise?

Why don't you show some of your work in this community? This will greatly help understanding your needs.

michiel, 2 months ago


Sorry Michiel, I didn't intend being underhand in any way by disguising one feature request with another, and I apologise if it appeared that way. I was genuinely enquiring about features that would have been useful to me and may be useful to others, or looking for alternative suggestions from the community. That's all. Sorry again.

The first of a couple of my most recent bluff projects was for a Christmas party. I exported the show as video from bluff and played it on my phone which was connected wirelessly to a projector for display on a large screen.

youtu.be...

I wanted the flare effects to continue to animate at the end of the show just like they do when playing in bluff, which I achieved using the methods described in my "android" post. (The video loops continuously on my phone but doesn't on YouTube of course).

youtu.be...

Additionally, I produced dance instructions for the party. These were initially produced in PowerPoint, with each of the 38 slides exported as jpgs which were then included in a bluff show using XML Dynamic Content to add flare effects, then exported as a video and split into individual 10 second videos (1 per slide) using the method described in my original post. Here's an example.

youtu.be...

(Again, the video loops continuously on my phone but not on YouTube).

My most recent project was producing invitations for my wedding later this year. Here, I needed individual jpg images for each iteration of a show that uses XML Dynamic Content for each invited guest. I haven't made a YouTube video because the details are private. I achieved my aim by using the methods described in my original post.

I hope this is all understandable and makes sense. Suggestions for improvement or alternatives are very welcome! 😊

Best wishes
Colin

colint, 2 months ago

Great presentations!

Why not play them in realtime? This way you no longer have to render them and it also removes the ugly YouTube video encoding artifacts including the MP4 gradient banding:
outerspace-software.com...

When you know some coding you can place the XML on a webserver and create a simple webform to update it. This way you can change the texts and pictures while it's playing (the XML is reloaded in the next loop). For example by adding photos of the current party. You can even let your guests use this form so they can add funny comments on their phones that everybody can read on the big screen!

Typically the output is rendered full screen on a 2nd screen: choose SETTINGS > MOVE MENU and SETTINGS > BROWSER MODE to move the controls to the 1st screen. The 1st screen is in your office, the 2nd is the big screen on the dance floor.

YouTube has an option to repeat the current video but I would still go for realtime.

michiel, 2 months ago


Thank you for all of that Michiel. Exciting times ahead! :-D

colint, 2 months ago

Hi Michiel

I'm thinking your suggestions through before going ahead but seem to have found a few issues.

Here are my thoughts so far.

1. I put the images and XML on a webserver. The XML (picture.xml) references a single image, e.g.

<?xml version="1.0" ?>
<picture>image.jpg</picture>

2. I use a Windows laptop connected to the big screen running a Bluff show which uses XML Dynamic Content on a picture layer to reference the XML file on the server, e.g.

xml:http://www.myurl.com/picture.xml?picture

3. I use a web browser on my phone to access a webpage on the server that allows me to select an image on the server and update the XML to reference that image. Thus I can change the image used in the show from my phone.

As in my original post, the result I'm trying to achieve is that the image is shown with animations running indefinitely. (As what happens when Bluff reaches the end of a show).

The issues that I think I can foresee are:

A. If Bluff reaches the end of the show, it has stopped. It doesn't (magically!) restart when I change the image. (If I reference more than one image in the XML, Bluff will simply run through them all in succession as that's what it's designed to do and not what I want in this case).

B. If I loop the show (CONTROL > LOOPING), the display "jumps" on each loop if I don't change the image. If I set the show duration to (say) 10 seconds, the jumping occurs less frequently, but then I have to wait up to 10 seconds for the display to change if I *do* change the image, which is unacceptable. If I set the show duration to (say) 1 second to reduce the latency, the display jumps every second which is unacceptable.

So I seem to have hit a bit of a roadblock.

The key thing that seems to be missing is some sort of control of Bluff when it's being used as a player. What are your thoughts on the introduction of a control (or play?) layer, for example?

Alternatively, my thoughts would be to use some sort of proxy to intercept Bluff's http requests. Assuming Bluff is set to disable XML caching (CACHE XML FILES checkbox unset) so that it requests the next image on each show/loop iteration, the proxy would delay sending the request to the webserver until it receives an indication which can be set from the webpage on my phone. Seems a bit extreme though...... If this is the only practical solution I'll stay with my existing method, which is a shame. I'd rather use your suggestion Michiel as it's better! Bluff is a great app. I love being creative and inspired by it.

Thoughts?

Colin 😊

colint, 2 months ago

It jumps because the renderer, media loader and HTTP client run in the same thread. The solution is to give those tasks their own separate thread. This way textures can be downloaded from the internet and uploaded to your graphics card while the current show is playing. This would be a dream project! But because most users use BluffTitler to create video files, it has no top priority. For now, a simple workaround is to make sure nothing is animated in the first and last second of the show. This hides the fact that the app is temporarily blocked because it is downloading/updating media files.

michiel, 2 months ago


Thank you for the detail and explanation Michiel. I considered synchronising the animation at the beginning and end of the show but the flares are random so impossible. I take your point about nothing is animated at the beginning and end of the show. I'll probably just fade in and out to smooth the jump. Thank you again 🙏

colint, a month ago

Colint, good luck with your project. I can see it turning into a successful product. Would love to see the result!

michiel, a month ago


Comment to this article

You must be logged in before you can comment to this article. Login | Register