mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
[BOARD/PACKAGE] add FFMPEG to record&play /dev/fb0 + alsa capture (#48)
* [PACKAGE] downgrade FFMPEG(add) & X264 - use ffmpeg-3.1 thus downgrade ver. to working SDL1.2 - downgrade x264 to be inline with former ffmpeg - uncomment FFSERVER build instructions (it is available in 3.1 version) * [BOARD] - add `ffplay` & `ffmpeg` apps to record&play - add `arecord` script for AUDIO capture (use alsaloop workaround) - update appLinks with "params=&" for bg launch - use `pkill` instead 'killall` for scripts (warning: it also checks for bash running under the same name) - use FFPROBE to detect media format in `ffplay` - for X264 use sources.buildroot.net (code.videolan.org src only works with git method) - rm redundant usb Applink - add 0003-ffplay-custom-sdlk.patch (to make hotkeys usable in miyoo)
This commit is contained in:
18
board/miyoo/main/apps/arecord/audio_record.sh
Normal file
18
board/miyoo/main/apps/arecord/audio_record.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pgrep "arecord" > /dev/null; then
|
||||
killall arecord
|
||||
while (pgrep "arecord"); do
|
||||
sleep 1
|
||||
done
|
||||
rmmod snd-aloop.ko
|
||||
rm /mnt/.asoundrc
|
||||
alsactl init
|
||||
else
|
||||
#WARNING: This disables audio output to speakers by redirecting it to alsaloop capturing device's card
|
||||
echo 'pcm.!default { type plug slave.pcm "hw:Loopback,0,0" }' > /mnt/.asoundrc
|
||||
modprobe snd-aloop.ko
|
||||
alsactl init
|
||||
mkdir -p /mnt/output
|
||||
arecord -q -c2 -D hw:Loopback,1,0 -f S16_LE "/mnt/output/audio_$(date +%Y%m%d%H%M%S).wav"
|
||||
fi
|
||||
Reference in New Issue
Block a user