Jump to content

Record with IINA


Recommended Posts

download this workflow from http://www.packal.org/workflow/record-iina

 

This is version 2.0 of previously named "StreamCopy" workflow

Updated commands to send encoding media file to iina-cli as stdin. Also now uses IINA's own youtube-dl binary.

 

This workflow takes a valid video URL from the clipboard, plays it in IINA, and writes the video file to disk.

Provides a dialog for the user to select video quality (the user enters the youtube-dl format code which get sent back into the script)

Writes to folder ~/Movies (modify the script to save anywhere you please)

Uses applescript to run commands with iTerm2.

Requirements: IINA.app, iTerm2 (installed with homebrew)

 

Issues: The workflow creates a pipe between ffmpeg and mpv. Closing the window before the download has finished will result in a broken pipe i.e. when streaming an hls playlist. This results in ffmpeg not writing the trailer for the mp4 file correctly. The file will still plays in apps like IINA or MPV with no issue. However, Quicktime player will not recognize the file. Nor will Quicklook. 

 

Solution 1: I have resorted to re-encoding these files with ffmpeg. Then Quicktime and Quicklook will have no issues playing file

 

Solution 2: Use ffmpeg's built in streaming protocol zmq to stream to a server on localhost then play the file with ffplay.

Basic command for this looks somethting like:

 

ffmpeg -re -i input.m3u8 -c:v libx264 -c:a aac -f tee -map 0:v -map 0:a "output.mp4|[f=mpegts]zmq:tcp://127.0.0.1:5555"

 

then

 

ffplay zmq:tcp://127.0.0.1:5555

 

Caveat: Neither IINA nor MPV seem to use the zmq protocol so using this method, one is stuck with using ffplay

 

download: http://www.packal.org/workflow/record-iina

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...