video-encoding

What does “copy” do in a ffmpeg command line?

一笑奈何 提交于 2021-02-17 20:33:07
问题 I know that it copies something but other than that what does it do (to what extend it affects the output file)? Is it a switch or option? Why does it not have a hyphen before the word itself? I see from other questions that it can copy streams without transcode but what are other possibility that I can manipulate it? I have done ffmpeg --help but I don't see any documentation about it. Is there a website I can read more about it? 回答1: copy is neither a switch nor an option. It's the value

Cannot Play Video Output of Libavcodec (ffmpeg) Encoding Example

独自空忆成欢 提交于 2021-01-29 08:40:34
问题 From FFMPEG's GitHub, I use the encode_video.c to generate a 1 second video. Here is the example in question: https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/encode_video.c I compile with: gcc -Wall -o ffencode encode_video.c -lavcodec -lavutil -lz -lm Clean compile, zero warnings. I test the program by running: ./ffencode video.mp4 libx264 Lots of stats printed out (expected based on source code) as well as ffmpeg logs, but ultimately no errors or warnings. However, then the

Multiple side-to-side video streams in one file without transcoding

纵饮孤独 提交于 2020-08-23 12:03:51
问题 I am investigating a possibility to store video streams which are coming from few sources already coded in h264 without video transcoding as the device I would like to use for this project won't be capable of transcoding combined video on the fly. What I am looking for is two or more pictures side to side (not video concatenation) packed into mp4/avi/mkv. I believe mkv container supports such kind of packaging but I've not been able to find appropriate options for ffmpeg or other tool to

Multiple side-to-side video streams in one file without transcoding

一世执手 提交于 2020-08-23 12:00:15
问题 I am investigating a possibility to store video streams which are coming from few sources already coded in h264 without video transcoding as the device I would like to use for this project won't be capable of transcoding combined video on the fly. What I am looking for is two or more pictures side to side (not video concatenation) packed into mp4/avi/mkv. I believe mkv container supports such kind of packaging but I've not been able to find appropriate options for ffmpeg or other tool to

MediaFoundation HEVC H265 encoding

霸气de小男生 提交于 2020-06-25 05:35:26
问题 I'm able to successfully encode H264 video using MediaFoundation. Now I want to export HEVC which is, according to official documentation, is supported. I am doing everything as described there but whenever I want to set input media type to the writer it ends up with an error: No suitable transform was found to encode or decode the content. Here is a short code of what i do: /* Set output media type */ IMFMediaType* pMediaTypeOut = nullptr; MFCreateMediaType(&pMediaTypeOut); pMediaTypeOut-

Why the “MediaCodec CodecException” in “queueInputBuffer” only happen on Android API 29?

此生再无相见时 提交于 2020-06-17 06:28:07
问题 Basic Info targetSdkVersion 28 Goal : The objective of the class is to resize a video before sending to my server. Problem : The app crashes only on API 29, whether with real devices or using AVD. For example, the code works fine on Pixel 2 API 28 , but not on Pixel 2 API 29 Source Code : I use mostly the sample code from bigflake.com. Error message (detailed log are atteched below): E/AndroidRuntime: FATAL EXCEPTION: Thread-20 Process: com.myapp.myapp, PID: 9189 android.media.MediaCodec

How to read MKV bytes as video?

三世轮回 提交于 2020-03-19 06:41:32
问题 I am receiving fragment of MKV video in bytes. I need to take 1st frame of it for later processing without saving video in disk. For similar problem with image I use OpenCV or PIL and everything works fine, however, I am not able to do the same with video data. Any tips how to read video from bytes to memory object that I could use for later processing with OpenCV or some other library? 回答1: As I don't have your bytes buffer, I just created an MKV video file with ffmpeg like this: ffmpeg -i

Set attributes via ICodecAPI for a H.264 IMFSinkWriter Encoder

北城以北 提交于 2020-02-02 06:12:14
问题 I am trying to tweak the attributes of the H.264 encoder created via ActivateObject() by retrieving the ICodecAPI interface to it. Although I do not get errors, my settings are not taken into account. Code runs under Windows 10. I copy the code I use to create the IMFSinkWriter and retrieve the ICodecAPI below. Error handling not shown, but no error are produced. I have read this thread which implies that tweaking the encoder used by IMFSinkWriter may not be possible, but since there's no

Set attributes via ICodecAPI for a H.264 IMFSinkWriter Encoder

和自甴很熟 提交于 2020-02-02 06:11:09
问题 I am trying to tweak the attributes of the H.264 encoder created via ActivateObject() by retrieving the ICodecAPI interface to it. Although I do not get errors, my settings are not taken into account. Code runs under Windows 10. I copy the code I use to create the IMFSinkWriter and retrieve the ICodecAPI below. Error handling not shown, but no error are produced. I have read this thread which implies that tweaking the encoder used by IMFSinkWriter may not be possible, but since there's no

Appropriate codec for real-time video compression with DirectShow

半世苍凉 提交于 2020-01-22 16:10:07
问题 Can anybody suggest a good codec for real-time video compression? Here is a list of key requirements: Must be represented as DirectShow video compression filter Royalty-free Good quality/bitrate output comparable to the DivX on relatively low resolutions (640x480 max) Fast and resources-efficient for real-time compression Compatibility with some popular format (like MPEG-4) for wide support in different video players I mentioned DivX and I think it is a very good codec, but if I understand