If you ask ChatGPT to write a script to do some computer operation, it will.
It will write an actual script with an actor and narrator and then add a Python script to do what you wanted in the middle of it.
[INT. COMPUTER SCREEN – DAY]
A computer screen displays a folder containing a motion JPEG file named “Samsung_Camera.mjpeg”. The folder also contains various other files.
[INSERT: CLOSE-UP of the “Samsung_Camera.mjpeg” file]
NARRATOR (V.O.) Motion JPEG files are typically created by Samsung cameras and consist of both video and image frames interleaved together.
[INSERT: CUT TO a programmer, JAMES, sitting at his computer desk, wearing glasses and typing on his keyboard.]
JAMES (to himself) I need to separate the video and image frames from this motion JPEG file.
[INSERT: CLOSE-UP of James’ computer screen, showing a code editor open with a Python script.]
JAMES (V.O.) I can use Python to extract the video and image frames from the motion JPEG file.
[INSERT: CUT TO the Python script on James’ computer screen, showing the following code:]
[INSERT: CUT BACK TO James, who is now running the Python script.]
JAMES (excited) There we go! The video frames are saved as “Samsung_Camera_video.avi” and the image frames are saved as “Samsung_Camera_image_xxx.jpg” files, where “xxx” represents the frame number.
[INSERT: CLOSE-UP of the folder, now showing the extracted video and image files alongside the original motion JPEG file.]
NARRATOR (V.O.) James successfully separated the video and image frames from the motion JPEG file and saved them as separate files.
[END OF SCRIPT]I asked ChatGPT asked to write a script to perform a task on my computer.
I asked ChatGPT to “Write a script to separate out the video and image from a motion Jpeg file created by a Samsung camera.” As you may guess from reading the “script”, the Python script it generated didn’t do quite what I had in mind. It created separate Jpeg files for each frame of the video.
Further prompts to produce a BASH script that did the same produced attempts that came close, but failed to extract the video, even when I used
exiftool -b -EmbeddedVideo. That did work with motion photos from older phones, but maybe they changed something in the S23U.
So, unless you’re a budding movie producer, be exact when you ask ChatGPT to write you a script to do something.
One thought on “ChatGPT wrote a script”
That’s actually quite funny. Until it takes over the world of course!