babooshka电视上的自制视频指标如何取代了我年迈的父母的聚集点

亲爱的朋友们。碰巧我的上一份出版物被过度政治化了,因为它过于政治化了。这是发布此文本的第二次尝试。 las,我没有设法找出哈布雷禁止使用的特定配方。因此,我删除了所有有关大众和电视频道的名称和参考,以免再次引起特别有同情心的读者的热心焦虑,从而减轻评论中的热情。我这个谦虚的想法是为了将我心爱的父母带出电视“信息泡沫”,并为他们提供我们家庭视频以及互联网上各种视频的另一种同时熟悉的格式,有趣而有趣。对于扩大视野很有用。希望这次,UFO将不理会这个职位,亲爱的同事们,您将喜欢阅读。



嗨,哈布拉。我想告诉你一个令人惊奇的故事,这是我去年为我的父母收集的一款小型设备给我父母带来的。同时,我将向您介绍创建过程,并分享一些有趣的发现。



一切始于我和我的女儿再次来拜访父母的事实。我父母年纪大了。而且,就像所有老年退休人员一样,他们的快乐很简单:浇花,在公园里散步,与孩子和孙子交谈,当然还有电视。没有它,我们可以去哪里。



几年前,父母第一次观看了关于他不是迪摩纳的轰动史诗电影

几年前,父母第一次看了一部轰动性的电影。(在电视封面的第一个模型的“裸” RPI上,可以说是概念证明)



. , . , , . , , , . - , . . , , .



, , . , , - . . - . . , ( , ) . , , , -. . , . , , , . — . — - . , , . " , , . . , , , , ..." — .



.



Interplay Medium. , RPi . , . , . . . , … - youtube . . , . — .



— .





, IR .



在带有红外接收器和发射器的铜板上组装(为什么需要发射器-我在下面告诉您)



. , .



babooshka.tv , - :



  • lirc,
  • +
  • IR ( IR LED , )
  • RPi Zero ( ), PWM


. , + .



babooshka.tv第一版



( , :) , , .





- Raspberry OS. Raspberry Pi OS Lite image



( 2018) IR. , . , , . . RX TX /dev/lirc, . RX TX , . , , -.



wifi SSH , , . , . , , , ddg it!





.



,



apt update  
apt install mc fbi omxplayer sox


freefonts ( omxplayer )



apt install ttf-freefont


- freefonts RPi, , , freefonts /usr/share/fonts/truetype/...

sudo



