sh:-c:第0行:意外标记“('; < i> iAM使用下面的C++代码创建FFMPEG命令。当我在Linux中使用Linux POPON运行这个命令时,发生以下错误。如果我直接在BASH中输入命令,它工作正常,不给任何其他。请帮助我找出原因。< / P>
生成命令的C++代码:sh:-c:第0行:意外标记“('; < i> iAM使用下面的C++代码创建FFMPEG命令。当我在Linux中使用Linux POPON运行这个命令时,发生以下错误。如果我直接在BASH中输入命令,它工作正常,不给任何其他。请帮助我找出原因。< / P>,c++,linux,bash,ffmpeg,C++,Linux,Bash,Ffmpeg,生成命令的C++代码: const string VideoCreator::GetFFMPEG_Silent_Audio_Merge_command() { stringstream command; command << FFMPEG_BINARY << " -nostdin -loglevel error -y -threads 0 -f concat -safe 0 -i <(echo file /home/ec2-user/video
const string VideoCreator::GetFFMPEG_Silent_Audio_Merge_command()
{
stringstream command;
command << FFMPEG_BINARY << " -nostdin -loglevel error -y -threads 0 -f concat -safe 0 -i <(echo file /home/ec2-user/videoData/DnXptC4ld8/FADING_OUT_VOLUP_Blrt_Decrypt_1ed5c4d569d8a1f23428b65217f65eaf_audio.m4a; echo file /home/ec2-user/videocreation/temp/silence.m4a) -c copy " << _outputAudioWithSilence;// << " 2> " << _ffmpeg_log_file;
std::cout << "\n Command = " << command.str() << "\n";
return command.str();
}
const string VideoCreator::GetFFMPEG\u Silent\u Audio\u Merge\u命令()
{
stringstream命令;
命令该命令由不支持进程替换的/bin/sh
(非bash
)执行。那么如何使用popen运行该命令呢?对于这种情况,请查看是否可以使用命令该命令由/bin/sh
执行(非bash
),它不支持进程替换。那么如何使用popen运行此命令呢?对于这种情况,请查看是否可以使用命令
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `/opt/ffmpeg/ffmpeg -nostdin -loglevel error -y -threads 0 -f concat -safe 0 -i <(echo file /home/ec2-user/videoData/DnXptC4ld8/FADING_OUT_VOLUP_Blrt_Decrypt_1ed5c4d569d8a1f23428b65217f65eaf_audio.m4a; echo file /home/ec2-user/videocreation/temp/silence.m4a) -c copy /home/ec2-user/videoData/DnXptC4ld8/WITH_SILENCE_FADING_OUT_VOLUP_Blrt_Decrypt_1ed5c4d569d8a1f23428b65217f65eaf_audio.m4a'