ffmpeg中的mp3音频+ background.jpg = result.mp4 [英] mp3 audio + background.jpg = result.mp4 in ffmpeg

查看:83
本文介绍了ffmpeg中的mp3音频+ background.jpg = result.mp4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将视频转换为mp4并上传到youtube时出现问题.

having problem converting video into mp4 to upload on youtube.

我已使用以下命令将其转换为avi格式.

I have converted into avi format with below command.

ffmpeg -y -i background.jpg -i deepmix.mp3 -c:a copy result.avi

但是当我将其上传到youtube时,它处于处理状态"(0%).符合此 https://support.google.com/youtube/answer/71674? hl = zh_CN 我等了8个小时,但没有运气.

but when i upload this to youtube it is in "processing state"(0%). as per this https://support.google.com/youtube/answer/71674?hl=en I waited 8 hours but no luck.

还尝试使用以下命令将avi转换为mp4.

also tried converting avi to mp4 with below command.

ffmpeg -i input.avi -c:v libx264 -crf 19 -preset slow -c:a aac -strict experimental -b:a 192k -ac 2 out.mp4

没有运气.无法在vlc中播放out.mp4.(音频没有播放视频),但是当我将此视频上传到youtube时,它处于处理状态"(95%).

no luck. not able to play out.mp4 in vlc.(audio is playing no video) but when i upload this video to youtube it was in "processing state"(95%).

也尝试过:

ffmpeg  -i result.avi -vcodec libx264 -crf 25 out.mp4

当我上传到youtube时仍处于处理状态"(95%).

Still in "processing state"(95%) when i upload to youtube.

我如何直接转换为带有一个音频(mp3)和一个图像(jpg)的mp4 720h视频?

推荐答案

您可能会得到一个视频帧,而是使用以下视频:

You are probably getting a single frame of video, using this instead:

ffmpeg -loop 1 -i background.jpg -i deepmix.mp3 -c:v libx264 -c:a aac -strict experimental -b:a 192k -shortest out.mp4

告诉ffmpeg循环播放图像(循环),并在音频结尾处停止(最短)

tells ffmpeg to loop the image (-loop) as well as stopping at the end of the audio (-shortest)

这篇关于ffmpeg中的mp3音频+ background.jpg = result.mp4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