muxer

Create mp4 files on Android using Jcodec

扶醉桌前 提交于 2020-01-11 20:00:28
问题 i have some troubles with writing mp4 files on Android using MediaRecorder and Jcodec, here is my code public class SequenceEncoder { private final static String CLASSTAG = SequenceEncoder.class.getSimpleName(); private SeekableByteChannel ch; private byte[] yuv = null; private ArrayList<ByteBuffer> spsList; private ArrayList<ByteBuffer> ppsList; private CompressedTrack outTrack; private int frameNo; private MP4Muxer muxer; ArrayList<ByteBuffer> spsListTmp = new ArrayList<ByteBuffer>();

MP4 filewriter in android 4.1+

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 16:13:54
问题 Starting from Android 4.1 (API level 16) MediaCodec APIs have been introduced. These APIs support Elementary stream Decoding & Encoding. Also MediaExtractor API will give elementary track details by analyzing Media streams. My Question is, I setup a video encoder using MediaCodec API, which gives me encoded file in .h264 format. I want to write .h264 file into a .mp4 file for playing/storing/sharing purposes. I don't find any .MP4 file-writer API for android. Is there any way to achieve it?

What is weblogic.socket.Muxer?

与世无争的帅哥 提交于 2019-12-14 03:43:26
问题 Does any of you understand what weblogic.socket.Muxer is used for in WebLogic 8.1? Often in thread dumps I see stack traces similar to this: "ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'" id=20 idx=0x68 tid=26709 prio=5 alive, in native, blocked, daemon -- Blocked trying to get lock: java/lang/String@0x2b673d373c50[fat lock] at jrockit/vm/Threads.waitForUnblockSignal()V(Native Method) at jrockit/vm/Locks.fatLockBlockOrSpin(Locks.java:1675)[optimized] at jrockit/vm/Locks.lockFat(Locks

FFMPEG - RTMP to HLS no audio output

折月煮酒 提交于 2019-12-12 02:56:24
问题 I am currently developing a dynamic HLS segmenter for our livecam application. Therefor I catch the external RTMP stream and convert it into segments with ffmpeg. The following command works: ffmpeg -i rtmp://"$serverip"/"$application"/mp4:"$stream_name".f4v -c:v libx264 -profile:v baseline -level 5.1 \ -c:a aac -strict experimental -flags +global_header -f mpegts - | ffmpeg -i - -c copy -map 0 -f segment \ -segment_list /tmp/hls/"$id"/"$stream_name".m3u8 -segment_format libmp3lame -segment

Problems of using MediaCodec.getOutputFormat() for an encoder in Android 4.1/4.2 devices

十年热恋 提交于 2019-12-11 08:25:34
问题 I'm trying to use MediaCodec to encode frames (either by camera or decoder) into a video. When processing the encoder output by dequeueOutputBuffer(), I expect to receive the return index = MediaCodec.INFO_OUTPUT_FORMAT_CHANGED, so I can call getOutputFormat() to get the encoder output format as the input of the currently used ffmpeg muxer. I have tested some pad/phone devices with Android version 4.1~4.3. All of them have at least one hardware video AVC encoder and is used in the test. On

How to demux audio and video from rtspsrc and then save to file using matroska mux?

白昼怎懂夜的黑 提交于 2019-12-10 17:27:15
问题 I have been working on an application where I use rtspsrc to gather audio and video from one network camera to another. However I can not watch the stream from the camera and thereby cant verify that the stream works as intended. To verify that the stream is correct I want to record it on a SD card and then play the file on a computer. The problem is that I want the camera to do as much of the parsing, decoding, depayloading as possible since that is the purpose of the application. I thereby

What is weblogic.socket.Muxer?

主宰稳场 提交于 2019-12-05 00:08:59
Does any of you understand what weblogic.socket.Muxer is used for in WebLogic 8.1? Often in thread dumps I see stack traces similar to this: "ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'" id=20 idx=0x68 tid=26709 prio=5 alive, in native, blocked, daemon -- Blocked trying to get lock: java/lang/String@0x2b673d373c50[fat lock] at jrockit/vm/Threads.waitForUnblockSignal()V(Native Method) at jrockit/vm/Locks.fatLockBlockOrSpin(Locks.java:1675)[optimized] at jrockit/vm/Locks.lockFat(Locks.java:1776)[optimized] at jrockit/vm/Locks.monitorEnterSecondStageHard(Locks.java:1312)[optimized] at

Create mp4 files on Android using Jcodec

ぐ巨炮叔叔 提交于 2019-12-02 21:13:13
i have some troubles with writing mp4 files on Android using MediaRecorder and Jcodec, here is my code public class SequenceEncoder { private final static String CLASSTAG = SequenceEncoder.class.getSimpleName(); private SeekableByteChannel ch; private byte[] yuv = null; private ArrayList<ByteBuffer> spsList; private ArrayList<ByteBuffer> ppsList; private CompressedTrack outTrack; private int frameNo; private MP4Muxer muxer; ArrayList<ByteBuffer> spsListTmp = new ArrayList<ByteBuffer>(); ArrayList<ByteBuffer> ppsListTmp = new ArrayList<ByteBuffer>(); // Encoder private MediaCodec mediaCodec =

How to use libavformat to concat 2 video files with same codec (re-muxing)?

霸气de小男生 提交于 2019-11-30 21:45:09
I have downloaded videos from CDN in flv format (video H264 and audio AAC) and remux to them to MP4 format. But videos are limited by length. So i've downloaded each video in several parts: started at start point, at point 1, at point 2 (by using seek parameter in url). Each point starts little earlier than ending of previous one. Using av_read_frame i scanned all parts and found that intersecting packets not only have same sizes and order but also their dts/pts shifted from each other by constant value. So to concat starting video with video started at point 1 I must do following: 1. Create

How can libavformat be used without using other libav libraries?

筅森魡賤 提交于 2019-11-30 05:50:33
I would like a simple working example of using just libavformat to mux video. There are nice examples ( doc/examples/muxing.c ) that show encoding with libavcodec, muxing with libavformat and saving the data with libavio. However, there is no example I know of that uses libavformat by itself, feeding in encoded data in a buffer and getting muxed data in a buffer. The difficulty is two-fold: one, adding a stream with avformat_new_stream(AVFormatContext *s, const AVCodec *c) requires a reference to the codec; and two, the output from muxing is passed to AVFormatContext->pb which is an