macos - 在流 #0 编解码器中找不到编解码器 h264 的标签(ffmpeg flac 到 alac 转换)
问题描述
我正在尝试将 flac 音频文件转换为 alac 音频文件。使用命令 brew install ffmpeg 安装 ffmpeg 后,我在 mac os 终端中使用 ffmpeg 命令。
运行以下命令后
for name in *.flac; do ffmpeg -nostdin -i "$name" -acodec alac "${name%.*}.m4a"; done
我收到以下错误:
Stream mapping:
Stream #0:1 -> #0:0 (mjpeg (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (flac (native) -> alac (native))
[ipod @ 0x7fa5c6800000] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libx264 @ 0x7fa5c5804a00] using SAR=1/1
[libx264 @ 0x7fa5c5804a00] MB rate (77760000) > level limit (16711680)
[libx264 @ 0x7fa5c5804a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fa5c5804a00] profile High, level 6.2
[libx264 @ 0x7fa5c5804a00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[ipod @ 0x7fa5c6800000] Could not find tag for codec h264 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --
Conversion failed!
问题是否位于流#0:1 中?
我应该使用
-c:a alac
代替
-acodec alac
解决方案
我所做的是
for name in *.flac; do ffmpeg -nostdin -i "$name" -c:a alac -c:v copy "${name%.*}.m4a"; done
推荐阅读
- typescript - 使用有区别的联合避免代码重复
- macos - RuntimeError:JupyterLab 构建失败
- swift - 更新到最新 iOS 15 测试版后出现灰屏,Xcode 警告 _disableAlpha
- jenkins - 詹金斯 - 从第一阶段保持流程直到管道结束
- reactjs - db.collection("users").onSnapshot 不会在 forEach 中循环,我正在尝试检索所有用户并列出他们的所有文档和集合
- sql - 从存储过程中删除参数
- flutter - 如何在 Flutter 中访问 Document Snapshot 中的数据
- javascript - 如何将字符串数组的元素连接成由空格连接到一定长度的较大字符串
- app-store-connect - 我可以通过自己的帐户发布为客户构建的应用程序吗?
- tcl - Tcl - 在被调用函数中追加或修改嵌套列表