OpenTok TokBox: Video in vertical presentation looks like in horizontal presentation after archiving












1















Our aim is to show portait video (vertical orientation in terms of TokBox) without black areas right and leftside after archiving. Now it looks like landscape with black areas on right and left side.
We are using php server and android client for streaming.



enter image description here



Our steps to convert live stream in video on demand through archieving are:




  1. start session

  2. update stream with the parameter layoutClassList = verticalPresentation (php library)

  3. start archieving

  4. live stream is on -> create subsriber and watch the stream. IMPORTANT! The stream has no black areas and has CORRECT presentation on subsriber side!

  5. stop archieving

  6. waiting TokBox upload archieving file to Amazon s3 bucket -> the file ALREADY contains black areas right-leftside. WRONG! (please watch the video on link for better understanding https://s3-us-west-1.amazonaws.com/edtv-dev1-input/46176492/9f26ef23-aee6-42f2-8c51-d8e2685abcc9/archive.mp4 )


    1. processing the file




Are thereabove the correct steps to achieve the goal - get video file without black areas (in portrait orientation)? Are we missing anything?
Is archieving process on TokBox sensitive to horizontal/vertical presentation? is it possible to archive the video in vertical orientation?



UPDATE: What we wanted was not composed, but INDIVIDUAL stream! TokBox creates zip file, but Amazon AWS was able to transcode it and get the correct result both in portrait and landscape orientations.



NOTE: As a default result file on Amazon AWS after Individual stream archiving is *.zip (json + video file in it). The trascoder we used gave us video without sound. So we added lambda that unzipped the file. Now everything is ok, but took a lot of time and headache.










share|improve this question





























    1















    Our aim is to show portait video (vertical orientation in terms of TokBox) without black areas right and leftside after archiving. Now it looks like landscape with black areas on right and left side.
    We are using php server and android client for streaming.



    enter image description here



    Our steps to convert live stream in video on demand through archieving are:




    1. start session

    2. update stream with the parameter layoutClassList = verticalPresentation (php library)

    3. start archieving

    4. live stream is on -> create subsriber and watch the stream. IMPORTANT! The stream has no black areas and has CORRECT presentation on subsriber side!

    5. stop archieving

    6. waiting TokBox upload archieving file to Amazon s3 bucket -> the file ALREADY contains black areas right-leftside. WRONG! (please watch the video on link for better understanding https://s3-us-west-1.amazonaws.com/edtv-dev1-input/46176492/9f26ef23-aee6-42f2-8c51-d8e2685abcc9/archive.mp4 )


      1. processing the file




    Are thereabove the correct steps to achieve the goal - get video file without black areas (in portrait orientation)? Are we missing anything?
    Is archieving process on TokBox sensitive to horizontal/vertical presentation? is it possible to archive the video in vertical orientation?



    UPDATE: What we wanted was not composed, but INDIVIDUAL stream! TokBox creates zip file, but Amazon AWS was able to transcode it and get the correct result both in portrait and landscape orientations.



    NOTE: As a default result file on Amazon AWS after Individual stream archiving is *.zip (json + video file in it). The trascoder we used gave us video without sound. So we added lambda that unzipped the file. Now everything is ok, but took a lot of time and headache.










    share|improve this question



























      1












      1








      1








      Our aim is to show portait video (vertical orientation in terms of TokBox) without black areas right and leftside after archiving. Now it looks like landscape with black areas on right and left side.
      We are using php server and android client for streaming.



      enter image description here



      Our steps to convert live stream in video on demand through archieving are:




      1. start session

      2. update stream with the parameter layoutClassList = verticalPresentation (php library)

      3. start archieving

      4. live stream is on -> create subsriber and watch the stream. IMPORTANT! The stream has no black areas and has CORRECT presentation on subsriber side!

      5. stop archieving

      6. waiting TokBox upload archieving file to Amazon s3 bucket -> the file ALREADY contains black areas right-leftside. WRONG! (please watch the video on link for better understanding https://s3-us-west-1.amazonaws.com/edtv-dev1-input/46176492/9f26ef23-aee6-42f2-8c51-d8e2685abcc9/archive.mp4 )


        1. processing the file




      Are thereabove the correct steps to achieve the goal - get video file without black areas (in portrait orientation)? Are we missing anything?
      Is archieving process on TokBox sensitive to horizontal/vertical presentation? is it possible to archive the video in vertical orientation?



      UPDATE: What we wanted was not composed, but INDIVIDUAL stream! TokBox creates zip file, but Amazon AWS was able to transcode it and get the correct result both in portrait and landscape orientations.



      NOTE: As a default result file on Amazon AWS after Individual stream archiving is *.zip (json + video file in it). The trascoder we used gave us video without sound. So we added lambda that unzipped the file. Now everything is ok, but took a lot of time and headache.










      share|improve this question
















      Our aim is to show portait video (vertical orientation in terms of TokBox) without black areas right and leftside after archiving. Now it looks like landscape with black areas on right and left side.
      We are using php server and android client for streaming.



      enter image description here



      Our steps to convert live stream in video on demand through archieving are:




      1. start session

      2. update stream with the parameter layoutClassList = verticalPresentation (php library)

      3. start archieving

      4. live stream is on -> create subsriber and watch the stream. IMPORTANT! The stream has no black areas and has CORRECT presentation on subsriber side!

      5. stop archieving

      6. waiting TokBox upload archieving file to Amazon s3 bucket -> the file ALREADY contains black areas right-leftside. WRONG! (please watch the video on link for better understanding https://s3-us-west-1.amazonaws.com/edtv-dev1-input/46176492/9f26ef23-aee6-42f2-8c51-d8e2685abcc9/archive.mp4 )


        1. processing the file




      Are thereabove the correct steps to achieve the goal - get video file without black areas (in portrait orientation)? Are we missing anything?
      Is archieving process on TokBox sensitive to horizontal/vertical presentation? is it possible to archive the video in vertical orientation?



      UPDATE: What we wanted was not composed, but INDIVIDUAL stream! TokBox creates zip file, but Amazon AWS was able to transcode it and get the correct result both in portrait and landscape orientations.



      NOTE: As a default result file on Amazon AWS after Individual stream archiving is *.zip (json + video file in it). The trascoder we used gave us video without sound. So we added lambda that unzipped the file. Now everything is ok, but took a lot of time and headache.







      amazon-s3 opentok tokbox






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 14 at 14:30







      anna_manzhula

















      asked Dec 11 '18 at 13:19









      anna_manzhulaanna_manzhula

      939




      939
























          2 Answers
          2






          active

          oldest

          votes


















          1














          Tokbox developer here



          For composed archiving, the only two options currently available for output resolution are 640x480 and 1280x720. Trying to fit a portrait video into a canvas of the available resolutions will result in the video you are seeing.



          Possible solutions:




          • Use the custom layout control [1]: you can override the "object-fit" property to "cover". This may not result in exactly what you want, since the output resolution will still be 640x480 or 1280x720, but the video will occupy the whole canvas, at the expense of cropping the top and bottom part. See [2]



          • The best solution in my opinion is to use "individual stream archiving", where the resolution will be kept as the original, and you get a file per stream. Please check [3]




            1. https://tokbox.com/developer/guides/archiving/layout-control.html

            2. https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit

            3. https://tokbox.com/developer/rest/#start_archive








          share|improve this answer
























          • Thank you, Jose, for your attention to our case. It seems only the third option is suitable for us. We will learn it and inform you about results.

            – anna_manzhula
            Dec 18 '18 at 14:30













          • Thank you, Jose! What we wanted was INDIVIDUAL stream, your answer helped a lot.

            – anna_manzhula
            Dec 19 '18 at 13:24











          • Jose, Thank you for your answer. Can we get Video File URL of s3 uploaded ZIP in case of Individual Stream ?

            – Narayana
            Jan 2 at 15:57











          • @Jose Carlos Hello, Jose! We faced the issue. In the case of individual stream archiving the result file is in *.zip format, but we need some VIDEO FORMAT. For example, composed streaming gave us *.mkv. Is it possible to define the file format for INDIVIDUAL stream? Thank you.

            – anna_manzhula
            Jan 4 at 9:24



















          0














          How can we get URL within the zip created by opentok which was uploaded in s3






          share|improve this answer
























          • I mean Video URL to play in Mobile / Web

            – vamsisnikky
            Jan 2 at 14:51











          • transcoder was able to get the link on the videofile, but the video is without the sound :( so we gonna unzip it manually...

            – anna_manzhula
            Jan 3 at 8:45











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53725013%2fopentok-tokbox-video-in-vertical-presentation-looks-like-in-horizontal-presenta%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Tokbox developer here



          For composed archiving, the only two options currently available for output resolution are 640x480 and 1280x720. Trying to fit a portrait video into a canvas of the available resolutions will result in the video you are seeing.



          Possible solutions:




          • Use the custom layout control [1]: you can override the "object-fit" property to "cover". This may not result in exactly what you want, since the output resolution will still be 640x480 or 1280x720, but the video will occupy the whole canvas, at the expense of cropping the top and bottom part. See [2]



          • The best solution in my opinion is to use "individual stream archiving", where the resolution will be kept as the original, and you get a file per stream. Please check [3]




            1. https://tokbox.com/developer/guides/archiving/layout-control.html

            2. https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit

            3. https://tokbox.com/developer/rest/#start_archive








          share|improve this answer
























          • Thank you, Jose, for your attention to our case. It seems only the third option is suitable for us. We will learn it and inform you about results.

            – anna_manzhula
            Dec 18 '18 at 14:30













          • Thank you, Jose! What we wanted was INDIVIDUAL stream, your answer helped a lot.

            – anna_manzhula
            Dec 19 '18 at 13:24











          • Jose, Thank you for your answer. Can we get Video File URL of s3 uploaded ZIP in case of Individual Stream ?

            – Narayana
            Jan 2 at 15:57











          • @Jose Carlos Hello, Jose! We faced the issue. In the case of individual stream archiving the result file is in *.zip format, but we need some VIDEO FORMAT. For example, composed streaming gave us *.mkv. Is it possible to define the file format for INDIVIDUAL stream? Thank you.

            – anna_manzhula
            Jan 4 at 9:24
















          1














          Tokbox developer here



          For composed archiving, the only two options currently available for output resolution are 640x480 and 1280x720. Trying to fit a portrait video into a canvas of the available resolutions will result in the video you are seeing.



          Possible solutions:




          • Use the custom layout control [1]: you can override the "object-fit" property to "cover". This may not result in exactly what you want, since the output resolution will still be 640x480 or 1280x720, but the video will occupy the whole canvas, at the expense of cropping the top and bottom part. See [2]



          • The best solution in my opinion is to use "individual stream archiving", where the resolution will be kept as the original, and you get a file per stream. Please check [3]




            1. https://tokbox.com/developer/guides/archiving/layout-control.html

            2. https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit

            3. https://tokbox.com/developer/rest/#start_archive








          share|improve this answer
























          • Thank you, Jose, for your attention to our case. It seems only the third option is suitable for us. We will learn it and inform you about results.

            – anna_manzhula
            Dec 18 '18 at 14:30













          • Thank you, Jose! What we wanted was INDIVIDUAL stream, your answer helped a lot.

            – anna_manzhula
            Dec 19 '18 at 13:24











          • Jose, Thank you for your answer. Can we get Video File URL of s3 uploaded ZIP in case of Individual Stream ?

            – Narayana
            Jan 2 at 15:57











          • @Jose Carlos Hello, Jose! We faced the issue. In the case of individual stream archiving the result file is in *.zip format, but we need some VIDEO FORMAT. For example, composed streaming gave us *.mkv. Is it possible to define the file format for INDIVIDUAL stream? Thank you.

            – anna_manzhula
            Jan 4 at 9:24














          1












          1








          1







          Tokbox developer here



          For composed archiving, the only two options currently available for output resolution are 640x480 and 1280x720. Trying to fit a portrait video into a canvas of the available resolutions will result in the video you are seeing.



          Possible solutions:




          • Use the custom layout control [1]: you can override the "object-fit" property to "cover". This may not result in exactly what you want, since the output resolution will still be 640x480 or 1280x720, but the video will occupy the whole canvas, at the expense of cropping the top and bottom part. See [2]



          • The best solution in my opinion is to use "individual stream archiving", where the resolution will be kept as the original, and you get a file per stream. Please check [3]




            1. https://tokbox.com/developer/guides/archiving/layout-control.html

            2. https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit

            3. https://tokbox.com/developer/rest/#start_archive








          share|improve this answer













          Tokbox developer here



          For composed archiving, the only two options currently available for output resolution are 640x480 and 1280x720. Trying to fit a portrait video into a canvas of the available resolutions will result in the video you are seeing.



          Possible solutions:




          • Use the custom layout control [1]: you can override the "object-fit" property to "cover". This may not result in exactly what you want, since the output resolution will still be 640x480 or 1280x720, but the video will occupy the whole canvas, at the expense of cropping the top and bottom part. See [2]



          • The best solution in my opinion is to use "individual stream archiving", where the resolution will be kept as the original, and you get a file per stream. Please check [3]




            1. https://tokbox.com/developer/guides/archiving/layout-control.html

            2. https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit

            3. https://tokbox.com/developer/rest/#start_archive









          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 18 '18 at 14:20









          Jose CarlosJose Carlos

          611




          611













          • Thank you, Jose, for your attention to our case. It seems only the third option is suitable for us. We will learn it and inform you about results.

            – anna_manzhula
            Dec 18 '18 at 14:30













          • Thank you, Jose! What we wanted was INDIVIDUAL stream, your answer helped a lot.

            – anna_manzhula
            Dec 19 '18 at 13:24











          • Jose, Thank you for your answer. Can we get Video File URL of s3 uploaded ZIP in case of Individual Stream ?

            – Narayana
            Jan 2 at 15:57











          • @Jose Carlos Hello, Jose! We faced the issue. In the case of individual stream archiving the result file is in *.zip format, but we need some VIDEO FORMAT. For example, composed streaming gave us *.mkv. Is it possible to define the file format for INDIVIDUAL stream? Thank you.

            – anna_manzhula
            Jan 4 at 9:24



















          • Thank you, Jose, for your attention to our case. It seems only the third option is suitable for us. We will learn it and inform you about results.

            – anna_manzhula
            Dec 18 '18 at 14:30













          • Thank you, Jose! What we wanted was INDIVIDUAL stream, your answer helped a lot.

            – anna_manzhula
            Dec 19 '18 at 13:24











          • Jose, Thank you for your answer. Can we get Video File URL of s3 uploaded ZIP in case of Individual Stream ?

            – Narayana
            Jan 2 at 15:57











          • @Jose Carlos Hello, Jose! We faced the issue. In the case of individual stream archiving the result file is in *.zip format, but we need some VIDEO FORMAT. For example, composed streaming gave us *.mkv. Is it possible to define the file format for INDIVIDUAL stream? Thank you.

            – anna_manzhula
            Jan 4 at 9:24

















          Thank you, Jose, for your attention to our case. It seems only the third option is suitable for us. We will learn it and inform you about results.

          – anna_manzhula
          Dec 18 '18 at 14:30







          Thank you, Jose, for your attention to our case. It seems only the third option is suitable for us. We will learn it and inform you about results.

          – anna_manzhula
          Dec 18 '18 at 14:30















          Thank you, Jose! What we wanted was INDIVIDUAL stream, your answer helped a lot.

          – anna_manzhula
          Dec 19 '18 at 13:24





          Thank you, Jose! What we wanted was INDIVIDUAL stream, your answer helped a lot.

          – anna_manzhula
          Dec 19 '18 at 13:24













          Jose, Thank you for your answer. Can we get Video File URL of s3 uploaded ZIP in case of Individual Stream ?

          – Narayana
          Jan 2 at 15:57





          Jose, Thank you for your answer. Can we get Video File URL of s3 uploaded ZIP in case of Individual Stream ?

          – Narayana
          Jan 2 at 15:57













          @Jose Carlos Hello, Jose! We faced the issue. In the case of individual stream archiving the result file is in *.zip format, but we need some VIDEO FORMAT. For example, composed streaming gave us *.mkv. Is it possible to define the file format for INDIVIDUAL stream? Thank you.

          – anna_manzhula
          Jan 4 at 9:24





          @Jose Carlos Hello, Jose! We faced the issue. In the case of individual stream archiving the result file is in *.zip format, but we need some VIDEO FORMAT. For example, composed streaming gave us *.mkv. Is it possible to define the file format for INDIVIDUAL stream? Thank you.

          – anna_manzhula
          Jan 4 at 9:24













          0














          How can we get URL within the zip created by opentok which was uploaded in s3






          share|improve this answer
























          • I mean Video URL to play in Mobile / Web

            – vamsisnikky
            Jan 2 at 14:51











          • transcoder was able to get the link on the videofile, but the video is without the sound :( so we gonna unzip it manually...

            – anna_manzhula
            Jan 3 at 8:45
















          0














          How can we get URL within the zip created by opentok which was uploaded in s3






          share|improve this answer
























          • I mean Video URL to play in Mobile / Web

            – vamsisnikky
            Jan 2 at 14:51











          • transcoder was able to get the link on the videofile, but the video is without the sound :( so we gonna unzip it manually...

            – anna_manzhula
            Jan 3 at 8:45














          0












          0








          0







          How can we get URL within the zip created by opentok which was uploaded in s3






          share|improve this answer













          How can we get URL within the zip created by opentok which was uploaded in s3







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 2 at 14:50









          vamsisnikkyvamsisnikky

          111




          111













          • I mean Video URL to play in Mobile / Web

            – vamsisnikky
            Jan 2 at 14:51











          • transcoder was able to get the link on the videofile, but the video is without the sound :( so we gonna unzip it manually...

            – anna_manzhula
            Jan 3 at 8:45



















          • I mean Video URL to play in Mobile / Web

            – vamsisnikky
            Jan 2 at 14:51











          • transcoder was able to get the link on the videofile, but the video is without the sound :( so we gonna unzip it manually...

            – anna_manzhula
            Jan 3 at 8:45

















          I mean Video URL to play in Mobile / Web

          – vamsisnikky
          Jan 2 at 14:51





          I mean Video URL to play in Mobile / Web

          – vamsisnikky
          Jan 2 at 14:51













          transcoder was able to get the link on the videofile, but the video is without the sound :( so we gonna unzip it manually...

          – anna_manzhula
          Jan 3 at 8:45





          transcoder was able to get the link on the videofile, but the video is without the sound :( so we gonna unzip it manually...

          – anna_manzhula
          Jan 3 at 8:45


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53725013%2fopentok-tokbox-video-in-vertical-presentation-looks-like-in-horizontal-presenta%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas