Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. PeerTube
  3. Transcode after import fails

Transcode after import fails

Scheduled Pinned Locked Moved Solved PeerTube
46 Posts 3 Posters 2.8k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • imc67I imc67

    @girish I really need to use "something" like PeerTube soon and I couldn't believe why it still doesn't work with HLS!

    I did some testing and research:

    1. On the Cloudron demo I installed PeerTube (also there I had this issue https://forum.cloudron.io/topic/3642/new-installation-not-able-to-log-in but solved it, I really think you should give it at least 1GB App memory and 1GB Redis memory to start)
    2. I only switched on 2 kind of transcoding options and HLS (no WebTorrents)
    3. Uploaded a mp4
    4. waited for transcoding
    5. Video did not play ....

    So same issue with our own PeerTube instance on our own Cloudron.

    Searching through their Git I discovered solved issues that might be related to Cloudron?

    1.

    https://github.com/Chocobozzz/PeerTube/issues/3181

    The PeerTube developer asks here "Do you have a reverse proxy in front of docker? Because it's seems the server does not respect the byte range request", that was the case and they solved it.

    Could it be a similar issue on Cloudron?

    2.
    Another issue on the Cloudron version: ffmpeg is not the right version!

    Current:

    ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
    libavutil      55. 78.100 / 55. 78.100
    libavcodec     57.107.100 / 57.107.100
    libavformat    57. 83.100 / 57. 83.100
    libavdevice    57. 10.100 / 57. 10.100
    libavfilter     6.107.100 /  6.107.100
    libavresample   3.  7.  0 /  3.  7.  0
    libswscale      4.  8.100 /  4.  8.100
    libswresample   2.  9.100 /  2.  9.100
    libpostproc    54.  7.100 / 54.  7.100
    

    Needed: You need ffmpeg >= 4.1 if you enable HLS (https://github.com/Chocobozzz/PeerTube/issues/2469#issuecomment-584563107)

    girishG Offline
    girishG Offline
    girish
    Staff
    wrote on last edited by
    #22

    @imc67 Thanks for the detailed investigation! I have pushed a new package with ffmpeg 4.3

    imc67I 1 Reply Last reply
    1
    • girishG girish

      @imc67 Thanks for the detailed investigation! I have pushed a new package with ffmpeg 4.3

      imc67I Offline
      imc67I Offline
      imc67
      translator
      wrote on last edited by imc67
      #23

      @girish thank you very much for your quick response and update! However .....

      ... it still doesn't work (although now it does show the start of the video!). For the last hour I've checked all of their Git and got inspired to look into my browser consoles (Safari on MacOS and Firefox on MacOS) and discovered in both a similar error that might be Cloudron related (but of course I'm not sure):

      Safari:
      Schermafbeelding 2020-12-02 om 21.44.28.png

      Firefox:
      Schermafbeelding 2020-12-02 om 21.47.26.png

      It looks like Peertube in the local browser needs a kind of connection to the server but it's forbidden:

      GET wss://videos.[domainname].[tld]/tracker/socket | [HTTP/1.1 403 Forbidden 64ms]

      girishG 1 Reply Last reply
      0
      • imc67I imc67

        @girish thank you very much for your quick response and update! However .....

        ... it still doesn't work (although now it does show the start of the video!). For the last hour I've checked all of their Git and got inspired to look into my browser consoles (Safari on MacOS and Firefox on MacOS) and discovered in both a similar error that might be Cloudron related (but of course I'm not sure):

        Safari:
        Schermafbeelding 2020-12-02 om 21.44.28.png

        Firefox:
        Schermafbeelding 2020-12-02 om 21.47.26.png

        It looks like Peertube in the local browser needs a kind of connection to the server but it's forbidden:

        GET wss://videos.[domainname].[tld]/tracker/socket | [HTTP/1.1 403 Forbidden 64ms]

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #24

        @imc67 Can you try to see if the instances at https://joinpeertube.org/instances#instances-list work? Will help me understand if this is a packaging issue or an upstream issue.

        I am not an expert on HLS. Can you tell me how I can test this? Does it require a specific kind of video or does it fail with any video ?

        imc67I 1 Reply Last reply
        0
        • girishG girish

          @imc67 Can you try to see if the instances at https://joinpeertube.org/instances#instances-list work? Will help me understand if this is a packaging issue or an upstream issue.

          I am not an expert on HLS. Can you tell me how I can test this? Does it require a specific kind of video or does it fail with any video ?

          imc67I Offline
          imc67I Offline
          imc67
          translator
          wrote on last edited by imc67
          #25

          @girish I've found just at random a video and it plays well, I'm pretty sure it's playing in HLS, see screenshot:

          https://tube.tardis.world/videos/watch/a56df39d-05d8-4a51-9393-b549ffd7167c

          Screenshot of Network usage in browser (Firefox):
          here you can see it's playing the 1080.m3u8 file (HLS), as far as I understand HLS this file "contains indexes" of the mp4 so it only retrieves from the browser at the right timing the right "slice" from the mp4 to play locally without retrieving first all the GB's of the mp4.

          Schermafbeelding 2020-12-02 om 22.21.09.png

          @girish "Does it require a specific kind of video or does it fail with any video ?" In Peertube settings you can choose for (only) HLS and Peertube makes these special files.

          This is how it looks like for 1 video:
          Schermafbeelding 2020-12-02 om 22.32.40.png

          Configuration in Peertube:
          Schermafbeelding 2020-12-02 om 22.34.27.png

          girishG 1 Reply Last reply
          0
          • imc67I imc67

            @girish I've found just at random a video and it plays well, I'm pretty sure it's playing in HLS, see screenshot:

            https://tube.tardis.world/videos/watch/a56df39d-05d8-4a51-9393-b549ffd7167c

            Screenshot of Network usage in browser (Firefox):
            here you can see it's playing the 1080.m3u8 file (HLS), as far as I understand HLS this file "contains indexes" of the mp4 so it only retrieves from the browser at the right timing the right "slice" from the mp4 to play locally without retrieving first all the GB's of the mp4.

            Schermafbeelding 2020-12-02 om 22.21.09.png

            @girish "Does it require a specific kind of video or does it fail with any video ?" In Peertube settings you can choose for (only) HLS and Peertube makes these special files.

            This is how it looks like for 1 video:
            Schermafbeelding 2020-12-02 om 22.32.40.png

            Configuration in Peertube:
            Schermafbeelding 2020-12-02 om 22.34.27.png

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #26

            @imc67 thanks, I will have some time tomorrow to investigate this.

            imc67I 1 Reply Last reply
            1
            • girishG girish

              @imc67 thanks, I will have some time tomorrow to investigate this.

              imc67I Offline
              imc67I Offline
              imc67
              translator
              wrote on last edited by
              #27

              @girish said in Transcode after import fails:

              @imc67 thanks, I will have some time tomorrow to investigate this.

              I’m really curious if you could find the wss issue?

              girishG 2 Replies Last reply
              1
              • imc67I imc67

                @girish said in Transcode after import fails:

                @imc67 thanks, I will have some time tomorrow to investigate this.

                I’m really curious if you could find the wss issue?

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #28

                @imc67 Too busy this week, has to be next week. FWIW, it's most likely not a wss issue (since we have apps like rocket.chat, cloudron dashboard, mattermost already using wss) but some PeerTube related issue.

                1 Reply Last reply
                0
                • imc67I imc67

                  @girish said in Transcode after import fails:

                  @imc67 thanks, I will have some time tomorrow to investigate this.

                  I’m really curious if you could find the wss issue?

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by girish
                  #29

                  @imc67 Been trying this out. I can also see 403 error to wss. There is also some hls.js error with bufferStalledError. But the video plays anyway (in safari). Exact same as https://github.com/Chocobozzz/PeerTube/issues/655 (does safari block these by default maybe?)

                  Edit: I see same behavior in firefox on linux as well.

                  imc67I 2 Replies Last reply
                  0
                  • girishG girish

                    @imc67 Been trying this out. I can also see 403 error to wss. There is also some hls.js error with bufferStalledError. But the video plays anyway (in safari). Exact same as https://github.com/Chocobozzz/PeerTube/issues/655 (does safari block these by default maybe?)

                    Edit: I see same behavior in firefox on linux as well.

                    imc67I Offline
                    imc67I Offline
                    imc67
                    translator
                    wrote on last edited by
                    #30

                    @girish said in Transcode after import fails:

                    does safari block these by default maybe?)

                    HLS was invented by Apple so I can't imagine they block it.

                    This video plays HLS very well: https://tube.tardis.world/videos/watch/a56df39d-05d8-4a51-9393-b549ffd7167c

                    girishG 1 Reply Last reply
                    0
                    • girishG girish

                      @imc67 Been trying this out. I can also see 403 error to wss. There is also some hls.js error with bufferStalledError. But the video plays anyway (in safari). Exact same as https://github.com/Chocobozzz/PeerTube/issues/655 (does safari block these by default maybe?)

                      Edit: I see same behavior in firefox on linux as well.

                      imc67I Offline
                      imc67I Offline
                      imc67
                      translator
                      wrote on last edited by imc67
                      #31

                      @girish said in Transcode after import fails:

                      video plays anyway (in safari).

                      Does it play HLS or WebTorrent? Because for testing I also switched WebTorrent ON and then the video does play in Safari but in WebTorrent not HLS.

                      girishG 1 Reply Last reply
                      0
                      • imc67I imc67

                        @girish said in Transcode after import fails:

                        video plays anyway (in safari).

                        Does it play HLS or WebTorrent? Because for testing I also switched WebTorrent ON and then the video does play in Safari but in WebTorrent not HLS.

                        girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #32

                        @imc67 said in Transcode after import fails:

                        Does it play HLS or WebTorrent?

                        How can I make out? I actually disabled WebTorrent just like your initial transcoding configuration. Only HLS with P2P is enabled. But I would like to check how it's playing the video.

                        imc67I 2 Replies Last reply
                        0
                        • imc67I imc67

                          @girish said in Transcode after import fails:

                          does safari block these by default maybe?)

                          HLS was invented by Apple so I can't imagine they block it.

                          This video plays HLS very well: https://tube.tardis.world/videos/watch/a56df39d-05d8-4a51-9393-b549ffd7167c

                          girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #33

                          @imc67 said in Transcode after import fails:

                          This video plays HLS very well: https://tube.tardis.world/videos/watch/a56df39d-05d8-4a51-9393-b549ffd7167c

                          Just to double check. This is not a Cloudron installation right? That video is 10GB for download, so I imagine it will take me forever to download and upload it into my test instance.

                          imc67I 1 Reply Last reply
                          0
                          • girishG girish

                            @imc67 said in Transcode after import fails:

                            Does it play HLS or WebTorrent?

                            How can I make out? I actually disabled WebTorrent just like your initial transcoding configuration. Only HLS with P2P is enabled. But I would like to check how it's playing the video.

                            imc67I Offline
                            imc67I Offline
                            imc67
                            translator
                            wrote on last edited by
                            #34

                            @girish some posts above I added a screenshot:

                            Screenshot of Network usage in browser (Firefox):
                            here you can see it's playing the 1080.m3u8 file (HLS), as far as I understand HLS this file "contains indexes" of the mp4 so it only retrieves from the browser at the right timing the right "slice" from the mp4 to play locally without retrieving first all the GB's of the mp4.

                            1 Reply Last reply
                            0
                            • girishG girish

                              @imc67 said in Transcode after import fails:

                              This video plays HLS very well: https://tube.tardis.world/videos/watch/a56df39d-05d8-4a51-9393-b549ffd7167c

                              Just to double check. This is not a Cloudron installation right? That video is 10GB for download, so I imagine it will take me forever to download and upload it into my test instance.

                              imc67I Offline
                              imc67I Offline
                              imc67
                              translator
                              wrote on last edited by
                              #35

                              @girish haha no indeed it's not on Cloudron, some posts before you asked me if I could find a peertube that does play HLS, accidently I found that one, btw very nice video and music 🙂

                              1 Reply Last reply
                              0
                              • girishG girish

                                @imc67 said in Transcode after import fails:

                                Does it play HLS or WebTorrent?

                                How can I make out? I actually disabled WebTorrent just like your initial transcoding configuration. Only HLS with P2P is enabled. But I would like to check how it's playing the video.

                                imc67I Offline
                                imc67I Offline
                                imc67
                                translator
                                wrote on last edited by
                                #36

                                @girish said in Transcode after import fails:

                                I actually disabled WebTorrent

                                Did you disabled before uploading video or after?

                                girishG 1 Reply Last reply
                                0
                                • imc67I imc67

                                  @girish said in Transcode after import fails:

                                  I actually disabled WebTorrent

                                  Did you disabled before uploading video or after?

                                  girishG Offline
                                  girishG Offline
                                  girish
                                  Staff
                                  wrote on last edited by
                                  #37

                                  @imc67 said in Transcode after import fails:

                                  Did you disabled before uploading video or after?

                                  I disabled before uploading the video. I see firefox downloading a lot of "fragmented" mp4s.

                                  993697a2-d5b0-4f8f-940b-f5b1ac32e9de-image.png

                                  imc67I 1 Reply Last reply
                                  0
                                  • girishG girish

                                    @imc67 said in Transcode after import fails:

                                    Did you disabled before uploading video or after?

                                    I disabled before uploading the video. I see firefox downloading a lot of "fragmented" mp4s.

                                    993697a2-d5b0-4f8f-940b-f5b1ac32e9de-image.png

                                    imc67I Offline
                                    imc67I Offline
                                    imc67
                                    translator
                                    wrote on last edited by
                                    #38

                                    @girish said in Transcode after import fails:

                                    I see firefox downloading a lot of "fragmented" mp4s

                                    WebTorrent als has those fragmented files, did you see also in that network-list a *.m3u8 file (see my screenshot earlier)? Then it's HLS.

                                    girishG 1 Reply Last reply
                                    0
                                    • imc67I imc67

                                      @girish said in Transcode after import fails:

                                      I see firefox downloading a lot of "fragmented" mp4s

                                      WebTorrent als has those fragmented files, did you see also in that network-list a *.m3u8 file (see my screenshot earlier)? Then it's HLS.

                                      girishG Offline
                                      girishG Offline
                                      girish
                                      Staff
                                      wrote on last edited by
                                      #39

                                      @imc67 Yes, I see m3u8 downloaded (which is the HLS index file, I guess). Also, AFAICT this tracker/socket thing is something webtorrent related and the 403 is returned because we disabled webtorrent explicitly. I am trying to get peertube to indicate in the logs to confirm this.

                                      5c330c7e-737f-4916-8e2c-2d0fc91d042c-image.png

                                      1 Reply Last reply
                                      0
                                      • imc67I Offline
                                        imc67I Offline
                                        imc67
                                        translator
                                        wrote on last edited by
                                        #40

                                        @girish very strange the videos do play HLS in Safari in your environment. Then it must be the video? Our videos are all 720P25 mp4, I could send you one to test?

                                        girishG 2 Replies Last reply
                                        0
                                        • imc67I imc67

                                          @girish very strange the videos do play HLS in Safari in your environment. Then it must be the video? Our videos are all 720P25 mp4, I could send you one to test?

                                          girishG Offline
                                          girishG Offline
                                          girish
                                          Staff
                                          wrote on last edited by
                                          #41

                                          @imc67 I think I found the issue with the tracker wss. Looks like the package have trust proxy configured incorrectly - https://github.com/Chocobozzz/PeerTube/blob/4e239e3554ba7162c03e939f54133933527a1b74/server/controllers/tracker.ts#L99 .

                                          BTW, I changed the location of my peertube instance and this completely broke the videos. Do you know if you changed the location of your peertube instance by any chance? The peertube docs do say that this won't work, I forgot about it. Otherwise, if you can put the video for download somewhere, I can try it out in my instance.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search