Video tutorial on how to record any video from kodi using external players

  Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
NapoleonWils0n Offline
Junior Member
Posts: 1
Joined: Jan 2015
Reputation: 0
Post: #1
I have made a 2 hour 30 minute video tutorial series on how to record any video from kodi by using external players.

The tools and techniques are cross platform and will work on linux, mac and windows.
Using either a gui or the command line for more advanced users

kodi record any video by using ffmpeg, rtmpdump, vlc and mpv as external players

# Youtube playlist
https://www.youtube.com/playlist?list=PL...kAeJSVNsdX


The video tutorial is made up of 16 parts listed below


1 - playercorefactory.xml

https://www.youtube.com/watch?v=JwSRKiVuqZg

define ffmpeg, rtmpdump, vlc and mpv as external players in the playercorefactory.xml,
which will allow us to record video streams opened from kodi


2 - play using menu and the playercorefactory.xml file

https://www.youtube.com/watch?v=n9hegnN1lAc

When you press c on the keyboard on a video link in kodi you get a contextual menu with a menu item called play using ...,
with a list of external players that corresponds to the players you create in the playercorefactory.xml file


3 - using vlc to record video streams

https://www.youtube.com/watch?v=KS1SKPl5cbQ

In this video i show you foreground and background video record using kodi and vlc

Foreground recording is when you use vlc as an external video player to open a video stream from kodi,
and record the video while you watch it

Background recording is when you use vlc as an external video player to open a video stream from kodi,
and record the video but dont display it on screen


4 - rtmpdump and vlc recording

https://www.youtube.com/watch?v=IQ7Vik5MXL0

vlc can't play rtmpe encrypted video streams,
so we use rtmpdump and pipe the output into vlc and then record the video stream


5 - using mpv as an external player to record streams

https://www.youtube.com/watch?v=UUE0uhwXa7A

Using mpv player as an external video player with kodi to play and record rtmpe encrypted video streams


6 - override kodi built in video player

https://www.youtube.com/watch?v=NCc0t6BjeVQ

Some kodi plugins dont use the playercorefactory.xml settings for an external video player,
and wont switch to an external player when press c on the keyboard and select an external video player


7 - save video url with the echo command

https://www.youtube.com/watch?v=-eGbNiRBo4w

We can find the url for any video stream in kodi by creating an external player which uses the echo command,
to echo the url and redirect the output to a text file


8 - ffmpeg save with play using menu

https://www.youtube.com/watch?v=awZYG7NgTok

Save any video stream from kodi by using ffmpeg as an external video player and dumping the stream in the background.


9 - recording rtmpe streams with rtmpdump ffmpeg

https://www.youtube.com/watch?v=7J57yD2rG2I

When kodi plays rtmpe encrypted video streams it creates a ~/.swfinfo file,
which contains the swf url, swf size, swf hash from the video,
this can be used with rtmpdump and ffmpeg together with the url to download the video stream.


10 - fix generate swfinfo file with kodi for rtmpdump, ffmpeg

https://www.youtube.com/watch?v=lB8op9M-ptw

Heres the fix to make kodi generate the ~/.swfinfo file


11 - fix generate swfinfo for rtmpdump ffmpeg

https://www.youtube.com/watch?v=8GenC1iUTGo

Fix for generating ~/.swfinfo file with kodi, see previous video


12 - recording http live streams with ffmpeg

https://www.youtube.com/watch?v=tazM7GY2R20

In this video i demo how to record http live streams from kodi using ffmpeg with only 4 lines of code


13 - ffmpeg set recording duration

https://www.youtube.com/watch?v=2D3CwfdUxVE

using the -t option in ffmpeg we can set a recording duration,
using the hour:minute:second syntax


14 - raspberry pi ffmpeg video recorder

https://www.youtube.com/watch?v=HBkBv8i-BdE

How to install arch linux on a raspberry pi using the noobs installer,
then install vlc which will install ffmpeg as a dependency


15 - kodi ffmpeg play using menu recording duration

https://www.youtube.com/watch?v=lfyLBwihRAU

We set ffmpeg as an external player using kodi's playercorefactory.xml file to record video streams,
and use the -t option in ffmpeg to set a duration for video recording.


16 - kodi raspberry pi ffmpeg video recorder over ssh

https://www.youtube.com/watch?v=T8okEhYxzog

