Jump to content

Mark S

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Mark S

  1. 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

  2. StreamCopy Alfred Workflow

    Takes a valid video URL from the clipboard (mp4, hls, etc.), plays the video using MPV and writes a video file to disk.

    -Uses applescriipting to run commands with iTerm2

    -Provides popup user interface to select video quality

    -Writes to folder ~/Movies

    Requirements:

    youtube-dl, ffmpeg, mpv, 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 from an hls playlist. This results in ffmpeg not writing the trailer for the mp4 file correctly. The file still plays in apps like IINA or MPV but Quicktime player does not recognize the format. Nor does Quicklook.

    Solution 1: re-encode the video file with ffmpeg. Then Quicktime and Quicklook will have no issues playing file

    Solution 2: Use ffmpeg built in streaming protocol zmq to stream to server on localhost then play 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
    

    To Do: Incorporate above strategy into project as alternative method.

     

    Download workflow from:

     

    http://www.packal.org/workflow/stream-copy

×
×
  • Create New...