mpeg2-ts

extract PCR time value from MPEG TS

a 夏天 提交于 2021-02-07 17:24:18
问题 I'm trying to extract the PCR time value from an MPEG-TS packet. According to wiki, the PCR contains 33+6+9 number of bits and also it states that the first 33 bits are based on a 90 kHz clock while the last 9 are based on a 27 MHz clock. I extract the bits that follows adaptation field byte, when the PCR flag is enabled. The question is, how do I calculate the PCR time stamp value with this 48 (33+6+9) bits I have, by considering the respective clock frequency values. Thanks. 回答1: PCR(i) =

Incorporate HEv2 AAC into an MPEG-TS for HLS content

我与影子孤独终老i 提交于 2021-01-28 14:20:54
问题 I try to find any info about AAC HEv2 (PS) in an MPEG Transport Stream (TS) for HLS. According to the HLS Authoring Specification for Apple Devices AAC HEv2 is a supported format. AAC HEv2 is part of MPEG-4, but I cannot understand how HEv2 could fit into a transport stream. SBR (or HEv1) can be in TS by implicit signaling. In case of MP4 we have an audio specific config. But how can I multiplex AAC Parametric Stereo into the TS? Is it available or not? I cannot find any info from the Apple

How to generate timestamps from the 33-bit PCR count

ε祈祈猫儿з 提交于 2019-12-25 03:21:40
问题 So I have been trying to wrap my head around mpeg-ts timing, and the PCR (program clock reference). I understand that this is used for video/audio synchronisation at the decoder. My basic understanding so far is that everything is driven by a 27 Mhz clock (oscillator). This clock loops at a rate of 27 Mhz, counting from 0 - 299 and keeps repeating itself. Each time this "rollover" from 299 back to 0 occurs, then a 33-bit PCR counter is incremented by 1. In effect, the 33-bit PCR counter is

Convert H.264 Annex B to MPEG-TS

柔情痞子 提交于 2019-12-22 08:19:11
问题 SO... I have RAW H.264 video data captured via RTSP in a local file and I am attempting to playback the video in a Java FX application. In order to do this, I need to use Http Live Streaming. I have successfully prototyped a Java FX architecture that can play a video via HLS with a local server using a local folder containing a .m3u8 (HLS index) file and collection of .ts (MPEG-TS) files. The last piece for me is to replace the .ts files with .264 / .h264 files and in the local server,

Manual encoding into MPEG-TS

不问归期 提交于 2019-12-21 21:14:34
问题 SO... I am trying to take a H264 Annex B byte stream video and encode it into MPEG-TS in pure Java. My goals is to create a minimal MPEG-TS, Single Program, valid stream and to not include any timing information information (PCR, PTS, DTS). I am currently at the point where my generated file can be passed to ffmpeg (ffmpeg -i myVideo.ts) and ffmpeg reports... [NULL @ 0x7f8103022600] start time is not set in estimate_timings_from_pts Input #0, mpegts, from 'video.ts': Duration: N/A, bitrate: N

Adding video codec to Android

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 11:47:37
问题 Can someone please explain the steps I need to take in order to add a new codec to Android? Also, I would like the codec to be installed as part of an application installation (or first launch) and NOT as part of a full Android OS build. The reason I want to do this is that I have an application that needs to show a video of a non supported codec (HLS or TS), but I wouldn't want to build a full blown video player - just integrate with the existing, built-in, player. Thanks, Alik. 回答1: Can

With ffmpeg, trying to change a container from Mpeg TS to MP4, fps became twice of Mpeg TS

无人久伴 提交于 2019-12-13 02:46:22
问题 I got a Mpeg TS file from a capture board to make a DEMO video clip. Here is information of the file from ffmpeg; Stream #0:0[0x51]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc Stream #0:1[0x61]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 224 kb/s However, I cannot edit it in FCP X, so I tried to change just its container TS to MP4 with ffmpeg using the below command. ffmpeg -i input.ts -vcodec

How to do webcam streaming with mpegtsmux in Gstreamer

那年仲夏 提交于 2019-12-12 10:51:42
问题 I'm new to gstreamer, and I want to stream webcam video through network with mpeg2-ts. I am able to stream video using following pipeline, but I don't know how to stream it with mpeg2-ts using mpegmux . Any help would be great! Thanks. My working pipline (without mpegmux ) : // Sender gst-launch-1.0 -ve v4l2src \ ! video/x-raw, framerate=30/1 \ ! videoconvert \ ! x264enc noise-reduction=10000 speed-preset=fast tune=zerolatency byte-stream=true threads=4 key-int-max=15 intra-refresh=true \ !

Python need help understanding bit wise and byte manipulation unexpected behaviour

只愿长相守 提交于 2019-12-11 16:29:19
问题 I'm trying to build up a packet (adaption field) I'm trying to build the PCR packet, but im a bit confused on python bitwise operators.... adapt_header_3 = (0x1f45db5e4df << (9 + 6)) # adapt_header_3 = 2149055849695 # d5 7d 51 05 7f 27 - This is what the correct result should look like print(hex(adapt_header_3)) ## << but im getting this for adapt_header_3 0xfa2edaf26f8000 So I expect: d5 7d 51 05 7f 27 (6 bytes) But i'm getting: fa 2e da f2 6f 80 00 00 (8 bytes) UPDATE: Bit more of a test im

C# Split byte[] by hexademimal value into new array of byte[]

人盡茶涼 提交于 2019-12-10 18:53:35
问题 I want to take data from an IP packet which is a byte array and split it into a collection of byte arrays that start with 0x47 i.e. mpeg-2 transport packets. For example the original byte array looks like this: 08 FF FF 47 FF FF FF 47 FF FF 47 FF 47 FF FF FF FF 47 FF FF How would you split the byte array on 0x47 and retain the deliminator 0x47 so it looks like this? In order words an array of byte arrays that start on a particular hexadecimal? [0] 08 FF FF [1] 47 FF FF FF [2] 47 FF FF [3] 47