streamsave error messages
Closed this issue · 3 comments
Hi Sagnac,
I installed streamsave on my Debian 10 Buster Box. My expectation: dump to my disk the stream I am watching.
mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
built on UNKNOWN
ffmpeg library versions:
libavutil 56.14.100 (runtime 56.22.100)
libavcodec 58.18.100 (runtime 58.35.100)
libavformat 58.12.100 (runtime 58.20.100)
libswscale 5.1.100 (runtime 5.3.100)
libavfilter 7.16.100 (runtime 7.40.101)
libswresample 3.1.100 (runtime 3.3.100)
ffmpeg version: 4.1.6-1~deb10u1
I have installed:
lua script on: ~/.config/mpv/scripts/streamsave.lua
no config file on: ~/.config/mpv/scripts/script-opts
Steps to reproduce.
Note: I already installed ano
I have A Playlist.me3 PLAYLIST FILE with URL to internet for streamed videos.
url are streamed and played with mpv, no problems
With this command:
mpv --idle=once --load-scripts=yes iptvPlaylist.m3u
I got these error messages after typing CTRL-Z :
`[streamsave] Command 'expand-path' not found.
Playing: iptvPlaylist.m3u
(+) Video --vid=1 (h264 640x360 29.970fps)
(+) Audio --aid=1 (aac 2ch 48000Hz)
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 640x360 yuv420p
AV: 00:00:38 / 00:01:14 (51%) A-V: 0.000 Cache: 35s+5MB
[streamsave]
[streamsave] stack traceback:
[streamsave] /home/omvault/.config/mpv/scripts/streamsave.lua:302: in function 'increment_filename'
[streamsave] /home/omvault/.config/mpv/scripts/streamsave.lua:330: in function 'fn'
[streamsave] mp.defaults:202: in function 'fn'
[streamsave] mp.defaults:60: in function 'handler'
[streamsave] mp.defaults:339: in function 'handler'
[streamsave] mp.defaults:459: in function 'call_event_handlers'
[streamsave] mp.defaults:496: in function 'dispatch_events'
[streamsave] mp.defaults:452: in function mp.defaults:451
[streamsave] [C]: in ?
[streamsave] [C]: in ?
[streamsave] Lua error: /home/omvault/.config/mpv/scripts/streamsave.lua:302: attempt to concatenate field 'path' (a nil value)`
Thanks in advance for your help reviewing this.
Thanks for streamsave lua script.
Francisco
Hi, thanks for the information.
I see you're using an old version of mpv (v0.29.1) while the expand-path
command which the script uses was added in v0.30.0 so updating to the latest version of mpv should fix this issue.
Thanks Sagnac.
I uninstalled mpv from Debian buster. There is no a more recent mpv version from debian backports, so I had to install from git, following this guide:
https://github.com/mpv-player/mpv-build#instructions-for-debian-and-ubuntu
After, some time I finally could install mpv from source.
mpv 0.33.0-329-g8aef22e45d Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects built on Thu Sep 2 18:29:43 EST 2021 FFmpeg library versions: libavutil 57.4.101 libavcodec 59.7.100 libavformat 59.5.100 libswscale 6.0.100 libavfilter 8.7.100 libswresample 4.0.100 FFmpeg version: N-103481-g646afae00f
BUT:
I got this messages while trying to load your lua script.
Can't load unknown script: /home/XXX/.config/mpv/scripts/streamsave.lua
Googling some time I found this was caused by a lua 5.3 version I had installed. Seems a problematic version for mpv scritps and is avoided by mpv. Therefore my mpv build has NO OSM interface and no lua supported.
So I uninstalled lua 5.3 and installed lua 5.2
lua -v Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
To recompile mpv I added this to mpv_options config file for compilation
--enable-ffmpeg-strict-abi
--enable-lua
--lua=52
But I get this error when compilation script verifies lua:
Checking for Lua : no ('lua >= 5.2.0 lua < 5.3.0' not found) You manually enabled the feature 'lua', but the autodetection check failed.
Tried the same with another alternative: luajit, but is not detected.
I have both installed:
lua -v Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
luajit LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/ JIT: ON SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
and these are my installed packages:
`dpkg -l|grep lua
ii liblua5.2-0:amd64 5.2.4-1.1+b2 amd64 Shared library for the Lua interpreter version 5.2
ii liblua5.3-0:amd64 5.3.3-1.1 amd64 Shared library for the Lua interpreter version 5.3
ii libluajit-5.1-2:amd64 2.1.0~beta3+dfsg-5.1 amd64 Just in time compiler for lua - library version
ii libluajit-5.1-common 2.1.0~beta3+dfsg-5.1 all Just in time compiler for Lua - common files
ii libluajit-5.1-dev:amd64 2.1.0~beta3+dfsg-5.1 amd64 Just in time compiler for Lua - development files
ii lua-event:amd64 0.4.6-1 amd64 asynchronous event notification library for Lua
ii lua-event-dev:amd64 0.4.6-1 amd64 libevent development files for the Lua language
ii lua-socket:amd64 3.0~rc1+git+ac3201d-4 amd64 TCP/UDP socket library for the Lua language
ii lua5.2 5.2.4-1.1+b2 amd64 Simple, extensible, embeddable programming language
ii luajit 2.1.0~beta3+dfsg-5.1 amd64 Just in time compiler for Lua programming language version 5.1`
I am stuck at this point. Is there any missing lua package dependency?
Thanks in advance for reviewing this issue.
Francisco.
Sorry for the late response. If you're still experiencing difficulty running a newer version of mpv what you can do is edit Line 148 in the script so that the expand-path
command is not used.
Specifically, that line should look like this:
file.path = opts.save_directory
Note that you won't be able to specify your preferred directory using mpv style double tilde paths without expand-path
.