mpeg-4

Creating MPEG4 video file with Python from raw frames

前提是你 提交于 2019-12-04 14:13:00
I have a raw video frame source which I can access in Python. I'd like to create a MPEG4 video out of this, with MP3 background music. What kind of tools and libraries are available in Python for such a task? Preferably I'd like to have an API for which I can feed output filename and then individual frames as 24 bit raw images. With OpenCV and the corresponding Python binding, you could use something like the function cv.WriteFrame . You could also use pyffmpeg, but that is geared more towards accessing individual frames from a video file. One of these should be able to do what you requesting:

GoPro: get each frame time stamp

99封情书 提交于 2019-12-03 09:55:57
问题 I am currently trying to extract each frame time stamp from an MPEG-4 file that has been recorded using a GoPro. I want the exact time at which the frame has been captured by the camera, to couple that with computer vision algorithms later on. I know that the output framerate is 25 fps. I extracted the pts in different ways using ffmpeg and ffprobe, but they all show way too perfect results for me to believe them. Each frame/packet has a precise, 0.04 sec interal (or 3600 in pts units) which

GoPro: get each frame time stamp

痴心易碎 提交于 2019-12-03 03:33:35
I am currently trying to extract each frame time stamp from an MPEG-4 file that has been recorded using a GoPro. I want the exact time at which the frame has been captured by the camera, to couple that with computer vision algorithms later on. I know that the output framerate is 25 fps. I extracted the pts in different ways using ffmpeg and ffprobe, but they all show way too perfect results for me to believe them. Each frame/packet has a precise, 0.04 sec interal (or 3600 in pts units) which conveniently enough matches a perfect 25 fps. The commands I have used so far are: ffmpeg -i 3_96025

MPEG4 quality saved in MATLAB

丶灬走出姿态 提交于 2019-12-02 17:01:20
问题 I need to get an mpeg4 file to use in another application, from an original mpeg4 video I loaded into matlab and edited (frame by frame). To do so, I tried using VideoWriter, setting the quality to 100%: newVid = VideoWriter(outputfilename, 'MPEG-4'); newVid.FrameRate = fps; newVid.Quality = 100; However, the result I'm getting is very poor and if the original unedited video size was ~50MB, the one I get post-edit in matlab is around ~20MB, and I don't know how to keep the quality and size as

Split fragmented MP4 into multiple MP4 files

家住魔仙堡 提交于 2019-12-02 14:36:21
问题 We're trying to parse the fragments of an fMP4 file into separate independent MP4s. Can anyone help point us in the right direction to do this, or is there any open source code that exists that we could leverage? 回答1: I think MP4Box might be what you are looking for. It's open source, so you can have a look at the code if you want to know how this can be done. It can also be used as command line tools, e.g. as described in this blog post (skip to the "Segmenting" section): MP4Box -dash 4000

MPEG4 quality saved in MATLAB

喜欢而已 提交于 2019-12-02 10:06:50
I need to get an mpeg4 file to use in another application, from an original mpeg4 video I loaded into matlab and edited (frame by frame). To do so, I tried using VideoWriter, setting the quality to 100%: newVid = VideoWriter(outputfilename, 'MPEG-4'); newVid.FrameRate = fps; newVid.Quality = 100; However, the result I'm getting is very poor and if the original unedited video size was ~50MB, the one I get post-edit in matlab is around ~20MB, and I don't know how to keep the quality and size as they were. I also tried saving as .avi and converting to mpeg4 with ffmpeg, but it gave even poorer

Split fragmented MP4 into multiple MP4 files

一世执手 提交于 2019-12-02 08:07:01
We're trying to parse the fragments of an fMP4 file into separate independent MP4s. Can anyone help point us in the right direction to do this, or is there any open source code that exists that we could leverage? I think MP4Box might be what you are looking for. It's open source, so you can have a look at the code if you want to know how this can be done. It can also be used as command line tools, e.g. as described in this blog post (skip to the "Segmenting" section): MP4Box -dash 4000 -rap -segment-name segment_ myInput.mp4 Use either the -segment-name or the -profile option to generate one

MPEG-4 and alpha transparency - the ongoing saga

痴心易碎 提交于 2019-12-01 03:16:21
问题 I'd like to reach some sort of definitive answer for the following questions: Is alpha transparency supported in MPEG-4-based codecs? Is there any way to be reasonably certain that there is no alpha-channel from the output of ffprobe ? Some links I've found on the subject: https://stackoverflow.com/a/5057631/476716 Also, transparent alpha layers, an optional part of the H.264 specification, are now supported in H.264-based QuickTime movies. http://software.intel.com/en-us/articles/alpha

Using a DirectShow filter without registering it, via a private CoCreateInstance

我是研究僧i 提交于 2019-11-30 15:37:39
问题 So basiclly I read this, http://www.gdcl.co.uk/2011/June/UnregisteredFilters.htm. Which tells you how to use filters without registering them. There are two methods, new and using a private CoCreateInstance. Im trying to use the CoCreateInstance method. In the sample from the site the code is listed as, IUnknownPtr pUnk; HRESULT hr = CreateObjectFromPath(TEXT("c:\\path\\to\\myfilter.dll"), IID_MyFilter, &pUnk); if (SUCCEEDED(hr)) { IBaseFilterPtr pFilter = pUnk; pGraph->AddFilter(pFilter, L

Using a DirectShow filter without registering it, via a private CoCreateInstance

安稳与你 提交于 2019-11-30 14:59:26
So basiclly I read this, http://www.gdcl.co.uk/2011/June/UnregisteredFilters.htm . Which tells you how to use filters without registering them. There are two methods, new and using a private CoCreateInstance. Im trying to use the CoCreateInstance method. In the sample from the site the code is listed as, IUnknownPtr pUnk; HRESULT hr = CreateObjectFromPath(TEXT("c:\\path\\to\\myfilter.dll"), IID_MyFilter, &pUnk); if (SUCCEEDED(hr)) { IBaseFilterPtr pFilter = pUnk; pGraph->AddFilter(pFilter, L"Private Filter"); pGraph->RenderFile(pMediaClip, NULL); } My code as follows, IUnknownPtr pUnk; HRESULT