mpeg

How to programmatically create videos?

故事扮演 提交于 2019-12-17 19:45:23
问题 Is there a freely available library to create a MPEG (or any other simple video format) out of an image sequence ? It must run on Linux too, and ideally have Python bindings. 回答1: I know there's mencoder (part of the mplayer project), and ffmpeg, which both can do this. 回答2: ffmpeg is a great (open source) program for building all kinds of video, and converting one type of video (a sequence of images in this case) into other types of video. Usually it is utilized from the command line, but

mpeg-2 library to extract video duration

﹥>﹥吖頭↗ 提交于 2019-12-17 17:23:22
问题 I have recently ventured out into dealing with audio and video related coding and i have limited knowledge about neither one of them. It happens that i have a project that is dealing with mpeg-2 video now. Is there any python library that available out there to extract the duration of the mpeg-2 video itself? 回答1: I don't know any pure python implementations. But maybe the opencv bindings works for you: import cv cvcapture = cv.CaptureFromFile("movie.mpg") cv.GetCaptureProperty(cvcapture,cv

Java: How do I create a movie from an array of images?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 05:01:33
问题 I basically have an matrix of bytes. Each row (meaning byte[]) represents an image. How do I create a movie out of that (any format - avi, mpeg, whatever), and save it as a file? Each image can be one of the following: int JPEG Encoded formats. int NV16 YCbCr format, used for video. int NV21 YCrCb format used for images, which uses the NV21 encoding format. int RGB_565 RGB format used for pictures encoded as RGB_565. int YUY2 YCbCr format used for images, which uses YUYV (YUY2) encoding

How can I reverse engineer a DirectShow graph?

£可爱£侵袭症+ 提交于 2019-12-17 04:09:53
问题 I have a DirectShow graph to render MPEG2/4 movies from a network stream. When I assemble the graph by connecting the pins manually it doesn't render. But when I call Render on the GraphBuilder it renders fine. Obviously there is some setup step that I'm not performing on some filter in the graph that GraphBuilder is performing. Is there any way to see debug output from GraphBuilder when it assembles a graph? Is there a way to dump a working graph to see how it was put together? Any other

How can I reverse engineer a DirectShow graph?

人盡茶涼 提交于 2019-12-17 04:08:05
问题 I have a DirectShow graph to render MPEG2/4 movies from a network stream. When I assemble the graph by connecting the pins manually it doesn't render. But when I call Render on the GraphBuilder it renders fine. Obviously there is some setup step that I'm not performing on some filter in the graph that GraphBuilder is performing. Is there any way to see debug output from GraphBuilder when it assembles a graph? Is there a way to dump a working graph to see how it was put together? Any other

Converting Mpeg file to flv and simultaneously playing the converted file in flash cs3 using as3

坚强是说给别人听的谎言 提交于 2019-12-13 07:16:19
问题 I have an mpg file which I want to convert to flv format, but I have a requirement that while converting the mpg file, I also have to simultaneously play the converted flv file in the flash cs3. How to do it? I am using cs3 and as3. 回答1: If you want to convert your files programmaticly then use ffmpeg. This is a commandline tool which can convert video files to nearly everything. You have to execute ffmpeg with the correct params and wait until the video is ready. This works only on

Multiplex a HEVC-Video into a MPEG-Transportstream with FFMPEG

别说谁变了你拦得住时间么 提交于 2019-12-13 07:15:24
问题 I would like to multiplex a HEVC coded video into a MPEG-Transportstream. I have a Video coded with the x265 Encoder. x265 raw.y4m --output coded.hevc I want to multiplex this Video into an MPEG Transportstream. I tried it among other things this way: ffmpeg -fflags +genpts -i coded.hevc -c:v copy -f mpegts transportstream.ts Unfortunately this error message shows up and the transportstream.ts is empty. [mpegts @ 0x1fa76a0] Timestamps are unset in a packet for stream 0. This is deprecated and

How do I extract a screenshot from a video in the iPhone SDK?

走远了吗. 提交于 2019-12-12 09:27:46
问题 I'd like to be able to take a screenshot of an MPEG recorded using the iPhone camera at set intervals. I've seen a few ways to do this; namely compiling and using FFmpeg (Using FFMPEG library with iPhone SDK for video encoding), however it seems it's quite difficult to comply with the LGPL (http://ffmpeg.org/legal.html) for commercial use. This term of the contract pretty much makes it useless to us: Q : Is it perfectly alright to incorporate the whole FFmpeg core into my own commercial

Coding a certain MP4 GOP with FFMPEG

和自甴很熟 提交于 2019-12-12 09:06:24
问题 I have a .y4m video file, and I want to convert it to .mp4 using FFmpeg. The problem is that I want a certain kind of GOP, this one: IBBPBBPBBPBB . But what I get, when I set the GOP size to 12 ( -g 12 ) is IPPPPPPPPPPP . I've also tried using the -bf 8 option, but I get results like IPBBB... and the video doesn't play right. Could you please tell me how to get the exact IBBPBBPBBPBB GOP using FFmpeg? Thanks for your help 回答1: I think you want something to the effect of : -g 12 -bf 2 sgop The

GStreamer: Play mpeg2

ⅰ亾dé卋堺 提交于 2019-12-11 17:49:32
问题 I'm trying to play a local mpeg2 TS file with gstreamer with this: gst-launch filesrc location=open_season.mpg ! mpeg2dec ! xvimagesink The first frame appears as big blocks of color and then stops. Any thoughts about what I'm doing wrong here? Does a -TS file need to be handled differently than this? Here's the log: $ gst-launch filesrc location=open_season.mpg ! mpeg2dec ! xvimagesink Setting pipeline to PAUSED ... Pipeline is PREROLLING .... WARNING: from element /GstPipeline:pipeline0