Hugo Future Imperfect Slim

Tracey Jaquith 路 PoohBot Pictures

Technophile 路 Optimist 路 CyclistArchivist 路 Design 路 Video 路 TV 路 Kubernetes 路 Docker

tracey pooh

2 minutes read

Greetings video geeks! 馃槑
At my job, I’ve updated the process and way we create our .mp4 files that are shown on video pages on archive.org

It’s a much cleaner/clearer process, namely:

  • I opted to ditch ffpreset files in favor of command-line argument 100% equivalents. It seems a bit easier for someone reading the task log of their item, trying to see what we did.
  • I no longer need qt-faststart step and dropped it. I use the cmd-line modern ffmpeg -movflags faststart

Entire processing is now done 100% with ffmpeg, in the standard “2-pass” mode

As before, this output .mp4:

  • plays in modern html5 video tag compatible browsers
  • plays in flash plugin within browsers
  • works on all iOS devices
  • makes sure the “moov atom” is at the front of the file, so browsers can playback before downloading the entire file, etc.

Here is an example (you would tailor especially the scale=640:480 depending on source aspect ratio and desired output size; change or drop altogether the -r 20 option (the source was 20 fps, so we make the dest 20 fps); tailor the bitrate args to taste):

ffmpeg -y -i stairs.avi -vcodec libx264 -pix\_fmt yuv420p -vf yadif,scale=640:480 \
  -profile:v baseline \
  -x264opts cabac=0:bframes=0:ref=1:weightp=0:level=30:bitrate=700:vbv\_maxrate=768:vbv_bufsize=1400 \
  -movflags faststart -ac 2 -b:a 128k -ar 44100 -r 20 -pass 1 -acodec aac \
  -strict experimental stairs.mp4;

ffmpeg -y -i stairs.avi -vcodec libx264 -pix\_fmt yuv420p -vf yadif,scale=640:480 \
  -profile:v baseline \
  -x264opts cabac=0:bframes=0:ref=1:weightp=0:level=30:bitrate=700:vbv\_maxrate=768:vbv_bufsize=1400 \
  -movflags faststart -ac 2 -b:a 128k -ar 44100 -r 20 -pass 2 -acodec aac \
  -strict experimental \
  -metadata title='Stairs where i work - https://archive.org/details/stairs' \
  -metadata year='2004' \
  -metadata comment='license:http://creativecommons.org/licenses/publicdomain/' \
  stairs.mp4

Happy hacking and creating!

PS: here is the way we compile ffmpeg (we use ubuntu linux at work, but this script used to have minor mods for macosx, too).

Say something

Comments

Nothing yet.

Recent posts

See more

Categories

Tags

#spottheshuttle 1940s 1st-person 3d accident aids-lifecycle airplane animals appeltart apple-pie apple-watch architecture arkit art ascii-art asia augmented-reality baking bali bay-area biking birthday cafe-racer camaro camera-video cars cat-pee cat-psychology cats coding college colorspaces computer-vision cornell crictl css dark-mode decaf deinterlace desert design diy docker documentary ducting emacs endeavour family ffmpeg food games geek gitlab golden-gate-bridge google-cardboard green-magic-man h.264 hack highway-1 home https hugo hyperlapse internet-archive ios iphone javascript k3s kubernetes landscapes linux lisp luke-battling-darth mac macosx mashup metal montclair motion-jpeg motorcycle mplayer nasa new-bay-bridge news ninja oakland partioning php php-htm-mode politics protest rancher recording remaster remix remodel shuttle small-town star-wars swift technical time-lapse time-machine timing-belt-adjustment top-end-rebuild tracey traefik training-ride vacation valve-job video virtual-reality vlog weekend-mechanic work x264 xcode yuvj420p zx6

About

tracey is a nonstop dance party. so you dont have to. dont ask me about k8s. thanks for dropping by today. you look nice.