{
  "id": 138439,
  "title": "Unable to install FFMPEG without internet, please Help",
  "url": "/competitions/deepfake-detection-challenge/discussion/138439",
  "author_name": "",
  "post_date": "2020-03-25T00:45:43.009013400Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I have uploaded 'ffmpeg-4.2-h6538335_0.tar.bz2' file in Kaggle, but kaggle already extracts it.</p>\n\n<p>I don't know how to use 'conda' to install it, in my current working environment.\nPlease help in this regard.</p>\n\n<p>The link from where I downloaded this file:  '<a href=\"https://anaconda.org/conda-forge/ffmpeg/files\">https://anaconda.org/conda-forge/ffmpeg/files</a>' (windows)</p>",
  "messages": [
    {
      "id": "785313",
      "postDate": "03/25/2020 00:45:43",
      "content": "<p>I have uploaded 'ffmpeg-4.2-h6538335_0.tar.bz2' file in Kaggle, but kaggle already extracts it.</p>\n\n<p>I don't know how to use 'conda' to install it, in my current working environment.\nPlease help in this regard.</p>\n\n<p>The link from where I downloaded this file:  '<a href=\"https://anaconda.org/conda-forge/ffmpeg/files\">https://anaconda.org/conda-forge/ffmpeg/files</a>' (windows)</p>",
      "rawMarkdown": "I have uploaded 'ffmpeg-4.2-h6538335_0.tar.bz2' file in Kaggle, but kaggle already extracts it.\n\nI don't know how to use 'conda' to install it, in my current working environment.\nPlease help in this regard.\n\nThe link from where I downloaded this file:  'https://anaconda.org/conda-forge/ffmpeg/files' (windows)",
      "votes": null
    },
    {
      "id": "785349",
      "postDate": "03/25/2020 01:34:44",
      "content": "<p>The way I installed it was by importing the dataset: <a href=\"https://www.kaggle.com/rakibilly/ffmpeg-static-build\">https://www.kaggle.com/rakibilly/ffmpeg-static-build</a></p>\n\n<p>then to install:</p>\n\n<p><code>!tar xvf ../input/ffmpeg-static-build/ffmpeg-git-amd64-static.tar.xz</code></p>",
      "rawMarkdown": "The way I installed it was by importing the dataset: https://www.kaggle.com/rakibilly/ffmpeg-static-build\n\nthen to install:\n\n`!tar xvf ../input/ffmpeg-static-build/ffmpeg-git-amd64-static.tar.xz`",
      "votes": null
    },
    {
      "id": "785678",
      "postDate": "03/25/2020 09:03:22",
      "content": "<p>Thanks a lot David, I have installed it, as suggested by you. It is now showing in my /Kaggle/working directory.</p>\n\n<p>However, I am unable to get gif files from the videos, if you could help me in this regard, I will be very grateful to you. </p>\n\n<p>The code run perfectly when I install FFMPEG using internet in Kaggle notebook with following command :\n conda install -c conda-forge ffmpeg </p>\n\n<p>Here is my code, for the necessary advise : </p>\n\n<h1># # # Gif extraction</h1>\n\n<h2>#   !tar xvf ../input/ffmpegstaticbuilds/ffmpeg-git-amd64-static.tar.xz</h2>\n\n<p>%reset -f</p>\n\n<p>import pandas as pd\nimport numpy as np\nimport glob\nimport os</p>\n\n<p>df_trains = pd.DataFrame()</p>\n\n<p>df_trains['video_files'] =  sorted(glob.glob('/kaggle/input/deepfake-detection-challenge/train_sample_videos/*.mp4'))</p>\n\n<p>df_trains['video_files'] = df_trains['video_files'].str.split(pat='/', expand=True)[5]</p>\n\n<p>ext_gif = '.gif'</p>\n\n<p>ext_video = '.mp4' </p>\n\n<p>audio_exct = ('ffmpeg -ss 0 -t 10 -i \"{videos_p}\" ' '-vf \"fps=7, scale=-1:108: flags=lanczos\" -gifflags -transdiff -loop -1 ' '\"{to_gif_path}\"')</p>\n\n<p>all_videos_files = df_trains.video_files</p>\n\n<p>for vfs in all_videos_files:\n    if not vfs.endswith(ext_video):\n        continue</p>\n\n<pre><code>print (vfs)\n\ngif_file_name = vfs.split('/')[-1].split('.')[0]+ ext_gif\n\nprint(gif_file_name)\n\ncommand = audio_exct.format(videos_p=('/kaggle/input/deepfake-detection-challenge/train_sample_videos/'+ vfs), to_gif_path=gif_file_name)\n\nos.system(command)\n\nbreak\n</code></pre>",
      "rawMarkdown": "Thanks a lot David, I have installed it, as suggested by you. It is now showing in my /Kaggle/working directory.\n\n However, I am unable to get gif files from the videos, if you could help me in this regard, I will be very grateful to you. \n\nThe code run perfectly when I install FFMPEG using internet in Kaggle notebook with following command :\n conda install -c conda-forge ffmpeg \n\nHere is my code, for the necessary advise : \n\n\n# # # # Gif extraction \n## #   !tar xvf ../input/ffmpegstaticbuilds/ffmpeg-git-amd64-static.tar.xz\n\n%reset -f\n\nimport pandas as pd\nimport numpy as np\nimport glob\nimport os\n\ndf_trains = pd.DataFrame()\n\ndf_trains['video_files'] =  sorted(glob.glob('/kaggle/input/deepfake-detection-challenge/train_sample_videos/*.mp4'))\n\ndf_trains['video_files'] = df_trains['video_files'].str.split(pat='/', expand=True)[5]\n\n\next_gif = '.gif'\n\next_video = '.mp4' \n\naudio_exct = ('ffmpeg -ss 0 -t 10 -i \"{videos_p}\" ' '-vf \"fps=7, scale=-1:108: flags=lanczos\" -gifflags -transdiff -loop -1 ' '\"{to_gif_path}\"')\n\nall_videos_files = df_trains.video_files\n\n\nfor vfs in all_videos_files:\n    if not vfs.endswith(ext_video):\n        continue\n    \n    print (vfs)\n    \n    gif_file_name = vfs.split('/')[-1].split('.')[0]+ ext_gif\n    \n    print(gif_file_name)\n    \n    command = audio_exct.format(videos_p=('/kaggle/input/deepfake-detection-challenge/train_sample_videos/'+ vfs), to_gif_path=gif_file_name)\n    \n    os.system(command)\n    \n    break",
      "votes": null
    },
    {
      "id": "785684",
      "postDate": "03/25/2020 09:13:48",
      "content": "<p>The formatting is not good of the above code, I tried to edit it a lot.</p>\n\n<p>Please, suggest what needs to be done to execute it without internet.\nThank you.</p>",
      "rawMarkdown": "The formatting is not good of the above code, I tried to edit it a lot.\n\nPlease, suggest what needs to be done to execute it without internet.\nThank you.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 785349,
      "author_name": "davidmilam",
      "author_url": "",
      "post_date": "03/25/2020 01:34:44",
      "content": "<p>The way I installed it was by importing the dataset: <a href=\"https://www.kaggle.com/rakibilly/ffmpeg-static-build\">https://www.kaggle.com/rakibilly/ffmpeg-static-build</a></p>\n\n<p>then to install:</p>\n\n<p><code>!tar xvf ../input/ffmpeg-static-build/ffmpeg-git-amd64-static.tar.xz</code></p>",
      "votes": null,
      "replies": [
        {
          "id": 785678,
          "author_name": "sandeepritu",
          "author_url": "",
          "post_date": "03/25/2020 09:03:22",
          "content": "<p>Thanks a lot David, I have installed it, as suggested by you. It is now showing in my /Kaggle/working directory.</p>\n\n<p>However, I am unable to get gif files from the videos, if you could help me in this regard, I will be very grateful to you. </p>\n\n<p>The code run perfectly when I install FFMPEG using internet in Kaggle notebook with following command :\n conda install -c conda-forge ffmpeg </p>\n\n<p>Here is my code, for the necessary advise : </p>\n\n<h1># # # Gif extraction</h1>\n\n<h2>#   !tar xvf ../input/ffmpegstaticbuilds/ffmpeg-git-amd64-static.tar.xz</h2>\n\n<p>%reset -f</p>\n\n<p>import pandas as pd\nimport numpy as np\nimport glob\nimport os</p>\n\n<p>df_trains = pd.DataFrame()</p>\n\n<p>df_trains['video_files'] =  sorted(glob.glob('/kaggle/input/deepfake-detection-challenge/train_sample_videos/*.mp4'))</p>\n\n<p>df_trains['video_files'] = df_trains['video_files'].str.split(pat='/', expand=True)[5]</p>\n\n<p>ext_gif = '.gif'</p>\n\n<p>ext_video = '.mp4' </p>\n\n<p>audio_exct = ('ffmpeg -ss 0 -t 10 -i \"{videos_p}\" ' '-vf \"fps=7, scale=-1:108: flags=lanczos\" -gifflags -transdiff -loop -1 ' '\"{to_gif_path}\"')</p>\n\n<p>all_videos_files = df_trains.video_files</p>\n\n<p>for vfs in all_videos_files:\n    if not vfs.endswith(ext_video):\n        continue</p>\n\n<pre><code>print (vfs)\n\ngif_file_name = vfs.split('/')[-1].split('.')[0]+ ext_gif\n\nprint(gif_file_name)\n\ncommand = audio_exct.format(videos_p=('/kaggle/input/deepfake-detection-challenge/train_sample_videos/'+ vfs), to_gif_path=gif_file_name)\n\nos.system(command)\n\nbreak\n</code></pre>",
          "votes": null,
          "replies": []
        },
        {
          "id": 785684,
          "author_name": "sandeepritu",
          "author_url": "",
          "post_date": "03/25/2020 09:13:48",
          "content": "<p>The formatting is not good of the above code, I tried to edit it a lot.</p>\n\n<p>Please, suggest what needs to be done to execute it without internet.\nThank you.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "785313": "I have uploaded 'ffmpeg-4.2-h6538335_0.tar.bz2' file in Kaggle, but kaggle already extracts it.\n\nI don't know how to use 'conda' to install it, in my current working environment.\nPlease help in this regard.\n\nThe link from where I downloaded this file:  'https://anaconda.org/conda-forge/ffmpeg/files' (windows)",
    "785349": "The way I installed it was by importing the dataset: https://www.kaggle.com/rakibilly/ffmpeg-static-build\n\nthen to install:\n\n`!tar xvf ../input/ffmpeg-static-build/ffmpeg-git-amd64-static.tar.xz`",
    "785678": "Thanks a lot David, I have installed it, as suggested by you. It is now showing in my /Kaggle/working directory.\n\n However, I am unable to get gif files from the videos, if you could help me in this regard, I will be very grateful to you. \n\nThe code run perfectly when I install FFMPEG using internet in Kaggle notebook with following command :\n conda install -c conda-forge ffmpeg \n\nHere is my code, for the necessary advise : \n\n\n# # # # Gif extraction \n## #   !tar xvf ../input/ffmpegstaticbuilds/ffmpeg-git-amd64-static.tar.xz\n\n%reset -f\n\nimport pandas as pd\nimport numpy as np\nimport glob\nimport os\n\ndf_trains = pd.DataFrame()\n\ndf_trains['video_files'] =  sorted(glob.glob('/kaggle/input/deepfake-detection-challenge/train_sample_videos/*.mp4'))\n\ndf_trains['video_files'] = df_trains['video_files'].str.split(pat='/', expand=True)[5]\n\n\next_gif = '.gif'\n\next_video = '.mp4' \n\naudio_exct = ('ffmpeg -ss 0 -t 10 -i \"{videos_p}\" ' '-vf \"fps=7, scale=-1:108: flags=lanczos\" -gifflags -transdiff -loop -1 ' '\"{to_gif_path}\"')\n\nall_videos_files = df_trains.video_files\n\n\nfor vfs in all_videos_files:\n    if not vfs.endswith(ext_video):\n        continue\n    \n    print (vfs)\n    \n    gif_file_name = vfs.split('/')[-1].split('.')[0]+ ext_gif\n    \n    print(gif_file_name)\n    \n    command = audio_exct.format(videos_p=('/kaggle/input/deepfake-detection-challenge/train_sample_videos/'+ vfs), to_gif_path=gif_file_name)\n    \n    os.system(command)\n    \n    break",
    "785684": "The formatting is not good of the above code, I tried to edit it a lot.\n\nPlease, suggest what needs to be done to execute it without internet.\nThank you."
  },
  "source": "meta"
}