The Create Post page says that it can accept videos in the html, but when I just tried to upload an mp4 I got this error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Are we supposed to be able to upload videos here?

  • @DaveMA
    link
    English
    2
    edit-2
    1 year ago

    There’s only a small size limit (Here it’s set to 5MB). I know the error message doesn’t tell you that’s the issue, but I don’t think your error message is what I’ve seem. Maybe you can’t upload videos? Or maybe it failed because it’s too big, and the error is because something else failed because the file didn’t upload.

    In any case, it’s encouraged to use a video website rather than uploading it as it could get heavy for the server to store and send to users (if for example someone on lemmy.world views a post on lemmy.nz, the post text is mirrored on lemmy.world but the media comes directly from lemmy.nz).

    You might consider YouTube or similar, though I think more traditionally for Fediverse sites you’d use Peertube. Perhaps you could consider https://peertube.nz

    • @RaoulDukeOP
      link
      English
      21 year ago

      Yeah the video was well over 5MB. I thought CloudFlare would handle the data, but the storage is obviously an issue too.

      I’ll sign up to Peertube. It would be nice if Lemmy starts turning Peertube or YouTube links into embedded videos so you can watch them without leaving Lemmy. It wouldn’t be hard at all to implement for YouTube. I imagine it’s the same for Peertube.

      • @DaveMA
        link
        English
        31 year ago

        Looking at this issue, at a glance it looks like videos may not yet be supported regardless of size.

        But yes, having embedded videos would be great. I think this is a polish thing that will be added over time as more critical things get resolved. If Lemmy continues to grow, that will also attract more help from developers as well so development may move faster.

      • David Palmer
        link
        English
        31 year ago

        Gonna open a PR to fix video embeds. Any feature requests you’d like me to look at?

        • @RaoulDukeOP
          link
          English
          21 year ago

          Oh cool, thanks! Yeah, beyond being able to embed PeerTube & YouTube, it would be cool if we could do it with Reddit posts too, especially videos and images. I haven’t looked into Reddit embeds, but there’s some documentation on them here (it’s a pdf‽). Someone also made this, which hasn’t been updated for a couple of years but still seems to work.

          • David Palmer
            link
            English
            31 year ago

            Ugh, not great docs on getting set up so I’m struggling to get a test env working.

        • @RaoulDukeOP
          link
          English
          21 year ago

          I just realised PeerTube videos are already being embedded, they’re just hard to find. You have to either click the book icon or open the post, then click the Expand here button. So it’s about displaying that where the preview image is. Don’t know if it’s the same with YouTube.