@qourshi

Как заставить mpv работать со скриптами, когда выход в pipe?

Использую сборку mpv ( тык, автоматически добавляет аудио/субтитры по именам файлов ) для удобного просмотра аниме.
При использовании плеера с псеудо-графическим вариантом все работает, но при назначении выхода на pipe скрипты перестают работать.
Как это исправить?
Обычный запуск mpv: 
mpv "/mnt/smb/public/~amime/[Henshin] Spice and Wolf (rev)/"                          
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 27: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 28: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 27: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 28: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
[file] This is a directory - adding to playlist.
[SimpleHistory] Failed to add into history
Resuming playback. This behavior can be disabled with --no-resume-playback.
Playing: /mnt/smb/public/~amime/[Henshin] Spice and Wolf (rev)/[Henshin]_Ookami_to_Koushinryou_02_(BD_x264_1920x1080_FLAC).mkv
[ffmpeg/demuxer] mp3: Estimating duration from bitrate, this may be inaccurate
[ffmpeg/demuxer] ac3: Estimating duration from bitrate, this may be inaccurate
 (+) Video --vid=1 (*) '狼と遠い過去' (h264 1920x1080 23.976fps)
     Audio --aid=1 --alang=jpn (*) 'FLAC 2ch' (flac 2ch 48000Hz)
     Audio --aid=2 '[Henshin]_Ookami_to_Koushinryou_02_(BD_x264_1920x1080_FLAC).mp3' (mp3 2ch 44100Hz) (external)
 (+) Audio --aid=3 '[Henshin]_Ookami_to_Koushinryou_02_(BD_x264_1920x1080_FLAC).ac3' (ac3 6ch 48000Hz) (external)
     Subs  --sid=1 '[Henshin]_Ookami_to_Koushinryou_02_(BD_x264_1920x1080_FLAC).ass' (ass) (external)
 (+) Subs  --sid=2 '[Henshin]_Ookami_to_Koushinryou_02_(BD_x264_1920x1080_FLAC).ass' (ass) (external)
Cannot load libcuda.so.1
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 27: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 28: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 27: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 28: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 27: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 28: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
[SimpleHistory] Added the below into history
[SimpleHistory] [Henshin]_Ookami_to_Koushinryou_02_(BD_x264_1920x1080_FLAC).mkv  00:00:00.000
AO: [pipewire] 48000Hz stereo 2ch floatp
Using hardware decoding (vaapi).
VO: [gpu-next] 1920x1080 vaapi[nv12]
AV: 00:00:47 / 00:23:50 (3%) A-V: -0.042 Cache: 3.1s/3MBFontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 27: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Fontconfig warning: "/home/reimu/.config/mpv/fonts.conf", line 28: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
Saving state.
AV: 00:00:50 / 00:23:50 (4%) A-V: -0.000 Cache: 10s/10MB
Exiting... (Quit)
[SimpleHistory] Added the below into history
[SimpleHistory] [Henshin]_Ookami_to_Koushinryou_02_(BD_x264_1920x1080_FLAC).mkv  00:00:00.000

Запуск mpv с pipe:
mpv  --o=/tmp/relay --of=nut "/mnt/smb/public/~amime/[Henshin] Spice and Wolf (rev)/"          
[file] This is a directory - adding to playlist.
Playing: /mnt/smb/public/~amime/[Henshin] Spice and Wolf (rev)/[Henshin]_Ookami_to_Koushinryou_01_(BD_x264_1920x1080_FLAC).mkv
 (+) Video --vid=1 (*) '狼と一張羅' (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=jpn (*) 'FLAC 2ch' (flac 2ch 48000Hz)
VO: [lavc] 1920x1080 yuv420p
[vo/lavc] Opening encoder: MPEG-4 part 2 [mpeg4]
[ao/lavc] Opening encoder: libvorbis [libvorbis]
[encode] Opening output file: /tmp/relay
  • Вопрос задан
  • 46 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы