Page MenuHomePhabricator

ElvisGicharu (Elvis Gicharu)
User

Projects

User does not belong to any projects.

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Wednesday

  • Clear sailing ahead.

User Details

User Since
Mar 6 2024, 4:17 PM (12 w, 4 d)
Availability
Available
LDAP User
Unknown
MediaWiki User
Elvis Gicharu [ Global Accounts ]

Recent Activity

Mar 9 2024

ElvisGicharu added a comment to T358412: Create tool for informative infographics from structured information from Wikimedia projects - Task A.

Hello everyone, I am also an Outreachy applicant for 2024.

Today, I discovered the message on Phabricator; however, I initially assumed that all discussions were taking place in the Zulip channel. Consequently, I didn't check the Phabricator comments section.

To keep it concise, I'd like to address how to make FFmpeg work on the PAWS Jupyter Notebook for the task "Create a tool for informative infographics from structured information from Wikimedia projects - Task A."

The reason FFmpeg isn't functioning on the PAWS Jupyter Notebook is that we need to download and add FFmpeg Static Builds from (https://johnvansickle.com/ffmpeg/) to the same folder where we have the code.

Here's a step-by-step guide (So, you don't have to go through the trouble of downloading from https://johnvansickle.com/ffmpeg/):

Note: Before you do the step mentioned in point (a), make sure all the steps, i.e., b, c, d, and e, are done first.

a) I've attached code that you can add to your Jupyter Notebook cell (Same notebook where you have your code to generate the bar chart race). Run this code to resolve the FFmpeg issue.

# Download a static FFmpeg build and add it to PATH.
%run 'util/load-ffmpeg.ipynb'
print('Done!')

b) Prior to running the code mentioned in point (a), add/upload the "util" folder to your PAWS. I've included the folder below.


(You, have to unzip it after downloading)

c) The purpose of the "util" folder is to automatically add the FFmpeg Static Build File (which is a folder) to your PAWS when you run the provided code mentioned in point (a).

d) Ensure that the filename in bcr.bar_chart_race() has a ".mp4" extension.

e) After completing these steps, you can run your respective code, which is the code for generating the bar chart race.

Note:

a) You might encounter a warning / Error (Which again doesn't appear when I run my code locally and only sometimes appears on my PAWS Jupyter Notebook), as shown in the attached screenshot. However, this is not an issue, as the video file will be generated in the PAWS folder after running your code. You can then download the bar chart race video and watch the video(as shown the screenshot below).

Code for ffmpeg.png (239×992 px, 48 KB)

mp 4.png (32×418 px, 2 KB)

b) If your code works correctly locally, it should generally (90%-99% of the time) work on the PAWS online Jupyter Notebook.

c) The warning or error screenshot I provided may or may not appear (Which happens to me only on PAWS), so be mindful of that.

d) Ensure that the filename in bcr.bar_chart_race() has a ".mp4" extension, as the ".html" filename won't appear on PAWS. But, Again, the .html works locally.

e) Why the .html doesn't appear on PAWS, I have no idea about it, and I have still not looked for a solution related to .html since the .mp4 file is generated on PAWS without any issue.

f) All the things I have mentioned on how to solve the issue related to FFmpeg were taken from various documentation like Matplotlib 3.8.3 documentation and, of course, my favorite stack overflow (So, thanks to the Devs on Stack Overflow).

Mar 9 2024, 9:44 AM · Outreach-Programs-Projects, Developer-Outreach, Outreachy (Round 28)