版面规则
提问时请注意:尽量详细描述操作过程、AVS脚本内容等,最好能写出片名,只贴图有时无法看出问题原因。
提示:发布原创内容请尽量使用附件上传。使用网盘会出现过期失效的问题,请注意。
头像
yabbay
帖子: 62
注册时间: 2012-05-31 10:39
来自: Tokyo

新手求助之二 无法通过avs编码音频

首先 直接片源拖bat是可以编码音频的
此为bat主要内容
ffmpeg -i "%~1" -f wav - | neroAacEnc -hev2 -q 0.45 -ignorelength -if - -of "%~dpn1_a.m4a"
(然而一用avs无论ffmpeg换dshow2wav还是neroAacEnc换qaac都不行)
此为avs
FFVideoSource("B:\01.mkv",timecodes = "01_v.txt")
LanczosResize(1280,720)
(FFVideoSource换DirectShowSource也不行)
错误信息是

B:\>CD /D "D:\Tools\Playin Packet\AVS\avs\avs\x264\"

D:\Tools\Playin Packet\AVS\avs\avs\x264>ffmpeg -i "B:\01.avs" -f wav - | neroAacEnc -hev2 -q 0.45 -ignorelength
-if - -of "B:\01_a.m4a"
*************************************************************
* *
* Nero AAC Encoder *
* Copyright 2009 Nero AG *
* All Rights Reserved Worldwide *
* *
* Package build date: Feb 18 2010 *
* Package version: 1.5.4.0 *
* *
* See -help for a complete list of available parameters. *
* *
*************************************************************

FFmpeg version SVN-r25870-Sherpya, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 4 2010 05:23:23 with gcc 4.2.5 20090330 (prerelease) [Sherpya]
libavutil 50.33. 0 / 50.33. 0
libavcore 0.14. 0 / 0.14. 0
libavcodec 52.97. 2 / 52.97. 2
libavformat 52.87. 1 / 52.87. 1
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.67. 0 / 1.67. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, avs, from 'B:\01.avs':
Duration: 00:00:16.01, start: 0.000000, bitrate: 0 kb/s
Stream #0.0: Video: rawvideo, yuv420p, 1280x720, 331444 kb/s, 29.97 tbr, 29.97 tbn, 29.97
tbc
Output #0, wav, to 'pipe:':
Output file #0 does not contain any stream
ERROR: could not parse WAV file

D:\Tools\Playin Packet\AVS\avs\avs\x264>pause
请按任意键继续. . .

如果将bat改成
ffmpeg -i "%~s1" -acodec pcm_f32le -f wav -vn -ar 48000 - | qaac.exe --tvbr 48 -q 2 --raw-rate 48000 -o "%~dpn1_a.m4a" -
错误提示是

ffmpeg version N-41074-g9c27f29 Copyright (c) 2000-2012 the FFmpeg developers
built on May 27 2012 13:22:28 with gcc 4.6.3
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetec
t --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-l
ibopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libm
p3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable
-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enabl
e-zlib
libavutil 51. 55.100 / 51. 55.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.101 / 54. 6.101
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
qaac 1.24, CoreAudioToolbox 7.9.7.3

<stdin>
Input #0, avs, from 'B:\01.avs':
Duration: 00:00:16.01, start: 0.000000, bitrate: 0 kb/s
Stream #0:0: Video: rawvideo (YV12 / 0x32315659), yuv420p, 1280x720, 331444 kb/s, 29.97 tb
r, 29.97 tbn, 29.97 tbc
Output #0, wav, to 'pipe:':
Output file #0 does not contain any stream
ERROR: Not available input file format
请按任意键继续. . .
          .∧__,,∧
         ( ´・ω・`) ブルブル
          (つまくら) アリと明日(ant and tomorrow)
          `u―u´ レッツ・エッグ・ペイン(Let`s egg pain)
头像
upyzl
帖子: 446
注册时间: 2010-12-25 18:44
来自: 湘/京
联系: 网站

Re: 新手求助之二 无法通过avs编码音频

FFVideoSource无音频,DirectShowSource默认不用audio=true也无音频
ffms2可以换FFmpegSource2用atrack=-1加音频(多音轨的要看情况)

顺便我不建议用avs加载处理音频
头像
yabbay
帖子: 62
注册时间: 2012-05-31 10:39
来自: Tokyo

Re: 新手求助之二 无法通过avs编码音频

感谢upyzl大 换FFmpegSource2后ffmpeg和dshow2wav都没问题了
          .∧__,,∧
         ( ´・ω・`) ブルブル
          (つまくら) アリと明日(ant and tomorrow)
          `u―u´ レッツ・エッグ・ペイン(Let`s egg pain)

回到 “AviSynth”