Skip to main content

Loop Video

19 replies [Last post]
em_pleh
Offline
Joined: 2008-12-12
Points: 0

How do you loop a video stream? ( Example for the menu i want to loop the same video over and over again.)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
em_pleh
Offline
Joined: 2008-12-12
Points: 0

Is it possible to take a mpls back to a xml ?

Bill Foote

bd-j-dev@mobileandembedded.org wrote:
> Is it possible to take a mpls back to a xml ?

I think so. I believe that's how we got the XML "source"
of the playlist in the cookbook project, by "disassembling"
a binary playlist structure originally created by Mike Zink
over at Technicolor.

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

em_pleh
Offline
Joined: 2008-12-12
Points: 0

Is there a good free playlist editor/generator?

Bill Foote

bd-j-dev@mobileandembedded.org wrote:
> Is there a good free playlist editor/generator?

There's /DiscCreationTools/playlist

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

em_pleh
Offline
Joined: 2008-12-12
Points: 0

Thanks Bill!

Joe Rice

Very good point. We'll typically use that technique and eventually use
BD-J to restart the loop. (Ah, if only there was an infinite PlayItem
loop function in the spec!)

Joe

On Feb 16, 2009, at 12:22 PM, bd-j-dev@mobileandembedded.org wrote:

> As far as I know, the only way to do a seamless loop is to use
> multiple playItems in your playlist.
>
> Best,
>
> - Jay
> [Message sent by forum member 'jscons' (jscons)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332115

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

stanavzan
Offline
Joined: 2006-11-07
Points: 0

Joe,

So, a shuffle playlist with a single PlayItem and playback_count set to 65535 won't work? Am I misreading the spec?

Thank you,
Stan

Joe Rice

Stan,

It's a cool idea and seems like it should work.

We typically have multiple sub-menus on discs and put all into one
PlayList as multiple PlayItems, as linking to PlayItems within a
single PlayList is quicker and avoids the player showing black between
menus as occurs when selecting or playing a different PlayList. That
said, we also have cases where a single PlayItem needs to look
infinitely, and for those cases I'm looking forward to trying this out.

Cheers,
Joe

On Feb 18, 2009, at 2:52 AM, bd-j-dev@mobileandembedded.org wrote:

> Joe,
>
> So, a shuffle playlist with a single PlayItem and playback_count set
> to 65535 won't work? Am I misreading the spec?
>
> Thank you,
> Stan
> [Message sent by forum member 'stanavzan' (stanavzan)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332529
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

Joe Rice

Might try putting a PLMark a couple frames before the end and
responding to the PlabackMarkEvent to trigger the restart. You can
hold the last frame with an infinite still on the PlayItem to avoid it
going to black before the player restart occurs..

(Some players/firmware versions won't generate a PlaybackMarkEvent if
the PLMark is 1 frame from the end of the PlayItem. We've found 2-3
frames to generally be safe, but as with all things BD-J, test on as
many player implementations as you can find.)

Cheers,
Joe

On Feb 16, 2009, at 9:50 AM, bd-j-dev@mobileandembedded.org wrote:

> thank you for your answer,
>
> The only problem with doing it that way is that it produces a black
> screen flicker while it does the loop. any way to get around that?
> [Message sent by forum member 'em_pleh' (em_pleh)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332101
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

elbob
Offline
Joined: 2008-10-01
Points: 0

What I would add is that restarting the video might be smoother by jumping to the first chapter mark instead of restarting the playlist.

on players I have used jumping to playlists produces a short black screen whereas chapterjumps just appeard as a still of the last frame.

Joe Rice

Ah, thanks elbob - I didn't choose my language very well! Absolutely
right, PlaybackControl.skipToPlayItem() or
PlaybackControl.skipToMark() are in order for the speediest transition
without intervening black.

Cheers,
Joe

On Feb 18, 2009, at 10:03 AM, bd-j-dev@mobileandembedded.org wrote:

> What I would add is that restarting the video might be smoother by
> jumping to the first chapter mark instead of restarting the playlist.
>
> on players I have used jumping to playlists produces a short black
> screen whereas chapterjumps just appeard as a still of the last frame.
> [Message sent by forum member 'elbob' (elbob)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332575
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

hooligancat
Offline
Joined: 2009-10-20
Points: 0

Just resurrecting this thread.

If the infinite pause has been used on a playitem, and then skiptomark is used, is the player guaranteed to change the rate from 0.0 to 1.0? I can't find a direct reference to the playrate when using skipToMark(). If so I guess we will get a ratechangedevent? Is this event sent before the first video frame is flushed to the TV (we don't want any graphics to appear before the video does!)

Thanks

chihiro_saito
Offline
Joined: 2006-11-08
Points: 0

If you know when the end of media happens, then perhaps one way is just to restart the player at that moment?

BDLocator bdLocator = new BDLocator("bd://0.PLAYLIST:00000");
MediaLocator locator = new MediaLocator(bdLocator);
final Player thePlayer = Manager.createPlayer(locator);
// Let's loop the video, since it's short.
thePlayer.addControllerListener(new ControllerListener() {
public void controllerUpdate(ControllerEvent e) {
if (e instanceof EndOfMediaEvent) {
thePlayer.start();
}
}
});
thePlayer.start();

em_pleh
Offline
Joined: 2008-12-12
Points: 0

thank you for your answer,

The only problem with doing it that way is that it produces a black screen flicker while it does the loop. any way to get around that?

jscons
Offline
Joined: 2009-02-01
Points: 0

As far as I know, the only way to do a seamless loop is to use multiple playItems in your playlist.

Best,

- Jay

stanavzan
Offline
Joined: 2006-11-07
Points: 0

You can also try to use a PlayList of type 2 (Random) or 3 (Shuffle) with a single PlayItem - I believe the spec would require to loop through that PlayItem indefinitely. I'm not sure how seamless it would be, but I expect it to be better since the switch would happen within the Playback Control Engine itself.

Thanks,
Stan

em_pleh
Offline
Joined: 2008-12-12
Points: 0

Can this be done through code and if so can you please post a sample?

stanavzan
Offline
Joined: 2006-11-07
Points: 0

No, not through code. I believe you need to edit the playlist file (xxxxx.mpls) to change the value of the PlayList_playback_type attribute in the AppInfoPlayList structure.

stanavzan
Offline
Joined: 2006-11-07
Points: 0

Also, there's a 16-bit playback_count field in the same AppInfoPlayList structure, which you'll probably want to set to 65535 for something close enough to eternity :-)