How to download a video from a Facebook comment

Recently, I wanted to download a video from a comment in a Facebook post. But I quickly found that this was no evident task, so I set to find a way. After some research in Stackoverflow, and some tinkering with the different problems, I was finally able to get the video, here are the steps :

  1. Facebook downloads the audio and the video separately, so get the audio link from the google chrome inspector, by right click on the video and choosing inspect ,going to Inspector, Network Tab, and checking the links, use filter:larger-than:50k in the filter area to select bigger files (change 50k according to the length of your video), look in the results for mp4 or wav links, remove &bytestart=number_here &byteend =number_here from the end of the link, open it and download the audio

  2. Get the video link from the google chrome inspector, using same steps above, open the link and download the video

Now in order to mix the audio and the video, we need to use ffmeg :

  1. Download ffmpeg build for your OS from its website, use this link

  2. Extract the downloaded zip file

  3. Open your command line tool and cd to : \Downloads\ffmpeg-2021-04-28-git-1ab74bc193-full_build\ffmpeg-2021-04-28-git-1ab74bc193-full_build\bin (change according to which version you downloaded)

  4. Assume the input files are in the current folder, the output will be generated in the current folder too

  5. Mix the audio and the video with ffmpeg using command : .\ffmpeg.exe -i video.ext -i audio.ext -c:v copy -c:a aac output.mp4

That was it , Enjoy!

In subsequent tutorials , we will try to find a way to automate all this !