cp -r freefont /usr/share/fonts/truetype/freefont  
chown root:root /usr/share/fonts/truetype/freefont  
chown root:root /usr/share/fonts/truetype/freefont/*


IR



apt install lirc


/etc/lirc/hardware.conf



# Run "lircd --driver=help" for a list of supported drivers.  
DRIVER="default"

# usually /dev/lirc0 is the correct setting for systems using udev  
DEVICE="/dev/lirc1"  
MODULES="gpio_ir_recv"


/etc/lirc/lirc_options.conf

! , known bug . , , .



driver        = default  
device        = /dev/lirc1


.



irdb-get find YOUR_DEVICE  


, YOUR_DEVICE.conf /etc/lirc/lircd.conf.d/ (, , , - )



, : , Lirc ' '. , ( , ...) ( ), . .



lircd.conf



cp /etc/lirc/lircd.conf.dist /etc/lirc/lircd.conf


/boot/config.txt, PAL - IR :



disable_splash=1

# disable_overscan=1

framebuffer_width=720
framebuffer_height=576

# enable PWM audio (add this line)
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4

# uncomment for composite PAL
sdtv_mode=2

# uncomment if hdmi display is not detected and composite is being output
# hdmi_force_hotplug=1

# Uncomment this to enable the gpio-ir module
dtoverlay=gpio-ir,gpio_pin=23,gpio_pull=up
dtoverlay=gpio-ir-tx,gpio_pin=22


IR ,



GitHub. @elmicha



/etc/udev/rules.d/71-lirc.rules /dev/lirc-rx /dev/lirc-tx:



ACTION=="add", SUBSYSTEM=="lirc", DRIVERS=="gpio_ir_recv", SYMLINK+="lirc-rx"
ACTION=="add", SUBSYSTEM=="lirc", DRIVERS=="gpio-ir-tx", SYMLINK+="lirc-tx"
ACTION=="add", SUBSYSTEM=="lirc", DRIVERS=="pwm-ir-tx", SYMLINK+="lirc-tx"


/etc/lirc/lirc_options.conf:



device        = /dev/lirc-rx
listen        = 0.0.0.0:8766


lirc_options.conf lirc_tx_options.conf :



device        = /dev/lirc-tx
output        = /var/run/lirc/lircd-tx
pidfile      = /var/run/lirc/lircd-tx.pid
listen        = 0.0.0.0:8765
connect      = 127.0.0.1:8766


/etc/systemd/system/lircd-tx.service ( systemctl cat lircd) :



[Unit]  
Documentation=man:lircd(8)  
Documentation=http://lirc.org/html/configure.html  
Description=Second lircd, the transmitter  
Wants=lircd-setup.service  
After=network.target lircd-setup.service lircd.service  

[Service]  
Type=simple  
ExecStart=/usr/sbin/lircd --nodaemon --options-file /etc/lirc/lirc_tx_options.conf  

[Install]  
WantedBy=multi-user.target  
Create /etc/systemd/system/lircd-tx.socket (from the output of systemctl cat lircd.socket) and edit it:  

[Socket]  
ListenStream=/run/lirc/lircd-tx  

[Install]  
WantedBy=sockets.target  
Also=lircd-tx.service  


/usr/local/bin/irsend



#! /bin/sh  
exec /usr/bin/irsend --device=/var/run/lirc/lircd-tx "$@"
chmod +x /usr/local/bin/irsend


lircd-tx ( sudo)



systemctl daemon-reload
systemctl start lircd-tx
systemctl enable lircd-tx


RX (sudo ...)



systemctl enable lircd.service
systemctl enable lircd.socket

systemctl restart lircd


! Warning of duplication of "begin remote… end remote". . .



:)



systemctl reboot

systemctl status lircd.service
systemctl status lircd.socket


IR



- . . IR , MOSFET :) , , LED IR .



irsend SEND_ONCE SONY-TV KEY_1


RX



irw




, . .



systemctl stop lircd.socket
systemctl stop lircd.service

record with own key names
irrecord --disable-namespace

systemctl start lircd.socket
systemctl start lircd.service


raw ( )



irrecord -f -d /dev/lirc0 ~/lirc.conf




, , , . :



  • next
  • prev
  • forward +10min
  • backward -10min
  • play/pause toggle
  • pause on switching-off
  • stop
  • audio track switch
  • subtitles switch


remoteir.sh



, , : next, prev play/pause toggle. , , . . remoteir.sh "ARR_DOWN" "ARR_UP" .. , irw . irw , .



irw


babooshka.tv



cd /home/pi/
git clone https://git.shalnoff.com/git/BABOOSHKA.TV
cd BABOOSHKA.TV/


git, . BABOOSHKA.TV .



.sh ( +x)



ls --all 


, chmod +x *.sh



systemd ( LED )



/etc/systemd/system/splash.service



[Unit]  
DefaultDependencies=no  
After=local-fs.target  

[Service]  
StandardInput=tty  
StandardOutput=tty  
ExecStart=/home/pi/BABOOSHKA.TV/early_init.sh  

[Install]  
WantedBy=sysinit.target  




sudo systemctl enable splash.service




/etc/rc.local



sudo -H -u pi /home/pi/BABOOSHKA.TV/start.babooshka.sh > /dev/null &



( sudo) .



systemctl reboot


, babooshka.tv. . .. , , . ramfs . . :) .





  • - ~/BABOOSHKA.TV/VIDEO/
  • , playlist ( 10 )
  • , PLAY
  • - , ,




, /boot/cmdline.txt. , console=tty3 quiet consoleblank=0 logo.nologo. :



console=serial0,115200 console=tty3 quiet consoleblank=0 loglevel=1 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait logo.nologo


( , )



vt.global_cursor_default=0


tty login,



sudo systemctl disable getty@tty1 


. ( , ) .



… IR TX. TX, . IR . -, - , , - . , , - , , . , . , . .





, . , , , , , , , . , , .



, ( ) - , . (!...)

, . … , … . . ? , , , " , … , … "… .



, , , :) , , .



. , , , , . .. — , . . 1 . , , , . , . . - "". , - .



. . , , RPi -.



中国超级盒子



, , , ...



TV-RF调制器板



, , . . " , -!" — .



, , , .



, . . ~200-5v 400 mA, , . 1A.

简易babooshka.tv机箱内的电源设备。 切记在切开侧槽之前先拆下电容器的焊料。



, . , 220v, .

, . micro USB - .



调制器就是这样供电的。 5v。 电阻R1需要拆除。

. 5v. R1 . ( … , )





, ) ) . .. , , , — .



接线babooshka.tv



Pi Zero IO

:



LED +3,3v 470R



GPIO 0  BCM17   LED ,   
GPIO 2  BCM27   LED ,   (, )


( , ~470R 1K )



IR



GPIO 3  BCM22   IR TX  
GPIO 4  BCM23   IR RX  

    38kHz --  

    +-----------------------+ 3
    |                       +---------------------o +3.3V
    |      ______________   |
    |     /                 |
    |    (                  | 2  
    |     \______________   +---------------------o GND
    |                       |
    |                       | 1
    |               data -> +---------------------o GPIO 4 (BCM23)
    +-----------------------+

    950nm  ( TSUS5400,    )

                     +5V
                      o
                      |
                     | |  51 Ohm (    MOSFET,    )
                     |_|
                      |
                     _|_
                     \ / 
                     ---  IR LED
                      |
                      |
         ___      |---'
  o-----|___|-----|       MOSFET
         10K      |->--
    GPIO 3 (BCM22)     |
                       |
                    ----- GND
                     ---
                      - 


, PWM



GPIO 1  BCM18   R AUDIO
GPIO 23 BCM13   L AUDIO


-



RPi电视输出

, :)



RPi . . . . .



babooshka.tv分解图

WiFi . .



. . IR RX . , — IR , .



babooshka.tv,最终汇编



IR , . . , , - , 950nm.



babooshka.tv后视图。 当然,所有题词都不相关,但是在这种情况下需要它们:)

. , , , :)



, , . -. …



红外二极管可以从外壳上拆下并铆接在电视传感器附近





电视调制器。 SMD组件上的“集体农场”声音过滤器。



. .



RPi零音频

, !



, SMD, . , , . , .



全部交易全额



. , IR . . , , - , , . .. , — . , . , .





babooshka.tv工作示范

:



  • ;
  • ( 10 -);
  • ;
  • ( , -);
  • ;
  • ( )


, , :



  • ;
  • ;
  • LED ;
  • , "" ;
  • , VIDEO YOUTUBE;
  • , / ( , , )




  • ( Usage: );
  • "" , ';' ;
  • "" ( ) ( Usage: );


, - ,



scp <your_super_cool_kitten_flick.mp4>  <babooshka>:BABOOSHKA.TV/VIDEO/




    ssh babooshka 
    cd BABOOSHKA.TV/YOUTUBE/
    youtube-dl -f 'bestvideo[vcodec=avc1][height<=720]+bestaudio/best[abr<=120]' --merge-output-format mp4 -o '%(playlist_index)s - %(title)s.%(ext)s' <youtube link>


:) .





. , youtube-dl



apt install mkvtoolnix python-pip
pip install -U youtube-dl


. -level 3.0. , , RPi low profile. H264.



ffmpeg -i FILEIN -vcodec libx264 -preset slow -level 3.0 -b 700k -s 720x404 FILEOUT


, .



babooshka.tv有一个有趣的带有徽标的贴纸





  • youtube-dl ( )
  • youtube ( , youtube-dl RPi )
  • Tox, . -. . IR .




https://git.shalnoff.com/BABOOSHKA.TV


, .



, , - OpenELEC OSMC. , . .. ( , experience :) 100% . — . , , :)



, . . , , IR . (+ 4 2 , RPi Zero). , , "" bash youtube .





. .

, , , , , . .. " " , .



, . , — . , , , . , , .



, youtub . , , . . , . " " .



, , , , .





, , . - , - . :



  • . , instant , , ;
  • RSS/JSON/plain ;
  • ;
  • ;
  • ;
  • "-";
  • RSS youtube/vimeo


.. youtube, vimeo . , . OpenELEC, , .



, , / IPFS.



- … . . . , . .



爸爸妈妈正在看猫和孙女



PS免责声明:切勿为邻居的祖母制造低功率发射器。这是被禁止的!突然,邻居的祖母仍然不时按下通常的按钮,并且无意中观看了一些错误的视频。在许多地方,此按钮仍然像以前一样起作用。总的来说,我警告过你。



o----'\/\/\/'----o




All Articles