Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
error while converting yuv to mp4 using ffmpeg
27 mars 2018, par simuI am trying to convert a yuv file to mp4 using:
ffmpeg -f rawvideo -vcodec rawvideo -s 1920x1080 -r 25 -pix_fmt yuv420p -i inputfile.yuv -c:v libx264 -preset ultrafast -qp 0 output.mp4
but i am getting following error:
[rawvideo @ 0000023f70bf8d20] Invalid buffer size, packet size 2649600 < expected frame_size 3110400 Error while decoding stream #0:0: Invalid argument frame= 251 fps= 22 q=-1.0 Lsize= 373766kB time=00:00:10.00 bitrate=306186.8kbits/s speed=0.861x video:373763kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000738% [libx264 @ 0000023f70bfaae0] frame I:2 Avg QP: 0.00 size:1412854 [libx264 @ 0000023f70bfaae0] frame P:249 Avg QP: 0.00 size:1525733 [libx264 @ 0000023f70bfaae0] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0000023f70bfaae0] mb P I16..4: 57.0% 0.0% 0.0% P16..4: 43.0% 0.0% 0.0% 0.0% 0.0% skip: 0.0% [libx264 @ 0000023f70bfaae0] coded y,uvDC,uvAC intra: 100.0% 100.0% 100.0% inter: 100.0% 100.0% 100.0% [libx264 @ 0000023f70bfaae0] i16 v,h,dc,p: 45% 52% 3% 0% [libx264 @ 0000023f70bfaae0] i8c dc,h,v,p: 1% 90% 9% 0% [libx264 @ 0000023f70bfaae0] kb/s:304966.66
-
Getting limited quantity of peaks with ffprobe
27 mars 2018, par Kucherenko DmitriyI'm using this command to get the peaks from the audio file:
ffprobe -f lavfi -i amovie=input.aac,astats=metadata=1:reset=1 -show_entries frame=pkt_pts_time:frame_tags=lavfi.astats.Overall.RMS_level,lavfi.astats.1.RMS_level,lavfi.astats.2.RMS_level -of csv=p=0
Copied from the answer: ffmpeg txt from audio levels
Could someone please help to find how to get only, 60 frames from the whole track?
For example, I have 60 seconds track, so I need to get a peak data from each second slice. If I have 120 seconds track - need to get a frame data for every 2 seconds slices.
-
How to simplify the script for ffmpeg ?
27 mars 2018, par Pravesh KumarI want this script to be simplified
I am having this given simple script; I would like to simplify this script can anyone help me to add text with the proper time interval and fade in and out effect.
ffmpeg -y -i video.mp4 -filter_complex \ "[0]split[base][text];[text] \ drawtext=fontfile=gvr.otf:text='Which of these is not an event listener adapter defined in the java.awt.event package?': fontcolor=white: fontsize=40: x=100:y=200, \ format=yuva444p,fade=t=in:st=1:d=1:alpha=1,fade=t=out:st=8:d=1:alpha=1[subtitles]; \ [base][subtitles]overlay" test_out.mp4 ffmpeg -y -i test_out.mp4 -filter_complex \ "[0]split[base][text];[text] \ drawtext=fontfile=gvr.otf:text='a) public void apple(String s, int i) {}': fontcolor=white: fontsize=40: x=100:y=(200) + 50 * 2, \ format=yuva444p,fade=t=in:st=3:d=1:alpha=1,fade=t=out:st=8:d=1:alpha=1[subtitles]; \ [base][subtitles]overlay" test_out1.mp4 ffmpeg -y -i test_out1.mp4 -filter_complex \ "[0]split[base][text];[text] \ drawtext=fontfile=gvr.otf:text='b) public int apple(int i, String s) {}': fontcolor=white: fontsize=40: x=100:y=(200) + 50 * 3, \ format=yuva444p,fade=t=in:st=4:d=1:alpha=1,fade=t=out:st=8:d=1:alpha=1[subtitles]; \ [base][subtitles]overlay" test_out2.mp4 ffmpeg -y -i test_out2.mp4 -filter_complex \ "[0]split[base][text];[text] \ drawtext=fontfile=gvr.otf:text='c) public void apple(int i, String mystring) {}': fontcolor=white: fontsize=40: x=100:y=(200) + 50 * 4, \ format=yuva444p,fade=t=in:st=5:d=1:alpha=1,fade=t=out:st=8:d=1:alpha=1[subtitles]; \ [base][subtitles]overlay" test_out3.mp4 ffmpeg -y -i test_out3.mp4 -filter_complex \ "[0]split[base][text];[text] \ drawtext=fontfile=gvr.otf:text='d) public void Apple(int i, String s) {}': fontcolor=white: fontsize=40: x=100:y=(200) + 50 * 5, \ format=yuva444p,fade=t=in:st=6:d=1:alpha=1,fade=t=out:st=8:d=1:alpha=1[subtitles]; \ [base][subtitles]overlay" test_out4.mp4
-
Add watermark text on mkv video using ffmpeg on windows version
27 mars 2018, par Movie nowI want to put a text watermark on my mkv video using ffmpeg which appears almost 3 times for a short period of time in the whole video.
The code that i am using:
ffmpeg -i Kaalakaandi.mkv -map 0 -vf "drawtext=enable='between(t,600,660)':fontsize=20: \ fontfile=C:\Windows\Fonts\arial.ttf: text='For More Visit Movienow.me': x=w-tw-10: y=h-th-10" -c: v libx264 output.mkv
But I am getting this error:
At least one output must be specified
-
corrupted HEIC tile when converting to JPEG
27 mars 2018, par Kim Bowles SørhusI'm having trouble converting a .HEIC image to a jpeg. The .HEIC file an image taken with an iphone running the latest ios public beta. I'm using the library nokia provided to parse the file and extract the image tiles from the .HEIC file, convert them to jpeg and glue them together using ffmpeg/montage.
There is a bit too much code to paste it all into this question so i put all of it in this github repo. Its pretty self explanatory and should be runnable with just a few dependencies. They are explained in the repo's README. This has all been done on osx btw.
The .HEIC files contains a 8x6 grid of images(tiles) and if you put them together you get the complete image. Simply put whatever image i input the 7th tile is corrupted as shown below and i really don't understand why. I've filed an issue with nokia, but the repo seems pretty dead and i don't really expect an answer there.