Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Heap corruption when create BitmapSource from RGB c++ array ?
2 octobre 2014, par TTGroupI'm using
FFMPEG
for decoding H264 stream, and then I convertYUV
toRGB
data, and createdBitmapSource
for C# from thatRGB
data.Code below:
rgbBufferLength = avpicture_get_size(PIX_FMT_BGR24, 1280, 720); uint8_t* rgbBuffer = (uint8_t *)av_malloc(rgbBufferLength); SwsContext *ConversionContext = sws_getCachedContext(NULL, 1280, 720, AV_PIX_FMT_YUV420P, 1280, 720, AV_PIX_FMT_BGR24, SWS_BILINEAR, 0, 0, 0); RGBFrame = avcodec_alloc_frame(); avpicture_fill((AVPicture *)RGBFrame, rgbBuffer, AV_PIX_FMT_BGR24, 1280, 720); sws_scale(ConversionContext, pFrame->data, pFrame->linesize, 0, pFrame->height, RGBFrame->data, RGBFrame->linesize); cli::array
^ rgbArray = gcnew cli::array (rgbBufferLength); Marshal::Copy((IntPtr)rgbBuffer, rgbArray, 0, rgbBufferLength); bitmapSource = BitmapSource::Create(1280, 720, 96, 96, PixelFormats::Bgr24, nullptr, rgbArray, RGBFrame->linesize[0]); But this code cause the
Heap Corruption
when run at lineBitmapSource::Create()
. I have searched much, but this problem was not solved.Someone can show me the error in the above code.
UPDATE:
It worked fine when I usecli::array
^ rgbArray = gcnew cli::array (rgbBufferLength + 100); instead of
cli::array
^ rgbArray = gcnew cli::array (rgbBufferLength); I guess that It was caused by padding of FFMPEG, but I'm not sure.
Many Thanks,
T&T
-
FFmpeg four audiochannels but the first two are static noise
2 octobre 2014, par sebastianI have a handful of videos with one audio stream in which includes four audio channels. I am having trouble in getting the last two channels wherein lies the actual sound. I don't want to create wave files or anything like that I just want to create a video out of it with the two channels correct channels (three and four). I was thinking about using the
-map 0:a:2
and-map 0:a:3
but it does not work quite as well as I had hoped for. Does anyone know a better way or what I am doing wrong? Any help would be appreciated.Audio ID : 2 Format : PCM Format settings, Endianness : Big Format settings, Sign : Unsigned Codec ID : lpcm Duration : 3mn 54s Bit rate mode : Constant Bit rate : 6 144 Kbps Channel(s) : 4 channels Sampling rate : 48.0 KHz Bit depth : 24 bits Stream size : 172 MiB (3%) Language : English Encoded date : UTC 2014-09-25 16:54:09 Tagged date : UTC 2014-09-25 16:55:41
-
Running ffmpeg command using shell_exec in php as a background process in windows
2 octobre 2014, par Vedant TerkarI'm trying to convert a video from
.mp4
to.flv
in php using:shell_exec("ffmpeg -i input.mp4 output.flv 1>output.txt 2>&1");
Also I am taking output of entire process in
output.txt
file to use it in creation of progress bar injavascript
(that's not the problem here).The problem is: if video(input.mp4) size is>50Mb then it takes too long to complete
shell_exec
(>30secs). which hangs the UI unnecessarily.So what i want to know is:
Is there any way to make
shell_exec
work together with rest of the script?I need only to initiate
ffmpeg.exe
viaphp
script and then php script can terminate.Once the process is initiated
javascript
will start its magic(at client side).
So I need to execute
shell_exec
async. with rest of the script. and once the process is initiated the script should inform client by simplyecho
ing. It should not wait forffmpeg.exe
to complete its working. Is it possible?I've seen several similar questions on SO, many of them describing the same problem
ex:
Run a ffmpeg process in the background
ffmpeg Progress Bar - Encoding Percentage in PHP
Can ffmpeg show a progress bar?
etc.
BUT
They all were using
linux
OS's or Usingcurl
. I'm usingwindows 8
(wamp without curl and any other add-on exceptffmpeg.exe
).So Is it possible? can experts here please help me one more time?
Thanks in advance.
-
Batch or Bulk Combining jpg with audio files ?
2 octobre 2014, par John MakerI want to combine batch jpg with audio files? example: I have a folder with 100 .jpg files & 100 .mp3 files in it. if 1st jpg file is dog.jpg then corresponding audio file is dog.mp3, 2nd file is cat.jpg then there will be a audio file in same folder naming cat.mp3
okay now coming to point. i want to Batch combine jpg with audio to produce video file like dog.mp4 , cat.mp4 etc. as i have described in the example. could anybody suggest me a better method?? can i use ffmpeg?? then what is command?
For (1 image + 1 audio file = 1 video) case i know the answer its here: ffmpeg: 1 image + 1 audio file = 1 video
I have a windows system with ffmpeg installed. thank you in advance for answer.
-
Can FFMPEG or any other project detect an audio file contains only noises ?
2 octobre 2014, par coral chenI have a batch of audio files which recording people's voice. But some of this audio files record only noises or microphone burst. I want to detect these files and jump over them while processing my program.
I'm not sure whether ffmpeg can do this. If yes, could you guys provide me a link of that method? If not, do you know if there is some other software can do this? Or do you have any solution or suggestion to this problem?
Thank you.