video-encoding

How to add audio to video file on iphone SDK

本秂侑毒 提交于 2019-12-17 17:25:24
问题 I have a video file and an audio file. Is it possible to merge it to one video with with sound file. I think AVMutableComposition should help me, but I still dont understand how. any advices? 回答1: Thanks Daniel. I figured it out, its easy. AVURLAsset* audioAsset = [[AVURLAsset alloc]initWithURL:audioUrl options:nil]; AVURLAsset* videoAsset = [[AVURLAsset alloc]initWithURL:videoUrl options:nil]; AVMutableComposition* mixComposition = [AVMutableComposition composition];

Encoding H.264 from camera with Android MediaCodec

霸气de小男生 提交于 2019-12-17 06:24:15
问题 I'm trying to get this to work on Android 4.1 (using an upgraded Asus Transformer tablet). Thanks to Alex's response to my previous question, I already was able to write some raw H.264 data to a file, but this file is only playable with ffplay -f h264 , and it seems like it's lost all information regarding the framerate (extremely fast playback). Also the color-space looks incorrect (atm using the camera's default on encoder's side). public class AvcEncoder { private MediaCodec mediaCodec;

Applying filter complex fails with something related to audio

柔情痞子 提交于 2019-12-13 04:43:35
问题 I finally managed to build ffmpeg as detailed in here: https://enoent.fr/blog/2014/06/20/compile-ffmpeg-for-android/ and in the end, I have a ffmpeg library which accepts command arguments. I am trying to apply a watermark image over the video so for it I am using preparing this ffmpeg command: ffmpeg -i input.avi -i logo.png -filter_complex 'overlay=10:main_h-overlay_h-10' output.avi I have first tried it on windows using ffmpeg.exe and the result was as expected. I have tried it on android

YUV Raw frames to video stream

允我心安 提交于 2019-12-13 03:59:36
问题 Im trying to stream raw YUV frames in an array generated in a C++ program to video using FFPEG. Can anyone point me to the right direction? 回答1: To stream piped YUV420 planar frames to RTMP try e.g. ffmpeg -f rawvideo -c:v rawvideo -s 1920x1080 -r 25 -pix_fmt yuv420p -i - -c:v libx264 -f flv rtmp:///live/myStream.sdp 来源: https://stackoverflow.com/questions/26085282/yuv-raw-frames-to-video-stream

Video encoding services

允我心安 提交于 2019-12-13 03:55:56
问题 I need to be able to allow users to upload a wide variety of video files in various formats then clean them up and make them kosher for delivery to a dedicated content handler. I've tried ffmpeg onsite but it has some serious flaws in regards to h.264. Then I tried flixcloud.com which has a very good interface, api, and was looking like the perfect solution except it doesn't provide the video frame rate correctly. Moving on I tried Ankoder.com and it does work, but unfortunately it's API is

audio and video file compressor [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-13 03:35:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Does anyone know a great audio and video file compressor? I currenting compressing wmv to 3gp with AVS software. when i compress the file its out 250kb and that only about 2mins and 30 sec of video. i would like to compress the sound and video smaller so that i can add more time to my video. 回答1: FFmpeg is

FFMpeg Mobile video encoding stutter

↘锁芯ラ 提交于 2019-12-12 18:34:04
问题 I have been playing around with ffmpeg and video encoding and even though my mp4's work great on desktop, they are smooth etc they are terrible on mobile devices. They stutter and load very slowly and I am trying to figure out the problem. As an example I made a page using the media element plugin: http://mediaelementjs.com/ and on it I first placed the video that comes with mediaelementjs and it worked well, it scaled to desktop and mobile and loaded quickly and played without any stutter.

Failed to instantiate mediaextractor when using setDataSource()

点点圈 提交于 2019-12-12 10:44:21
问题 I am trying to extract Track 0 (video track) of an avi file using MediaExtract and encode to h264 format using MediaCodec. Here is how i configured mediaCodec public MediaCodec configure_codec(){ Log.d("OUT","configure starts"); MediaCodec codec = MediaCodec.createEncoderByType("video/avc"); MediaFormat format = MediaFormat.createVideoFormat("video/avc", 320, 240); format.setInteger(MediaFormat.KEY_BIT_RATE, 700000); format.setInteger(MediaFormat.KEY_FRAME_RATE, 15); format.setInteger

Azure Media Services - 3gp file returns error “File type or codec not supported.”

Deadly 提交于 2019-12-12 02:32:59
问题 When attempting to upload, convert/encode and prepare a .3gp video file in Azure Media Services, we get the error File type or codec not supported. Based on this information, 3gp should be supported for import. How do I properly import 3gp and convert it to MP4? Here's what our internal logs say: The job stopped due to cancellation or an error. Job ID: nb:jid:UUID:6dc360df-de54-eb45-ae0d-bdc3d2c810fe Job Name: Encoding and Packaging for dedf426e0b5b41199e8a111f27744890 Job State: Error Error

How to encode (ffmpeg x264) with continuous seek

你说的曾经没有我的故事 提交于 2019-12-11 22:08:36
问题 I have a batch file that encodes video files from 'Source' folder to 'Target' folder. The batch file content is: for %%a in ("Source*.*") do @echo DirectShowSource("%%a") >> "batchScript.avs" && @echo MSharpen(10,120) >> "batchScript.avs" && ffmpeg -i "batchScript.avs" -n -c:v libx264 -crf 24 -c:a libmp3lame -b:a 192k "Target\%%~na.mp4" && del "batchScript.avs" pause I'm not sure why, but when I playback the encoded files in media player classic I can only jump to discrete jumps in time and