[FFmpeg-user] FFmpeg Question
Jan Neil Gador
jan at iwebwarestudio.com
Mon Aug 5 12:50:59 CEST 2013
Hello! I'm Jan and I was hoping if I could consult/ask a question regarding
what I am working on. It's like an online moviemaker and one of the
features is to be able to merge photo with video.
Now what I did is I followed the codes for converting a single image
into a video
(mp4 file)
"ffmpeg -y -loop 1 -f image2 -i img.jpg -s 720x480 -r 25 -c:v libx264 -t 5
out.mp4"
(which gives me a 5 second mp4 video only output) so that I could merge it
with a video file (which is also an mp4 file) using concat.
"ffmpeg -y -i out.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts out.mp4.ts"
"ffmpeg -y -i out2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts
out2.mp4.ts");
(out2.mp4 is an audio-video file.)
"ffmpeg -y -i concat:'out.mp4.ts|out2.mp4.ts' -c copy -bsf:a aac_adtstoasc
final_output.mp4"
I get an output with the right sequence but there is no audio that used to
be in the second file. I don't know if I'm doing it right or what. My
question is can a video only file be merged with a audio-video file? Is
this possible? If so what should I do or how can it be done. I haven't seen any
reference of it. Hoping for your reply. Thanks!
More information about the ffmpeg-user
mailing list