Skip to content

Conversation

@gsbabil
Copy link

@gsbabil gsbabil commented Nov 27, 2021

This patch should handle real-time video streams where duration
property is not set by MPV e.g. RTSP streams from live cameras.

This patch should handle real-time video streams where duration
property is not set by MPV e.g. RTSP streams from live cameras.
Copy link

@Artturin Artturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes

$ ssh raspi arecord -f cd -t raw -D plughw:1,0 | mpv --demuxer=rawaudio --demuxer-rawaudio-format=s16le --demuxer-rawaudio-channels=2 --demuxer-rawaudio-rate=44100 -
[file] Reading from stdin...
● Audio  --aid=1  (pcm_s16le 2ch 44100 Hz)
[autosub] Reactivate external subtitle files:
Track list:
 ● Audio  --aid=1  (pcm_s16le 2ch 44100 Hz)
[autosub]
[autosub] stack traceback:
[autosub] 	[C]: in function 'tonumber'
[autosub] 	/home/art/.config/mpv/scripts/autosub.lua:168: in function 'autosub_allowed'
[autosub] 	/home/art/.config/mpv/scripts/autosub.lua:137: in function 'handler'
[autosub] 	mp.defaults:522: in function 'call_event_handlers'
[autosub] 	mp.defaults:564: in function 'dispatch_events'
[autosub] 	mp.defaults:515: in function <mp.defaults:514>
[autosub] 	[C]: in ?
[autosub] 	[C]: in ?
[autosub] Lua error: /home/art/.config/mpv/scripts/autosub.lua:168: bad argument #1 to 'tonumber' (string expected, got nil)
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
AO: [pipewire] 44100Hz stereo 2ch s16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants