对于某些 DVD,当我打开 DVD 时,VLC 会打开第 1 轨。我更喜欢打开菜单。有没有办法通过命令行让 VLC 打开 DVD 菜单?目前我必须打开它,然后右键单击并转到播放 > 标题 > DVD 菜单。
答案1
我需要创建一个脚本来确定 DVD 所在的驱动器,是否有驱动器,如果有太多驱动器,则告诉用户它无法确定要执行哪个驱动器。这就是我想出的办法:
#Begin Script
Add-Type -AssemblyName System.Windows.Forms
function Get-CDDrives {
@(Get-WmiObject win32_logicaldisk -filter 'DriveType=5' |
ForEach-Object { $_.DeviceID })
}
$Drive = Get-CDDrives
if ($Drive.count -gt 1) {[System.Windows.Forms.MessageBox]::Show("Unfortunately, you have more than one DVD drive, and I'm not smart enough to know which one to use for you video." , "Error" , 0)}
if ($Drive.count -eq 1) {& "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" dvd:///"$Drive"\}
if ($Drive.count -lt 1) {[System.Windows.Forms.MessageBox]::Show("Hmmm... I can't seem to find a DVD drive on your computer." , "Error" , 0)}
#End Script
答案2
您只需传递文件夹或驱动器的名称,例如
vlc dvd://d:
有关详细信息,请参阅命令行参考手册:https://wiki.videolan.org/Documentation:Command_line/#Opening_a_DVD_or_VCD.2C_or_an_audio_CD