{
  "id": 345929,
  "title": "deepfake - server error \"failed to create MP4\"",
  "url": "/competitions/ai-village-ctf/discussion/345929",
  "author_name": "Thariq Nugrohotomo",
  "post_date": "2022-08-17T06:40:49.173000",
  "votes": 2,
  "comment_count": 9,
  "views": 0,
  "content": "<p><strong>UPD: Issue has been resolved. It's working fine now. Thanks.</strong></p>\n<p>~~I'm getting <strong><code>{\"error\": \"failed to create MP4\"}</code></strong> from the server/API for the \"deepfake\" problem.</p>\n<p>The video file that I'm trying to send is created using <code>scikit-video</code> library.<br>\nThis video can be played successfully when opened using Kaggle file-explorer (right-bar of the notebook), so I don't need to download the file first to play it.</p>\n<p>The code to send the file is pretty similar with the Getting Started notebook.</p>\n<pre><code>with open(fimg, \"rb\") as f:\n    data = f.read()\nprint(len(data))\nb64_data = base64.urlsafe_b64encode(data).decode()\nin_data = json.dumps({\"input\": b64_data})\nr = requests.post(\"https://deepfake.fly.dev/score\", data=in_data)\nprint(r.text)\n</code></pre>\n<p>Is there any limitation on the MP4 format for this submission? Which library that I should use for creating the MP4 file?~~</p>\n<p>Thanks.</p>",
  "messages": [
    {
      "id": 1904759,
      "postDate": "2022-08-18T13:09:12.803Z",
      "content": "<p>Is it supposed to throw this error by default? I made a fresh copy of the starter notebook and it returns this error. </p>",
      "rawMarkdown": "Is it supposed to throw this error by default? I made a fresh copy of the starter notebook and it returns this error. ",
      "votes": 1,
      "replies": [
        {
          "id": 1904768,
          "postDate": "2022-08-18T13:18:35.020Z",
          "content": "<p>This error is a sign that the server is out of memory, not that there’s anything wrong with your code. </p>",
          "rawMarkdown": "This error is a sign that the server is out of memory, not that there’s anything wrong with your code. ",
          "votes": 1
        }
      ]
    },
    {
      "id": 1903234,
      "postDate": "2022-08-17T08:03:51.413Z",
      "content": "<p>That request looks good. We had to bump the memory earlier. I don’t see why it wouldn’t work, but we do use cv2 server side. </p>",
      "rawMarkdown": "That request looks good. We had to bump the memory earlier. I don’t see why it wouldn’t work, but we do use cv2 server side. ",
      "votes": 1,
      "replies": [
        {
          "id": 1903237,
          "postDate": "2022-08-17T08:08:34.767Z",
          "content": "<p>Scaled. It’s deploying, thanks for starting an issue.  </p>",
          "rawMarkdown": "Scaled. It’s deploying, thanks for starting an issue.  ",
          "votes": 1
        },
        {
          "id": 1903238,
          "postDate": "2022-08-17T08:10:18.003Z",
          "content": "<p>It's working now. Thanks for the quick action!</p>",
          "rawMarkdown": "It's working now. Thanks for the quick action!",
          "votes": 1
        },
        {
          "id": 1903272,
          "postDate": "2022-08-17T08:57:19.807Z",
          "content": "<p>Of course! I have a sneaking suspicion there’s a memory leak somewhere. </p>",
          "rawMarkdown": "Of course! I have a sneaking suspicion there’s a memory leak somewhere. ",
          "votes": 1
        }
      ]
    },
    {
      "id": 1903153,
      "postDate": "2022-08-17T06:40:49.173Z",
      "content": "<p><strong>UPD: Issue has been resolved. It's working fine now. Thanks.</strong></p>\n<p>~~I'm getting <strong><code>{\"error\": \"failed to create MP4\"}</code></strong> from the server/API for the \"deepfake\" problem.</p>\n<p>The video file that I'm trying to send is created using <code>scikit-video</code> library.<br>\nThis video can be played successfully when opened using Kaggle file-explorer (right-bar of the notebook), so I don't need to download the file first to play it.</p>\n<p>The code to send the file is pretty similar with the Getting Started notebook.</p>\n<pre><code>with open(fimg, \"rb\") as f:\n    data = f.read()\nprint(len(data))\nb64_data = base64.urlsafe_b64encode(data).decode()\nin_data = json.dumps({\"input\": b64_data})\nr = requests.post(\"https://deepfake.fly.dev/score\", data=in_data)\nprint(r.text)\n</code></pre>\n<p>Is there any limitation on the MP4 format for this submission? Which library that I should use for creating the MP4 file?~~</p>\n<p>Thanks.</p>",
      "rawMarkdown": "**UPD: Issue has been resolved. It's working fine now. Thanks.**\n\n~~I'm getting **`{\"error\": \"failed to create MP4\"}`** from the server/API for the \"deepfake\" problem.\n\nThe video file that I'm trying to send is created using `scikit-video` library.\nThis video can be played successfully when opened using Kaggle file-explorer (right-bar of the notebook), so I don't need to download the file first to play it.\n\nThe code to send the file is pretty similar with the Getting Started notebook.\n\n```\nwith open(fimg, \"rb\") as f:\n    data = f.read()\nprint(len(data))\nb64_data = base64.urlsafe_b64encode(data).decode()\nin_data = json.dumps({\"input\": b64_data})\nr = requests.post(\"https://deepfake.fly.dev/score\", data=in_data)\nprint(r.text)\n```\n\nIs there any limitation on the MP4 format for this submission? Which library that I should use for creating the MP4 file?~~\n\nThanks.",
      "votes": 2
    },
    {
      "id": 1908286,
      "postDate": "2022-08-21T14:04:49.600Z",
      "content": "<p>I get this error randomly, usually submitting the same video again results in a correct response.</p>",
      "rawMarkdown": "I get this error randomly, usually submitting the same video again results in a correct response.",
      "replies": [
        {
          "id": 1909348,
          "postDate": "2022-08-22T14:50:52.550Z",
          "content": "<p>Probably just a collision with a couple other users submitting at the same time.</p>",
          "rawMarkdown": "Probably just a collision with a couple other users submitting at the same time."
        }
      ]
    },
    {
      "id": 1906449,
      "postDate": "2022-08-19T22:30:54.243Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1904759,
      "author_name": "Youssef Nader",
      "author_url": "",
      "post_date": "2022-08-18T13:09:12.803000",
      "content": "<p>Is it supposed to throw this error by default? I made a fresh copy of the starter notebook and it returns this error. </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1904768,
          "author_name": "Joe Lucas",
          "author_url": "",
          "post_date": "2022-08-18T13:18:35.020000",
          "content": "<p>This error is a sign that the server is out of memory, not that there’s anything wrong with your code. </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1903234,
      "author_name": "moohax",
      "author_url": "",
      "post_date": "2022-08-17T08:03:51.413000",
      "content": "<p>That request looks good. We had to bump the memory earlier. I don’t see why it wouldn’t work, but we do use cv2 server side. </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1903237,
          "author_name": "moohax",
          "author_url": "",
          "post_date": "2022-08-17T08:08:34.767000",
          "content": "<p>Scaled. It’s deploying, thanks for starting an issue.  </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1903238,
          "author_name": "Thariq Nugrohotomo",
          "author_url": "",
          "post_date": "2022-08-17T08:10:18.003000",
          "content": "<p>It's working now. Thanks for the quick action!</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1903272,
          "author_name": "moohax",
          "author_url": "",
          "post_date": "2022-08-17T08:57:19.807000",
          "content": "<p>Of course! I have a sneaking suspicion there’s a memory leak somewhere. </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1908286,
      "author_name": "Guillermo Barbadillo",
      "author_url": "",
      "post_date": "2022-08-21T14:04:49.600000",
      "content": "<p>I get this error randomly, usually submitting the same video again results in a correct response.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1909348,
          "author_name": "Joe Lucas",
          "author_url": "",
          "post_date": "2022-08-22T14:50:52.550000",
          "content": "<p>Probably just a collision with a couple other users submitting at the same time.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1906449,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-19T22:30:54.243000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1904759": "Is it supposed to throw this error by default? I made a fresh copy of the starter notebook and it returns this error. ",
    "1903234": "That request looks good. We had to bump the memory earlier. I don’t see why it wouldn’t work, but we do use cv2 server side. ",
    "1903153": "**UPD: Issue has been resolved. It's working fine now. Thanks.**\n\n~~I'm getting **`{\"error\": \"failed to create MP4\"}`** from the server/API for the \"deepfake\" problem.\n\nThe video file that I'm trying to send is created using `scikit-video` library.\nThis video can be played successfully when opened using Kaggle file-explorer (right-bar of the notebook), so I don't need to download the file first to play it.\n\nThe code to send the file is pretty similar with the Getting Started notebook.\n\n```\nwith open(fimg, \"rb\") as f:\n    data = f.read()\nprint(len(data))\nb64_data = base64.urlsafe_b64encode(data).decode()\nin_data = json.dumps({\"input\": b64_data})\nr = requests.post(\"https://deepfake.fly.dev/score\", data=in_data)\nprint(r.text)\n```\n\nIs there any limitation on the MP4 format for this submission? Which library that I should use for creating the MP4 file?~~\n\nThanks.",
    "1908286": "I get this error randomly, usually submitting the same video again results in a correct response.",
    "1906449": ""
  }
}