RxFFmpeg icon indicating copy to clipboard operation
RxFFmpeg copied to clipboard

添加字幕不成功

Open liuglgithub opened this issue 2 years ago • 1 comments

使用命令添加 1、fmpeg -y -i /storage/emulated/0/video1/p_v_au.mp4 -vf 'movie=/storage/emulated/0/video1/wt.png[watermark];[in][watermark] overlay=10:10[out]' /storage/emulated/0/video1/output3_2.mp4 2、ffmpeg -y -i /storage/emulated/0/video1/p_v_au.mp4 -vf subtitles=/storage/emulated/0/video1/s1.srt /storage/emulated/0/video1/output3_1.mp4 3、ffmpeg -y -i /storage/emulated/0/video1/p_v_au.mp4 -i /storage/emulated/0/video1/s1.srt -c copy -c:s mov_text /storage/emulated/0/video1/p_v_au_out.mp4 4、fmpeg -y -i /storage/emulated/0/video1/01.mp4 -f srt -i /storage/emulated/0/video1/s1.srt -c:v copy -c:a copy -c:s mov_text /storage/emulated/0/video1/p_v_au_txt1.mp4 5、ffmpeg -y -i /storage/emulated/0/video1/p_v_au.mp4 -f srt -i /storage/emulated/0/video1/s1.srt -c:v copy -c:a copy -c:s mov_text /storage/emulated/0/video1/p_v_au_txt1.mp4

liuglgithub avatar Jun 15 '22 02:06 liuglgithub

使用命令添加 1、fmpeg -y -i /storage/emulated/0/video1/p_v_au.mp4 -vf 'movie=/storage/emulated/0/video1/wt.png[watermark];[in][watermark] overlay=10:10[out]' /storage/emulated/0/video1/output3_2.mp4 2、ffmpeg -y -i /storage/emulated/0/video1/p_v_au.mp4 -vf subtitles=/storage/emulated/0/video1/s1.srt /storage/emulated/0/video1/output3_1.mp4 3、ffmpeg -y -i /storage/emulated/0/video1/p_v_au.mp4 -i /storage/emulated/0/video1/s1.srt -c copy -c:s mov_text /storage/emulated/0/video1/p_v_au_out.mp4 4、fmpeg -y -i /storage/emulated/0/video1/01.mp4 -f srt -i /storage/emulated/0/video1/s1.srt -c:v copy -c:a copy -c:s mov_text /storage/emulated/0/video1/p_v_au_txt1.mp4 5、ffmpeg -y -i /storage/emulated/0/video1/p_v_au.mp4 -f srt -i /storage/emulated/0/video1/s1.srt -c:v copy -c:a copy -c:s mov_text /storage/emulated/0/video1/p_v_au_txt1.mp4

mp4不支持软字幕添加,需要使用mkv,然后用VLC进行播放就可以看到效果

ffmpeg -y -i input.mp4 -i sub.srt -c copy output.mkv

如果需要给mp4添加硬字幕就需要使用subtitles

ffmpeg -y -i input.mp4 -vf subtitles=sub.srt output.mp4

AnJoiner avatar Jun 15 '22 03:06 AnJoiner