Video size for different users  

Have a problem using Livepano? Have you encountered a bug that needs fixing? Please post it here.
Des difficultés à utiliser Livepano ? Avez-vous découvert un bug qui doit être fixé ? Postez les ici.
User avatar
zebragruen
Member
 
Topic author
Posts: 98
Likes: 0 post
Liked in: 0 post
Joined: Fri Feb 18, 2011 11:00 am
Location: Brandenburg
Info

Video size for different users

by zebragruen » Wed Nov 26, 2014 8:40 am

Hi,

in this tour (http://talking-pano.de/haefelinger.html) I have several videos.
The pano itself is able to adjust the stream to different users like pc or smartphone or apple.

Question: How can I manage the videos to be smaller for users with p.e. a smartphone?

Thanks,
Alex

User avatar
benji33
Kolor Team
 
Posts: 5764
Likes: 86 posts
Liked in: 191 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video size for different users

by benji33 » Wed Nov 26, 2014 10:01 am

Into the "display a video" action you can set a size Width or Height in %.
Set a value in % and let the other one to 0 to keep the aspect ratio of the video.

Be carreful with mobile devices many of them (older ones) doesn't accept video which are bigger than 1280x720.

User avatar
zebragruen
Member
 
Topic author
Posts: 98
Likes: 0 post
Liked in: 0 post
Joined: Fri Feb 18, 2011 11:00 am
Location: Brandenburg
Info

Re: Video size for different users

by zebragruen » Wed Nov 26, 2014 12:03 pm

Thanks Benjamin!

Is there a relation between the displayed size of the video image and the download stream of the video?

User avatar
benji33
Kolor Team
 
Posts: 5764
Likes: 86 posts
Liked in: 191 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video size for different users

by benji33 » Wed Nov 26, 2014 12:48 pm

Display size is just some rules to display/scale the video.
The stream is the basic width/height/compression/bandwidth/frequency of the video and audio.

User avatar
zebragruen
Member
 
Topic author
Posts: 98
Likes: 0 post
Liked in: 0 post
Joined: Fri Feb 18, 2011 11:00 am
Location: Brandenburg
Info

Re: Video size for different users

by zebragruen » Wed Nov 26, 2014 12:53 pm

I am not shure if I understand this.

Example: on a 25' monitor I play a video in the ptp project. Let's say, fullframe.
And then I have a video an a 4' display smartphone.

They both come fome the same ptp project.
Is there a difference in the videostream? Is the stream for 25' larger then for the 4'?

User avatar
benji33
Kolor Team
 
Posts: 5764
Likes: 86 posts
Liked in: 191 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video size for different users

by benji33 » Wed Nov 26, 2014 1:00 pm

Ok sorry.
No it's the same stream.
PTP doesn't transcode the video for each kind of device. Only the Livepano are transcoded into high resolution for desktop computer and low resolution for tablet/mobile devices.

It can be done with krpano code into the call to the displayVideo action to reach different encoded videos.

User avatar
zebragruen
Member
 
Topic author
Posts: 98
Likes: 0 post
Liked in: 0 post
Joined: Fri Feb 18, 2011 11:00 am
Location: Brandenburg
Info

Re: Video size for different users

by zebragruen » Wed Nov 26, 2014 2:59 pm

Do you have any example or tutorial for this?

Alex

User avatar
benji33
Kolor Team
 
Posts: 5764
Likes: 86 posts
Liked in: 191 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video size for different users

by benji33 » Wed Nov 26, 2014 4:14 pm

Generate all your different video versions.
For instance "video720p.mp4" for mobile, "video960p.mp4" for tablets and "video1080p.mp4" for desktop.

1. Add a button or a hotspot which call the "Basic > Display a video" action with the "video1080p.mp4" file.
2. Generate the tour.
3. Add "video960p.mp4" and "video720p.mp4" into the YOUTOURdata/spots/ directory.
4. Edit the YOURTOUR.xml file and look after the displayVideo string.
You should have something like that :
Code: Select all
displayVideo(%FIRSTXML%/spots/video1080p.mp4
             ,center
             ,0
             ,0
             ,''
             ,''
             ,true
             ,false
             ,''
             ,false
             ,true
             );

Edit the action to use this code instead :
Code: Select all
if(device.desktop,
displayVideo(%FIRSTXML%/spots/video1080p.mp4
             ,center
             ,0
             ,0
             ,''
             ,''
             ,true
             ,false
             ,''
             ,false
             ,true
             );
,
if(device.tablet,
displayVideo(%FIRSTXML%/spots/video960p.mp4
             ,center
             ,0
             ,0
             ,''
             ,''
             ,true
             ,false
             ,''
             ,false
             ,true
             );
,
displayVideo(%FIRSTXML%/spots/video720p.mp4
             ,center
             ,0
             ,0
             ,''
             ,''
             ,true
             ,false
             ,''
             ,false
             ,true
             );
);
);

User avatar
zebragruen
Member
 
Topic author
Posts: 98
Likes: 0 post
Liked in: 0 post
Joined: Fri Feb 18, 2011 11:00 am
Location: Brandenburg
Info

Re: Video size for different users

by zebragruen » Mon Dec 01, 2014 1:00 pm

Ok, took a while, but I made the modifications you explained. Thank you, Bejamin!

Now we have the situation, that the video plays in a loop. How do I stop this?

Alex

User avatar
benji33
Kolor Team
 
Posts: 5764
Likes: 86 posts
Liked in: 191 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video size for different users

by benji33 » Mon Dec 01, 2014 2:17 pm

This call use many parameters : displayVideo(%FIRSTXML%/spots/video1080p.mp4,center,0,0,'','',true,false,'',false,true);
1st is the video file
2nd is the position/alignment of the video into the page
3rd is the x offset value
4th is the y offset value
5th is the video width
6th is the video height
7th is the loop state of the video (true/false)
8th is the pause autorotation option (true/false)
9th is unused yet
10th is the play/pause button option over the video (true/false)
11th is the pause background sound option (true/false)

So change the 7th parameter value.

User avatar
zebragruen
Member
 
Topic author
Posts: 98
Likes: 0 post
Liked in: 0 post
Joined: Fri Feb 18, 2011 11:00 am
Location: Brandenburg
Info

Re: Video size for different users

by zebragruen » Mon Dec 01, 2014 3:04 pm

This the section I changed.

<action name="onclickspotpoint18">
if(device.desktop,
displayVideo(%FIRSTXML%/spots/1-youtube.mp4
,center
,0
,0
,''
,''
,true
>> ,true <<< This was "false" at first. I changed it to "True". Both had the same result: The video played in loop.
,''
,false
,false
);

What am I doing wrong?
Alex

User avatar
Cliquetsy
Member
 
Posts: 1312
Likes: 106 posts
Liked in: 119 posts
Joined: Thu May 16, 2013 4:10 pm
Info

Re: Video size for different users

by Cliquetsy » Mon Dec 01, 2014 3:08 pm

zebragruen wrote:This the section I changed.

<action name="onclickspotpoint18">
if(device.desktop,
1displayVideo(%FIRSTXML%/spots/1-youtube.mp4
2 ,center
3 ,0
4 ,0
5 ,''
6 ,''
7 ,true
8 >> ,true <<< This was "false" at first. I changed it to "True". Both had the same result: The video played in loop.
,''
,false
,false
);

What am I doing wrong?
Alex


Er... Benji says change the 7th value, you changed the 8th =D

User avatar
zebragruen
Member
 
Topic author
Posts: 98
Likes: 0 post
Liked in: 0 post
Joined: Fri Feb 18, 2011 11:00 am
Location: Brandenburg
Info

Re: Video size for different users

by zebragruen » Mon Dec 01, 2014 3:29 pm

:cool: Man, you saved my day....

Alex


Who is online

Users browsing this forum: No registered users and 2 guests