[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

hi, how do i make a video with an animated gif and music? i'm

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 12
Thread images: 1

hi,
how do i make a video with an animated gif and music? i'm on linux. i've tried pitivi but it doesn't support animated gifs.
>>
>>334092
with ffmpeg, to convert a gif to video you can use:
ffmpeg -f gif -i dumb_gif.gif out.webm

to add audio give your audio track as input:
-i audio_track.mp3 -codec copy

but, if you need to re-encode the audio to something compatible to a webm use
-i audio_track.mp3 -c:a libvorbis
>>
>>334100

that's great man, thanks!!
but the gif cycles just once. how does one make it loop through all the music length?
>>
>>334114
ffmpeg -f gif -i dumb_gif.gif -stream_loop -1 --i audio_track.mp3 -c:a libvorbis -shortest out.webm

-stream_loop -1 should loop the gif indefinitely. -shortest stop the encoding when shortest steam end, since the video stream is "infinite" it should stop at the end of the audio stream.
>>
>>334122
unfortunately i get ad "Unrecognized option 'stream_loop'" error.

looking on the internet about that stream_loop error, i found some instructions to create an infinite loop by linking explicitly hundreds of single loops, using a name list stored in a text file.

do you think it is a valid alternative?
>>
>>334210
just tried on my machine and it should be working (but the -shortest option is not necessary apparently).
Are you using an older version? mine's 3.3.2. I'm not sure about it but I think in older versions this option was simply called "-loop"
>>
>>334298

ok, i removed the ffmpeg version i had downloaded from the repositories and compiled the 3.3.2 version. this solved the stream_loop option problem. then it told me that i haven't got any libvorbis codec, and i installed it and recompiled ffmpeg.

now it works fine, except for two things:

- it fails creating .webm files, cause vp8 encoder is apparently disabled. no problem though, cause an .mp4 should work fine as well.

- in making an .mp4 video, if i keep the 'shortest' option, the output video is just 0.6 seconds in length, that is just one cycle of the gif. if i remove that option, the video length is correct, but the gif loops just once and then freezes for the rest of the time.

i really don't know what to do.
>>
>>334298
>>334484

i also tried to hack with -vframes option, or changing the -1 parameter of -stream_loop option to 0 or 100 but it doesn't affect the output at all
>>
if ffmpeg aint working you could always try to grab shotcut
>>
>>334484
>it fails creating .webm files, cause vp8 encoder is apparently disabled. no problem though, cause an .mp4 should work fine as well.
compile option should be --enable-libvpx

>in making an .mp4 video, if i keep the 'shortest' option, the output video is just 0.6 seconds in length, that is just one cycle of the gif. if i remove that option, the video length is correct, but the gif loops just once and then freezes for the rest of the time.
yeah, sorry you are right, I didn't notice the gif would stop looping. The manual (https://ffmpeg.org/ffmpeg-formats.html#gif-1) says that the gif demuxer has an option which default to 1 (causing the gif to not loop), so finally it should be:
ffmpeg -ignore_loop 0 -i 1497890724216.gif -i audio.raw -c:a libvorbis -shortest out.webm
with this I get the gif correctly looping on the audio.
>>
>>334493
>as an option which default to 1
the option is "-ignore_loop 1"
>>
>>334493

damn son, it worked! thank you very much for your effort!

>>334491
i'm gonna try this as well, thanks
Thread posts: 12
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.