我在 IDE 中 [听 B 站] 直播

2022-04-21 20:34:33 +08:00
 xxxxxxxxxxxxx

因为不喜欢在浏览器里看直播,以前看直播就用脚本获取视频流在 potplayer 里播放,后来渐渐养成了听直播的习惯,有窗口在也挺碍事的,就改用 VLC 终端命令播放了。

现在我改用 IDE 了听了,写了一个 jetbrains 产品的插件:

old-young-radio

功能简单,订阅主播房间,获取实时播放状态,调用 vlc 播放。自己用了快一个月了,在 jetbrains market 也发布了两三周了,分享一下。如果有老哥和我一样有这奇怪需求,欢迎下载尝试,兼容 2020.3 之后的 jetbrains 系 ide 。进上面的链接或者直接在 ide 插件市场搜索 old-young-radio 即可安装。

题外:

vlc 是可以关闭视频输出或者直接关闭视频解析的,仅解析音频的时候,自测内存占用 5 、6M 的样子。

终端命令,给需要的老哥:

vlc -I dummy --no-video 播放地址
2827 次点击
所在节点    分享创造
19 条回复
qfdk
2022-04-22 04:44:22 +08:00
写代码就好好写代码 别整幺蛾子.
xxxxxxxxxxxxx
2022-04-22 09:07:09 +08:00
@qfdk 辛苦了
yukiwc
2022-04-22 09:10:14 +08:00
公司网管不抓你?
i0error
2022-04-22 10:33:09 +08:00
听 vup ?
q1angch0u
2022-04-22 10:56:56 +08:00
ffplay 应该会比 vlc 更轻吧~
xxxxxxxxxxxxx
2022-04-22 11:23:48 +08:00
@i0error 主要是唱见或者聊天
xxxxxxxxxxxxx
2022-04-22 11:27:59 +08:00
@yukiwc 其实都是自己在家摸鱼的时候放着做背景音 :-D
xxxxxxxxxxxxx
2022-04-22 11:32:19 +08:00
@q1angch0u 不造,没有了解过,空了看看\(^o^)/~
zthxxx
2022-04-22 12:24:16 +08:00
黑听是吧?🌝
Dawnnnnnn
2022-04-22 14:12:43 +08:00
有用👍,能否加一下视频的循环播放?我经常听录播。。
Dawnnnnnn
2022-04-22 14:19:15 +08:00
插件好像还不支持 arm64 ?

```
java.lang.UnsatisfiedLinkError: /Users/dawnnnnnn/Library/Caches/JetBrains/PyCharm2022.1/tmp/jna12573939786986155610.tmp: dlopen(/Users/dawnnnnnn/Library/Caches/JetBrains/PyCharm2022.1/tmp/jna12573939786986155610.tmp, 0x0001): tried: '/Users/dawnnnnnn/Library/Caches/JetBrains/PyCharm2022.1/tmp/jna12573939786986155610.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e'))
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1012)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
at com.sun.jna.Native.<clinit>(Native.java:195)
at com.sun.jna.NativeLibrary.<clinit>(NativeLibrary.java:87)
at me.aguo.plugin.oldyoungradio.service.PlayerService.<init>(PlayerService.kt:31)
at me.aguo.plugin.oldyoungradio.service.PlayerService$Companion$instance$2.invoke(PlayerService.kt:66)
at me.aguo.plugin.oldyoungradio.service.PlayerService$Companion$instance$2.invoke(PlayerService.kt:65)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at me.aguo.plugin.oldyoungradio.service.PlayerService$Companion.getInstance(PlayerService.kt:65)
at me.aguo.plugin.oldyoungradio.ui.CustomMouseAdapter.mouseClicked(UiEvents.kt:69)
at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
at java.desktop/java.awt.Component.processEvent(Component.java:6419)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4556)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2793)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:743)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:119)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

```
xxxxxxxxxxxxx
2022-04-22 14:47:27 +08:00
@zthxxx 哈哈哈,上个船主播应该能原谅我吧
xxxxxxxxxxxxx
2022-04-22 14:49:12 +08:00
@Dawnnnnnn M1 ?没有试过,我看能不能搞个 arm64 的虚拟机测试一下
xxxxxxxxxxxxx
2022-04-22 14:52:50 +08:00
@Dawnnnnnn 找到了相关问题,感谢反馈,如果解决了再通知你
zyh94946
2022-04-22 16:59:11 +08:00
老年收音机?
xxxxxxxxxxxxx
2022-04-22 18:40:17 +08:00
@zyh94946 hhhh ,养老必备 O(∩_∩)O
RicardoY
2022-04-24 11:10:09 +08:00
这个应该拿去参赛,感觉很匹配(
xxxxxxxxxxxxx
2022-04-25 12:38:57 +08:00
@RicardoY 细说:)
RicardoY
2022-04-26 03:03:36 +08:00
@xxxxxxxxxxxxx 掘金和 asoul 合作举办了一个比赛,https://hackathon2022.juejin.cn/?source=pc#/index

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/848437

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX