ffmpeg - How to convert audio/music to video with static image (commandline) -
i have audio file convert video. if possible, use static image appearing @ video. have investigated couple possible solutions, non of them functional.
this solution in previous thread
ffmpeg -loop_input -shortest -y -i image8.jpg -i sound11.mp3 -acodec copy -vcodec mjpeg result.avi
does not work more, not extend video duration of audio file. additionally, ffmpeg complains deprecated , suggests use avconv instead.
avconv -i sound11.mp3 -strict experimental -i 341410.jpg -map 0:a out.mp4
but image not appear
finally have tried gstreamer
gst-launch filesrc location=deltio.mp3 ! mp3parse ! mp4mux name=mux filesink location=output.mp4 filesrc location=341410.jpg ! jpegdec ! x264enc ! mux.
but error
error: element /gstpipeline:pipeline0/gstx264enc:x264enc0: can not initialize x264 encoder. additional debug info: gstx264enc.c(1269): gst_x264_enc_init_encoder (): /gstpipeline:pipeline0/gstx264enc:x264enc0 error: pipeline doesn't want preroll.
since want include conversion python script, latter solution seems best, there python wrapper gstreamer
them old commands there. have a script purpose, this
ffmpeg -loop 1 -r 1 -i img.png -i song.m4a -qp 0 -filter:v 'crop=trunc(iw/2)*2' \ -c:a aac -strict -2 -b:a 384k video.mp4
Comments
Post a Comment