Newest 'ffmpeg' Questions - Stack Overflow
Articles published on the website
-
ffmpeg gets slow after a while
19 February 2014, by user3329033I have installed ffmpeg on my win r2 server and it gives me headache with rendering videos! When i have installed ffmpeg and have started to render videos (700MB mp4 video into 3 clips of 7:00 minutes mp4 videos) it worked pretty good, an 700MB video was rendered in 3 clips in 10 minutes!
After rendering 30-40 videos in clips it started to slow down, now 1 clip takes 10-20 minutes!
I have rebooted my machine but it does not change anything, it renders a clip in 10-20 minutes instead of 3-4 minutes!
I have reinstalled OS and installed ffmpeg again and it works great, it does the rendering in 3-4 minutes but after a couple of videos it slows down again to 10-20 minutes per clip! Do you have simillar experience or any suggestions how to avoid the slowdown?
My server details are :
6GB RAM
4 Cores
500GB HDD
Windows Server 2008 R2 Standard OS -
FFMPEG stops converting
19 February 2014, by user3328745I've got Ubuntu 12.04 LTS, which runs Wowza Media Server, so I use FFmpeg as a transcoder for live streaming and JWplayer on my website. But ffmpeg always stops converting, and I have to input the command again and again. So here is the command:
nohup ffmpeg -i rtsp://log:pass@
:554/live1.sdp -ar 44100 -ab 128k -f flv -b 5000k -s 480x270 -y rtmp:// :1935/live/camera.stream & And that's what i get
ffmpeg version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers built on Feb 6 2014 20:56:59 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. [rtsp @ 0x25317a0] Estimating duration from bitrate, this may be inaccurate Seems stream 0 codec frame rate differs from container frame rate: 150.00 (150/1) -> 1000.00 (1000/1) Input #0, rtsp, from 'rtsp://log:pass@
:554/live1.sdp': Metadata: title : RTSP/RTP stream 1 from DCS-2132L comment : live1.sdp with v2.0 Duration: N/A, start: 0.000000, bitrate: N/A Stream #0.0: Video: h264 (High), yuvj420p, 640x360 [PAR 1:1 DAR 16:9], 75 fps, 1k tbr, 90k tbn, 150 tbc Stream #0.1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s Incompatible pixel format 'yuvj420p' for codec 'mpeg4', auto-selecting format 'yuv420p' [buffer @ 0x2539f80] w:640 h:360 pixfmt:yuvj420p [scale @ 0x253a940] w:640 h:360 fmt:yuvj420p -> w:480 h:270 fmt:yuv420p flags:0x4 Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt' [ac3 @ 0x2531120] channel_layout not specified [ac3 @ 0x2531120] No channel layout specified. The encoder will guess the layout, but it might be incorrect. [ac3 @ 0x2531120] invalid bit rate Output #0, avi, to 'rtmp:// :1935/live/camera.stream': Stream #0.0: Video: mpeg4, yuv420p, 480x270 [PAR 1:1 DAR 16:9], q=2-31, 1024 kb/s, 90k tbn, 1k tbc Stream #0.1: Audio: ac3, 22050 Hz, mono, flt, 1024 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height Plese, help me to correct the errors
-
ffmpeg display only video in Android
19 February 2014, by WhoamiI am Writing video player in android. So far i could able to capture the frames, with the help of av_read_frame and avcodec_decode_video2, and updating to SDL2.0. I have followed dranger tutorial02.c http://dranger.com/ffmpeg/ .
Sudo Code is :
while (1) { 1. Read packet 2. check if video frame; if not Go to Step 3. 2.1 if video frame, then update with SDL_UpdateYUVTexture, 3. Handle SDL Event 4. Clear the Renderer. 5. Present Renderer. }
I wonder, do i need to take care of synchronization of video, dts/pts calculation while i need only to display video?
This scenario works well in the samsung, but not in other mobiles.
What woud be your advice?
-
What to do if extern "C" include collides with Qt libraries?
19 February 2014, by sputnikIn my case, I'm experimenting with QtMultimedia and libffmpeg as decoder. Imported ffmpeg as extern "C", but the ffmpeg's AVPixelFormat collides with QVideoFrame's PixelFormat.
Exact error:
'AVPixelFormat' : is not a member of 'QVideoFrame'
Does anyone know a possible solution?
EDIT: Code parts.
Part 1: Qt VideoWidget Sample
Part 2: Usage of libffmpeg, based on dranger tutorial
extern "C" { #include
avcodec.h> #include avformat.h> #include swscale.h> } -
Get duration through FFMPEG 2014 gcc 4.86
19 February 2014, by M.YazdianI like to use ffmpeg in my web project to convert video files and get some information of metadata's.
So I download FFMPEG and use this codes in asp.net:
For view my code please follow this link http://forums.asp.net/t/1969247.aspx?Problem+width+FFMPEG+2014+gcc+4+86
This Codes worked currently when I use FFMPEG 2013 gcc 4.2 But when I use FFMPEG 2014 gcc 4.8.2 it's not working...!!!
In FFMPEG 2014 , I can Convert video formats but I cann't get duration and In FFMPEG 2013 gcc 4.2 I can get duration but I cann't convert video formats (I mean specialy MKV).
In the FFMPEG 2014 Standard Error I cann't find Duration to parse(HOUR , MINUTE , SECOND).
In the FFMPEG 2013 Standard Error I can find Duration to parse(HOUR , MINUTE , SECOND) but I cann't connvert video formats.
Thanks in advance