Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Is it possible to play an output video file from an encoder as it's being encoded ?
14 février 2012, par lvreinyI have a video file, and I need to encode it as H264/AVC and feed to client via HTTP. What i need is that i player at client side can play back the video as it is being encoded.
AFAIK, To enable player to play as the video is downloading, "moov atom" have to be placed at the begnning of the video file. However, encoders (ex: ffmpeg) always write "moov atom" at the end of file after it completes encoding.
Is there any way encoder can put "moov atom" at beginning of encode's output? Or play video without moov atom presence?
Thank in advances
LR
-
Streaming jpegs live to iphone app
14 février 2012, par RavenIm progressing through taking the depth camera feed from my kinect and streaming it to my iphone app. I have got to stage of being able save jpegs for every frame created from the kinect depth image (30 fps) and save them to the local disk. I have than been able to convert this to mpeg with ffmpeg.
My question is now how can I view this live on my iphone? Basically I want to view it live on the iphone as you are seeing it coming from the kinect.
Should I use http live streaming and use the segmenter to use apples HttpLiveStreaming functionality? Or can I stream the raw jpeg image files up in some way as they are saved to disk and than just cycle the images on the phone as they go?
Im wondering how video conferencing is achieved on the iphone (facetime/skype etc)? because I'd prefer that it wasnt played inside the video player, just want to display live content on the screen as it happens.
Any ideas? Thanks in advance
-
Download Partial Video via HTTP (for Remote Thumbnailing)
13 février 2012, par HuntedCI have videos hosted on Amazon S3. I encode them with Zencoder and store a thumbnail for the video then using Zencoder. However, I need a way to generate thumbnails at certain points in the video (i.e. 00:00:03, 00:10:32, 01:40:18) and store them either on S3 or my server.
ffmpeg allows remote thumbnailing, however it takes a very long time (sometimes several minutes) to get a thumbnail from the middle of a file--I believe this is because it downloads the entire file up to that point to get the thumbnail.
My plan is to somehow download the header of the video file via HTTP byte-range request, guesstimate the byte range where I should be looking for the thumbnail, download about a second of video from that part of the file via HTTP byte-range request, then save the header and tiny video locally. I pull the thumbnail from that using ffmpeg and delete the temporary video.
I have no idea on how exactly this would work (I believe the H.264 MP4 files I'm working with have a dynamic length header, for another issue). Any suggestions or better ideas?
Edit: To clarify, Zencoder thumbnailing is great, but they only allow thumbnail creation in combination with transcoding. I don't want to transcode my video every time I create a new thumbnail, so I need to do this on my own without Zencoder.
-
Use opencv to encode into flv, playable by flash player
13 février 2012, par Hemang ShahI've compiled ffmpeg with libx264 using configure options given at 1.
This results in the following codecs being available in ffmpeg:
$ ffmpeg -codecs | grep "264\|flv" ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers built on Feb 10 2012 13:54:15 with gcc 4.6.1 configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab libavutil 51. 34.101 / 51. 34.101 libavcodec 53. 60.100 / 53. 60.100 libavformat 53. 31.100 / 53. 31.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 60.100 / 2. 60.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 DEVSD flv Flash Video (FLV) / Sorenson Spark / Sorenson H.263 D V D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 D V D h264_vdpau H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration) EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 EV libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB
After this, I compiled opencv. Here is partial cmake result:
-- Video I/O: -- DC1394 1.x: NO -- DC1394 2.x: NO -- FFMPEG: YES -- codec: YES -- format: YES -- util: YES -- swscale: YES -- gentoo-style: YES -- GStreamer: YES -- UniCap: NO -- PvAPI: NO -- V4L/V4L2: /1 -- Xine: NO
Now, using opencv's VideoWriter, I tried to encode into flv with the following FOURCC codes:
FLV1, X264While the FLV1 results in a video file not playable by flash player, but playabe by vlc; X264 produces no results at all.
Here is the console output for X264, resulting in a 0 byte file.Output #0, flv, to 'd.flv': Stream #0.0: Video: [0][0][0][0] / 0x0000, yuv420p, 320x240, q=2-31, 4915 kb/s, 90k tbn, 24 tbc
Do you see anything amiss or incorrect?
thanks, -
how to insert the play button in the video thumbnail ?
12 février 2012, par VijayI'm creating thumbnails from videos using ffmpeg and it's working fine.
But now I want to add a play button image at the center of the thumbnail image and store them.
I've used CSS to get that, but I want to know whether there is any method to create thumbnails with the given image at the center.