Creating a video recorder using a rapberry pi with ffmpeg installed that we can use to record any video from kodi over ssh.

We define ssh as an external player in kodi's playercorefactory.xml file,
and then use kodi's play using menu to send ffmpeg commands to record videos over ssh to a raspberry pi with ffmpeg installed.
find quote
gb160 Offline
Member
Posts: 50
Joined: Oct 2014
Reputation: 0
Post: #2
Just watched your first video and its exactly what I've been looking for....really good stuff, very surprised this hasn't been commented on at all.
will watch the others when i find time.
Thanks.
find quote
gb160 Offline
Member
Posts: 50
Joined: Oct 2014
Reputation: 0
Post: #3
Quick question....I'm Using OS X, and I've used VLC from the command line before...eg

/Applications/VLC.app/Contents/MacOS/VLC -vvv "http://URLGOESHERE" --sout '#duplicate{dst=display,dst=std{access=file,mux=ts,dst='$HOME/Desktop/footy.ts'}}'

This command would let me view the stream in VLC, whilst recording a copy to my desktop as well.
Any idea how would I use this duplicate argument in the playercorefactory.xml ?
(This post was last modified: 2015-03-04 20:12 by gb160.)
find quote
KeithSloan Offline
Junior Member
Posts: 2
Joined: Nov 2009
Reputation: 0
Wink  RE: Video tutorial on how to record any video from kodi using external players
Post: #4
I have Kodi on my Ubuntu Linux machine. What I would like to do is have an option to stream what I see in Kodi to my ipad2 via VLC. Is this possible with some external player and the new versiuon of VLC for ios? I don't realy want to record.

Okay it works !!! I am able to invoke a external player for kodi that uses VLC to stream to udp and the ios version of VLC is able to play it on my ipad :-) Just need to test if airplaying to Apple TV does not overload my wifi network.
(This post was last modified: 2015-03-24 10:50 by KeithSloan.)
find quote
simple0 Offline
Junior Member
Posts: 13
Joined: Mar 2015
Reputation: 0
Post: #5
Very useful post!

Your playercorefactory.xml file is for Linux. I assume it works on OSX, since it's also an Unix based OS, but certainly it's not for Windows systems. I'm not sure if just by replacing the / with \ and the correct paths to the players executables will work. Also, Echo command is part of the shell (cmd.exe) in Windows, not a separate command, like in Linux. Is there a way to dump the stream url to a text file in Windows?

Thank you!
find quote
nickr Online
Donor
Posts: 12,818
Joined: May 2009
Reputation: 244
Location: Christchurch NZ
Post: #6
@NapoleonWils0n - is there somewhere to download your playercorefactory file? It is quite hard to read some of the details in the video.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
k4sh1n Offline
Posting Freak
Posts: 1,049
Joined: Jun 2011
Reputation: 23
Post: #7
https://raw.githubusercontent.com/Napole...actory.xml

From the youtube video link
(This post was last modified: 2015-03-26 15:26 by k4sh1n.)
find quote
megamawax Offline
Junior Member
Posts: 16
Joined: May 2015
Reputation: 0
Post: #8
Does anyone have this working in Windows? That XML file is basically a bunch of gobbledygook to me, so I have no idea if that's the windows equivalent of the linux file Napoleon had in the youtube video. Basically, I'd like to be able to click on a video addon in Kodi, start up a tv show or movie and be able to press record to download the video that's streaming from the internet. I don't have any particular addon in mind for this at the moment as I'm still just getting my feet wet with Kodi.

Thanks.
find quote
jamespatterson Offline
Junior Member
Posts: 2
Joined: Jul 2015
Reputation: 0
Lightbulb  RE: Video tutorial on how to record any video from kodi using external players
Post: #9
Hi NapoleonWils0n,

Your video tutorials is really good stuff for who are all looking record any video from kodi using external players with smartly.


Keep Sharing
find quote
patco Offline
Junior Member
Posts: 1
Joined: Jul 2015
Reputation: 0
Post: #10
This is one really useful and great tutorial. Thank you for your time to make it! Smile
find quote
zag Offline
Team-Kodi Member
Posts: 2,608
Joined: Oct 2007
Reputation: 37
Location: UK
Post: #11
Very nice idea! Been trying to record from OpenELEC for years!
find quote