Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Android : FFmpeg taking high memory/cpu usage causing crash
29 janvier 2019, par dastanI compiled ffmpeg for android, enabled mediacodec and jni. its works but when I merge HD video 60fps, its crash the app. this ffmpeg cmd I am using.
[-y, -benchmark, -ss, 0.0, -t, 11.541, -i, VID_HD.mp4, -filter_complex, [0:v]setpts=PTS-STARTPTS,scale=1080.0:1920.0:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:color=#000000, -c:v, libx264, -c:a, aac, -ac, 2, -ar, 44100, -preset, ultrafast, -strict, -2, VID_HD.ts]
Sometimes I get these error for same cmds, but when I rerun, it works and sometimes these, if I rerun 3-4 times its restart the app. maybe because of memory is not cleaning. Help me here.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height VideoKit:Error: Failed to inject frame into filter network: Out of memory VideoKit:Error: Error while processing the decoded data for stream #0:0
I need help in cleaning FFmpeg also when execution finished and I call my run(FFmpeg cmds) method for next video encoding it restart the app, I am suspecting because of memory usage.
-
Getting color mismatch while converting from NV12 raw data to H264 using FFMPEG
29 janvier 2019, par Harshil MakwanaI am trying to convert NV12 raw data to H264 using hw encoder of FFMPEG.
to pass raw data to encoder I am passing AVFrame struct using below logic:
uint8_t * buf; buf = (uint8_t *)dequeue(); frame->data[0] = buf; frame->data[1] = buf + size; frame->data[2] = buf + size; frame->pts = frameCount; frameCount++;
but using this logic, I am getting, color mismatched H264 data,
Can someone tell me , How to pass buffer to AVFrame data?
Thanks in Advance, Harshil
-
How to convert video and output to BytesIO without saving ?
29 janvier 2019, par Cat MokiUsing ffmpy to convert video(or gif image) that uploaded. I want to convert the file without saving (i.e. input is a BytesIO, and output with a BytesIO). How can I do that?
-
Create 30fps time-lapse video from 30fps source with frame interpolation
29 janvier 2019, par 350DI'm trying to convert video source to time-lapse using this method:
ffmpeg -i source.mp4 -an -filter:v "setpts=PTS/360" timelapse.mp4
but I don't like this choppy and jumpy output video due dropping frames with
PTS/360
option. I've tried to usetblend=average,framestep=2,setpts=PTS/360
but it looks the same and doublicating this filter liketblend=average,framestep=2,tblend=average,framestep=2,tblend=average,framestep=2,...setpts=PTS/180
doesn't make any visible difference for me.
Is there any other options with
ffmpeg
to blend 30 frames to 1 averaged frame and compile output 30fps video using these frames? -
Hide or show overlay with sendcmd
28 janvier 2019, par Сергей СергеевCan I hide the overlay and then show it with sendcmd?