transport-stream

Get TS packets into buffer from libavformat

北城以北 提交于 2020-01-06 05:49:05
问题 I would like to capture video, compress it and mux it as an mpeg2 ts. All of this is quite simple with the ffmpeg libraries, but what I would like to do, instead of writing it to a file, is capture the ts packets in a buffer and using this stream in other ways. Is there a simple way to do this? To write the encoded frames to file right now, I use av_interleaved_write_frame(oc, &pkt). OC is an output context with a filename and format defined. pkt is an AVPacket containing the compressed frame

Subtitles for AVPlayer/MPMoviePlayerController

三世轮回 提交于 2019-12-29 02:52:47
问题 I am using m3u8 video format for streaming the video and now I need to display subtitles for the same. I searched in Apple Documentation and found that I can achieve this by using the closedCaptionDisplayEnabled property of AVPlayer . I am interested to know what should be the format of subtitles? Will the .srt format do? Also can I achieve the same using MPMoviePlayerController ? Any help is appreciated. 回答1: Update 10/30/2018: It's worth checking this answer by an Apple engineer (Thanks to

How to convert captured video stream with two slice packet to transport stream with one slice packet using ffmpeg?

只谈情不闲聊 提交于 2019-12-25 01:22:29
问题 I have captured video frame from multi media device. Captured stream has two slice packets. For testing a use case I need to convert it to transport stream with one slice packet. Any suggestions/pointers? 回答1: One slice is default on all h264 encoders I know of. Use ‘ffmpeg -i file.ts our -codec libx264 outfile.ts’ 来源: https://stackoverflow.com/questions/58106400/how-to-convert-captured-video-stream-with-two-slice-packet-to-transport-stream-w

How to generate timestamps from PCR in Hex

不想你离开。 提交于 2019-12-24 19:50:13
问题 When inspecting a transport stream using tsduck, I can see that some packets contains a PCR value in Hex. I am not sure how to convert these into timestamps. For example, in the packet below the PCR value is 0x000002014CE * Packet 179 ---- TS Header ---- PID: 481 (0x01E1), header size: 25, sync: 0x47 Error: 0, unit start: 1, priority: 0 Scrambling: 0, continuity counter: 4 Adaptation field: yes (21 bytes), payload: yes (163 bytes) Discontinuity: 0, random access: 0, ES priority: 0 PCR:

Multiplex a HEVC-Video into a MPEG-Transportstream with FFMPEG

别说谁变了你拦得住时间么 提交于 2019-12-13 07:15:24
问题 I would like to multiplex a HEVC coded video into a MPEG-Transportstream. I have a Video coded with the x265 Encoder. x265 raw.y4m --output coded.hevc I want to multiplex this Video into an MPEG Transportstream. I tried it among other things this way: ffmpeg -fflags +genpts -i coded.hevc -c:v copy -f mpegts transportstream.ts Unfortunately this error message shows up and the transportstream.ts is empty. [mpegts @ 0x1fa76a0] Timestamps are unset in a packet for stream 0. This is deprecated and

HTTP Live Streaming MPEG TS segment

烂漫一生 提交于 2019-12-10 17:15:42
问题 I'm using FFMPEG and a free segmenter (Carson Mcdonald's) to produce my ts segments which i later save to a web server and play with Quicktime by playing the .m3u8 If I have segments 1,2,3,4 and another stream with segments 1,2,3,4 and would like to interleave them what should I do. If i do as follows: 1,2, other stream's 3, 4 It works fine. However, If i want to do as follows: 1,2, other stream's 4, 4 it doesn't work. In other words the segment to be added must have the same number as the

Using OpenSSL to decrypt a .ts file

99封情书 提交于 2019-12-09 23:08:22
问题 Everything is in the same directory. M3u8 File : #EXTM3U #EXT-X-ALLOW-CACHE:NO #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-KEY:METHOD=AES-128,URI=MyKeyFile.key #EXTINF:10, aes_ts_files/filesequence0000000.ts #EXTINF:10, aes_ts_files/filesequence0000001.ts #EXTINF:10, aes_ts_files/filesequence0000002.ts #EXTINF:10, aes_ts_files/filesequence0000003.ts #EXTINF:10, aes_ts_files/filesequence0000004.ts #EXTINF:10, aes_ts_files/filesequence0000005.ts #EXTINF:10, aes_ts_files

transport stream - extracting information

半腔热情 提交于 2019-12-08 07:56:44
问题 I have entire mux with four channels dumped in a single *.ts file. I'm demultiplexing that and I can't find any info on how to extract the resolution, framerate, codec, language, channels, etc... Should I read macroblocks, or do something else? Thnx. 回答1: Here is the listing of where to look for the information: Number of programs, their description etc. : PAT and PMT. The number of Audio and languages and additional information : SDT, BAT etc. Codec - refer to PES header - stream_id and look

Mux a regular file into Mpeg TS

爷,独闯天下 提交于 2019-12-08 03:29:31
问题 im working in a file broadcasting method using mpeg2-ts and ISDB-T ( Integrated Services Digital Broadcasting - Terrestial), My problem is that im not being able to to put a file into the data stream, or as rawvideo, or anithing inside the mpeg-ts.... im using ffmpeg and avconv. Here is an example of a test: ffmpeg -f mpegts -i Myfile.tgz -probesize FILESIZE -mpegts_original_network_id 0x1 -mpegts_transport_stream_id 0x1 -mpegts_service_id 0x25 -mpegts_pmt_start_pid 0xbb9 -mpegts_start_pid

FFmpeg - Extracting video and audio from transport stream file (.ts)

久未见 提交于 2019-12-03 16:19:15
问题 I wish to extract the audio and video of a certain program in a transport stream file (.ts) by specifying its PID without losing quality and using the same codec in the resulting file (the output file is a MPEG). Is that even possible with FFmpeg? If so, how can I do it? So far, I've come to this command: ffmpeg -i tsfile.ts -vcodec copy -acodec copy -q:v 1 output.mpg Edit : Note that the file output.mpg is created. The file contains the video but the audio isn't attached (no sound). Also, I