Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to delete the media data while writing by FFMPEG ?
13 février 2017, par Jerikc XIONGHow to delete part of the media content end of the file while writing by FFMPEG ?
- The file is being writing by
write_packet
- The media data is end of the file
- Using FFMPEG 2.8
Writing packet at this moment like this:
// the fd doesn't close 1 2 3 4 5 6 7 8 9 | fd
I need to delete
7 8 9
and the fd pointing 6 and ready to write the next one.// ready to write the next one 1 2 3 4 5 6 | fd
Any suggestion is prefered, thanks.
- The file is being writing by
-
Overlaying video with text - ffmpeg speed
12 février 2017, par SebadcI'm developing an app that has a functionality similar to Snapchat's, in which you can add text to an existing video and save it on your phone.
I got this to work using ffmpeg's "-drawtext" filter. The problem is that I'm getting a noticable delay (20 seconds or so) when adding text to videos, even though they are not too big (around 10 seconds length).
Can anyone point me in the right direction on how to reduce this delay? Taking Snapchat as reference, they overlay high quality videos with text with little to no delay.
I've read about extracting the video's frames and overlaying them manually, but shouldn't that take longer?
Thank you for your help.
-
Getting same frame each time using FFmpegFrameGrabber.grabImage() in Android
12 février 2017, par AlphabateCoderTrying to extract each frame from a video file using javaCV, FFFmpegFramGrabber and save as jpg, end up getting the same frame each time.
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(cVideoFilePath+ "/" + "VID_20170211_132657.mp4"); try { AndroidFrameConverter convertToBitmap = new AndroidFrameConverter(); grabber.start(); for (int i= 0; i< grabber.getFrameRate();i++){ frame1 = grabber.grabImage(); Bitmap bitmap = convertToBitmap.convert(frame1); String date = simpleDateFormat.format(new Date()); File picfile = new File(file_name); if (!picfile.exists()) { try { picfile.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } try { FileOutputStream out = new FileOutputStream(picfile); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out); out.flush(); out.close(); } catch (IOException ex) { } finally { } }
-
How to open MIL avi video fiile
12 février 2017, par ahme0307I have some (AVI) videos with MIL(Matrox Imaging Library) codec. I have tried multiple codecs but i am not able to open. I have tried VLC, K-lite codecs,ffmpeg, here is the log file from k-Lite
>##LAV Splitter Source (internal)::Video > >Media Type 0: >-------------------------- >Video: MIL 256x256 5fps 489kbps >AM_MEDIA_TYPE: >majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71} >subtype: Unknown GUID Name {204C494D-0000-0010-8000-00AA00389B71} >formattype: FORMAT_VideoInfo {05589F80-C356-11CE-BF01-00AA0055595A} >bFixedSizeSamples: 0 >bTemporalCompression: 1 >lSampleSize: 1 >cbFormat: 128 > >VIDEOINFOHEADER: >rcSource: (0,0)-(256,256) >rcTarget: (0,0)-(256,256) >dwBitRate: 489508 >dwBitErrorRate: 0 >AvgTimePerFrame: 2000000 > >BITMAPINFOHEADER: >biSize: 80 >biWidth: 256 >biHeight: 256 >biPlanes: 1 >biBitCount: 24 >biCompression: MIL >biSizeImage: 196608 >biXPelsPerMeter: 0 >biYPelsPerMeter: 0 >biClrUsed: 0 >biClrImportant: 0 > >pbFormat: > >
I also tried ffplay and here is the output
The only software i came across that can open this video is from Matrox and it doesn't allow exporting to other formats
I appreciate if some one can direct me to codecs that can handle this videos. I would like convert to other video formats for further processing.
-
OpenCV conda installation (missing ffmpeg) - Windows
12 février 2017, par FZNBI managed to install OpenCV 3.1 using conda and Python 3.5 and everything seems to work fine.
However, when trying to import a video file via ffmpeg I get this:
import numpy as np import cv2 cap = cv2.VideoCapture('data\vtest.avi') cap.read() #(False, None)
When using still images or my laptop webcam it works (notice that the VideCapture returns
None
). Obviously, something is wrong with ffmpeg.I have tried a couple of things:
- Install ffmpeg binaries in my environment/PATH (works fine separately but apparently OpenCV cannot call it since it looks for specific dlls).
Move to the bin folder (which is in my path as well) the dlls from the compiled version in sourceforge:
opencv_ffmpeg310_64.dll
opencv_ffmpeg310.dll
Neither of the two options worked. Any ideas?