Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg - alternative to AVCodecContext::refcounted_frames ?
18 mars 2014, par AsikWe are using an outdated version of AVCodec which does not contain the ref-counted frames feature implemented via
AVCodecContext::refcounted_frames
. Basically, we want to prevent AVCodec from re-using a buffer until we are done with it, which could be at any arbitrary point in the future (and not necessarily before the nextavcodec_decode_frame2
).Using a different
AVFrame
on each call to decode doesn't do the trick, because AVCodec uses the same buffers internally anyway (differentAVFrames
may point to the same data).Is there a way to do this without using the new features introduced with
AVCodecContext::refcounted_frames
? -
avconv much longer than ffmpeg
18 mars 2014, par fsulserI was using ffmpeg to generate some images from a video. Now I read that I shouldn't use ffmpeg longer and use avconv from libav instead. So I tried to do the same thing with avconv.
The ffmpeg is looking like this:
ffmpeg -ss 1000 -t 5 -i 'test.mp4' -s '120*90' -r 10 out%2d.bmp
Same with avconv:
avconv -ss 1000 -t 5 -i 'test.mp4' -s '120*90' -r 10 out%2d.bmp
ffmpeg needs less than one second to finish. Avconv about 90 seconds for the same task. Is this usual or do I need to change some things to work with avconv?
-
Repeat/loop the video till audio file using ffmpeg
18 mars 2014, par M. Usman AfzalI am using this command to generate the video from silent video and audio but the problem is video is 3 sec and audio is 20 sec and final video generating is 20 sec but video is for 3 sec and the last frame of that video is repeat till end.
ffmpeg -i v.mp4 -i a.m4a -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 output.mp4
I just want to repeat the whole video
-
How to use ffmpeg to mix two audio files to a single one ?
18 mars 2014, par Dead LiveI want to mix two audio files to a single one use ffmpeg. So I download the latest version of ffmpeg, and check the document and get the code:
ffmpeg -i 10001.wav -i 201.wav -filter_complex amix=inputs=2:duration=shortest output.wav
but I got this error:
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Aug 9 2012 16:22:59 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52) configuration: --prefix=/usr/ --enable-gpl --enable-libx264 --enable-libmp3lame libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 [wav @ 0x13d08100] max_analyze_duration 5000000 reached at 5120000 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from '10001.wav': Duration: 00:00:07.91, bitrate: 64 kb/s Stream #0:0: Audio: pcm_alaw ([6][0][0][0] / 0x0006), 8000 Hz, mono, s16, 64 kb/s [wav @ 0x13d08980] max_analyze_duration 5000000 reached at 5120000 Guessed Channel Layout for Input Stream #1.0 : mono Input #1, wav, from '201.wav': Duration: 00:00:11.88, bitrate: 128 kb/s Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s [abuffersink @ 0x13d268c0] No opaque field provided, an AVABufferSinkParams struct is required
Can anyone can help me? Thanks!
-
Streaming YouTube rtsp :// on iOS
18 mars 2014, par Jason SilbermanI am creating an application where I want to stream
rtsp://
files from YouTube. I have looked at a couple of frameworks (kxmovie), but I cannot find one that is able to streamrtsp://
and use theMPMoviePlayerController
. I could create a webView, but I do not want to present the user with any of the default YouTube embed interface.Does anybody know if this is possible?
Thanks!