V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
xxxxxxxxxxxxx
V2EX  ›  分享创造

我在 IDE 中 [听 B 站] 直播

  •  
  •   xxxxxxxxxxxxx · 2022-04-21 20:34:33 +08:00 · 2800 次点击
    这是一个创建于 949 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    old-young-radio

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

    • 提示 1:我只看 B 站,所以插件也只支持 b 站
    • 提示 2:必须要安装 vlc

    题外:

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

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

    vlc -I dummy --no-video 播放地址
    
    19 条回复    2022-04-26 03:03:36 +08:00
    qfdk
        1
    qfdk  
       2022-04-22 04:44:22 +08:00 via iPhone
    写代码就好好写代码 别整幺蛾子.
    xxxxxxxxxxxxx
        2
    xxxxxxxxxxxxx  
    OP
       2022-04-22 09:07:09 +08:00
    @qfdk 辛苦了
    yukiwc
        3
    yukiwc  
       2022-04-22 09:10:14 +08:00
    公司网管不抓你?
    i0error
        4
    i0error  
       2022-04-22 10:33:09 +08:00
    听 vup ?
    q1angch0u
        5
    q1angch0u  
       2022-04-22 10:56:56 +08:00
    ffplay 应该会比 vlc 更轻吧~
    xxxxxxxxxxxxx
        6
    xxxxxxxxxxxxx  
    OP
       2022-04-22 11:23:48 +08:00
    @i0error 主要是唱见或者聊天
    xxxxxxxxxxxxx
        7
    xxxxxxxxxxxxx  
    OP
       2022-04-22 11:27:59 +08:00
    @yukiwc 其实都是自己在家摸鱼的时候放着做背景音 :-D
    xxxxxxxxxxxxx
        8
    xxxxxxxxxxxxx  
    OP
       2022-04-22 11:32:19 +08:00
    @q1angch0u 不造,没有了解过,空了看看\(^o^)/~
    zthxxx
        9
    zthxxx  
       2022-04-22 12:24:16 +08:00
    黑听是吧?🌝
    Dawnnnnnn
        10
    Dawnnnnnn  
       2022-04-22 14:12:43 +08:00
    有用👍,能否加一下视频的循环播放?我经常听录播。。
    Dawnnnnnn
        11
    Dawnnnnnn  
       2022-04-22 14:19:15 +08:00   ❤️ 1
    插件好像还不支持 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
        12
    xxxxxxxxxxxxx  
    OP
       2022-04-22 14:47:27 +08:00
    @zthxxx 哈哈哈,上个船主播应该能原谅我吧
    xxxxxxxxxxxxx
        13
    xxxxxxxxxxxxx  
    OP
       2022-04-22 14:49:12 +08:00
    @Dawnnnnnn M1 ?没有试过,我看能不能搞个 arm64 的虚拟机测试一下
    xxxxxxxxxxxxx
        14
    xxxxxxxxxxxxx  
    OP
       2022-04-22 14:52:50 +08:00
    @Dawnnnnnn 找到了相关问题,感谢反馈,如果解决了再通知你
    zyh94946
        15
    zyh94946  
       2022-04-22 16:59:11 +08:00
    老年收音机?
    xxxxxxxxxxxxx
        16
    xxxxxxxxxxxxx  
    OP
       2022-04-22 18:40:17 +08:00
    @zyh94946 hhhh ,养老必备 O(∩_∩)O
    RicardoY
        17
    RicardoY  
       2022-04-24 11:10:09 +08:00
    这个应该拿去参赛,感觉很匹配(
    xxxxxxxxxxxxx
        18
    xxxxxxxxxxxxx  
    OP
       2022-04-25 12:38:57 +08:00
    @RicardoY 细说:)
    RicardoY
        19
    RicardoY  
       2022-04-26 03:03:36 +08:00   ❤️ 2
    @xxxxxxxxxxxxx 掘金和 asoul 合作举办了一个比赛,https://hackathon2022.juejin.cn/?source=pc#/index
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5564 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 06:38 · PVG 14:38 · LAX 22:38 · JFK 01:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.