youtube-dl 下载语音和视频

首先查看youtube单个音像的视频和音频对应的编号:

 youtube-dl -F  https://www.youtube.com/watch?v=ZsVcKcBiYHM

[youtube] ZsVcKcBiYHM: Downloading webpage

[youtube] ZsVcKcBiYHM: Downloading MPD manifest

[youtube] ZsVcKcBiYHM: Downloading player b128dda0

[info] Available formats for ZsVcKcBiYHM:

format code  extension  resolution note

139          m4a        audio only DASH audio   56k , m4a_dash container, mp4a.40.5 (22050Hz), 42.06MiB

251          webm       audio only tiny  120k , webm_dash container, opus @120k (48000Hz), 104.14MiB

140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 111.63MiB

278          webm       256×144    DASH video   95k , webm_dash container, vp9, 30fps, video only

160          mp4        256×144    DASH video  108k , mp4_dash container, avc1.4d400b, 30fps, video only

242          webm       426×240    DASH video  220k , webm_dash container, vp9, 30fps, video only

133          mp4        426×240    DASH video  242k , mp4_dash container, avc1.4d400c, 30fps, video only

134          mp4        640×360    360p  104k , mp4_dash container, avc1.4d401e@ 104k, 30fps, video only, 89.95MiB

243          webm       640×360    DASH video  405k , webm_dash container, vp9, 30fps, video only

244          webm       854×480    DASH video  752k , webm_dash container, vp9, 30fps, video only

135          mp4        854×480    DASH video 1155k , mp4_dash container, avc1.4d400a, 30fps, video only

136          mp4        1280×720   720p  243k , mp4_dash container, avc1.64001f@ 243k, 30fps, video only, 209.51MiB

247          webm       1280×720   DASH video 1505k , webm_dash container, vp9, 30fps, video only

137          mp4        1920×1080  1080p  404k , mp4_dash container, avc1.640028@ 404k, 30fps, video only, 348.85MiB

248          webm       1920×1080  DASH video 2646k , webm_dash container, vp9, 30fps, video only

18           mp4        640×360    360p  198k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 170.78MiB

22           mp4        1280×720   720p  371k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)

选择对应的编号下载:

youtube-dl -f 135+140 https://www.youtube.com/watch?v=ZsVcKcBiYHM

Unity Hub 注意事项

1. 查看项目使用的unity editor版本

ProjectSettings/ProjectVersion.txt

2. Unity下载文件有c1后缀, 中国版; c1后缀, 全球版; 18及以前的中国版多点东西, 较新的没太大区别;还有个比较重要的是, UnityHub也分中国版和全球版, 中国版Hub能识别中国版和全球版Editor, 并且Hub中内容丰富一点, 包括社区内容之类的;全球版Hub则只能识别全球版Editor。

国际版下载: https://unity.com/releases/editor/archive#download-archive-2021

中国版下载: https://unity.cn/releases/full/2021

Android Studio 使用gradle编译app遇到的问题及解决方法

  1. Android Studio gradle:build model长久运行不结束

gradle.properties,文件中添加内容

org.gradle.daemon=true

build.gradle(:root),可以看到mavenCentral()拖慢,注释mavenCentral(),另外需要镜像

maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/’ }

 

  1. Android Studio: Android Manifest doesn’t exists or has incorrect root tag

点击File / Sync project with Gradle files

 

  1. AndroidManifest.xml – specified for property ‘manifest’ does not exist

Remove this chunk of code from your build.gradle:root) in the root directory

apply plugin: ‘com.android.application’

and

android
{

compileSdkVersion 21

buildToolsVersion “20.0.0”

defaultConfig
{

applicationId “xxx.xxx.xxx”

minSdkVersion 15

targetSdkVersion 19

versionCode 1

versionName “0.5”

}

}

 

  1. How to add clean task – Task ‘clean’ not found

add below in the build.gradle(:root)

apply plugin:’base’

  1. Entry name ‘AndroidManifest.xml’ collided (Build failed after updating the android gradle plugin to 3.6.0)

add below in the build.gradle(:app)

android
{
packagingOptions
{
exclude
‘AndroidManifest.xml’

}

}

SEGGER编译Nordic nRF示例问题

环境: SEGGER Embedded Studio for ARM v7.10nRF5 SDK 17.1.0

使用SEGGER编译示例ble_app_uart,出现一下问题及相应的解决思路:

问题1: retarget.c:101:23: error: unknown type name ‘__printf_tag_ptr’

修改retarget.c:99

#if defined(__SES_VERSION) && (__SES_VERSION >= 34000)

#if defined(__SES_VERSION) && (__SES_VERSION >= 34000) && !defined(__SEGGER_RTL_VERSION)

 

问题2:  “.text is larger than specified size” and “.rodata is larger than specified size”

在项目目录下找到flash_placement.xml” 找到两行
<ProgramSection alignment=”4″ load=”Yes” name=”.text” sizeof=”0x4″/>    <ProgramSection alignment=”4″ load=”Yes” name=”.rodata” sizeof=”0x4″ />

将上面的sizeof=”0x4″ 删除

 

问题3: libc_v7em_fpv4_sp_d16_hard_t_le_eabi_balanced.a(fileops.o): in function `putchar’:”

修改”Library I/O” (under Project options >> Code >> Library) from “None” to “RTT”

Unity android 添加虚拟方向盘控制

首先加载CrossPlatformInput资产,将其中Prefabs下面的MobileSingleStickControl添加到游戏场景上。

然后将玩家脚本中的坐标轴获取方法

float x = Input.GetAxisRaw(“Horizontal”);

float y = Input.GetAxisRaw(“Vertical”);

修改如下:

float x = CrossPlatformInputManager.GetAxisRaw(“Horizontal”);

float y = CrossPlatformInputManager.GetAxisRaw(“Vertical”);