
Recherche avancée
Autres articles (77)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (15377)
-
FFMPEG : Redirecting MP4 muxed data to socket using movflags resets timestamp
1er septembre 2014, par Parth ShahI am using FFMPEG library to mux H.264 and AAC frames to MP4 file. I do that C program.
I store H.264 and AAC frame’s timestamp in epoch format.I use ffprobe to check timestamps that stored in the MP4 file, ffprobe confirms that file is in MP4 format and timestamps are stored correctly. below is the output of ffprobe.
ffprobe -show_packets 20140805095931.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20140805095931.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.29.104
Duration: 00:01:39.70, start: 1407232771.984000, bitrate: 1063 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 960x540, 999 kb/s, 30 fps, 59.94 tbr, 1k tbn, 60 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, mono, s16, 53 kb/s
[PACKET]
codec_type=video
stream_index=0
pts=1407232771984
pts_time=1407232771.984000
dts=1407232771984
dts_time=1407232771.984000
duration=34
duration_time=0.034000
size=24556.000000
pos=48
flags=K
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=1407232772018
pts_time=1407232772.018000
dts=1407232772018
dts_time=1407232772.018000
duration=33
duration_time=0.033000
size=3180.000000
pos=24604
flags=_
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=1407232772051
pts_time=1407232772.051000
dts=1407232772051
dts_time=1407232772.051000
duration=33
duration_time=0.033000
size=3209.000000
pos=27784
flags=_
[/PACKET]My goal is reading this muxed MP4 data from MP4 file and send this muxed mp4 data to the client over socket without creating any temporary file. My actual goal is to write a C program though.
I tried using protocols tcp and udp but they are not working with Mp4 format and gives error as below.
ffmpeg -i 20140805095931.mp4 -f mp4 -vcodec copy tcp ://10.99.19.163:8888
[mp4 @ 0xb1e1920] muxer does not support non seekable output
Could not write header for output file #0 (incorrect codec parameters ?) : Invalid argumentSo, I read somewhere about moov atom and tried it with following command
ffmpeg -i 20140805095931.mp4 -movflags isml+frag_keyframe -f mp4 -vcodec copy tcp ://10.99.19.163:8888
using above commandline I am able to send mp4 file to the client using tcp protocol that ffmpeg supports.
But when I apply ffprobe on the MP4 file timestamp resets to 0 , even starttime becomes 0.0000. Below is the output of ffmpeg.
ffprobe -show_packets out.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.48.100
Duration: 00:01:39.71, start: 0.000000, bitrate: 1059 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x540, 999 kb/s, 30 fps, 30 tbr, 16k tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 53 kb/s (default)
Metadata:
handler_name : SoundHandler
[PACKET]
codec_type=video
stream_index=0
pts=0
pts_time=0.000000
dts=0
dts_time=0.000000
duration=533
duration_time=0.033313
convergence_duration=N/A
convergence_duration_time=N/A
size=24556
pos=3853
flags=K
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=544
pts_time=0.034000
dts=544
dts_time=0.034000
duration=533
duration_time=0.033313
convergence_duration=N/A
convergence_duration_time=N/A
size=3180
pos=28409
flags=_
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=1072
pts_time=0.067000
dts=1072
dts_time=0.067000
duration=533
duration_time=0.033313
convergence_duration=N/A
convergence_duration_time=N/A
size=3209
pos=31589
flags=_
[/PACKET]Any help or advice ? Thank you in advance.
-
RTP and H.264 (Packetization Mode 1)... Decoding RAW Data... Help understanding the audio and STAP-A packets
12 février 2014, par LaneI am attempting to re-create a video from a Wireshark capture. I have researched extensively and the following links provided me with the most useful information...
How to convert H.264 UDP packets to playable media stream or file (defragmentation) (and the 2 sub-links)
H.264 over RTP - Identify SPS and PPS Frames...I understand from these links and RFC (RTP Payload Format for H.264 Video) that...
-
The Wireshark capture shows a client communicating with a server via RTSP/RTP by making the following calls... OPTIONS, DESCRIBE, SETUP, SETUP, then PLAY (both audio and video tracks exist)
-
The RTSP response from PLAY (that contains the Sequence and Picture Parameter Sets) contains the following (some lines excluded)...
Media Description, name and address (m) : audio 0 RTP/AVP 0
Media Attribute (a) : rtpmap:0 PCMU/8000/1
Media Attribute (a) : control:trackID=1
Media Attribute (a) : x-bufferdelay:0Media Description, name and address (m) : video 0 RTP/AVP 98
Media Attribute (a) : rtpmap:98 H264/90000
Media Attribute (a) : control:trackID=2
Media Attribute (a) : fmtp:98 packetization-mode=1 ;profile-level-id=4D0028 ;sprop-parameter-sets=J00AKI2NYCgC3YC1AQEBQAAA+kAAOpg6GAC3IAAzgC7y40MAFuQABnAF3lwWNF3A,KO48gA==Media Description, name and address (m) : metadata 0 RTP/AVP 100
Media Attribute (a) : rtpmap:100 IQ-METADATA/90000
Media Attribute (a) : control:trackID=3...the packetization-mode=1 means that only NAL Units, STAP-A and FU-A are accepted
- The streaming RTP packets (video only, DynamicRTP-Type-98) arrive in the following order...
1x
[RTP Header]
0x78 0x00 (Type is 24, meaning STAP-A)
[Remaining Payload]36x
[RTP Header]
0x7c (Type is 28, meaning FU-A) then either 0x85 (first) 0x05 (middle) or 0x45 (last)
[Remaining Payload]1x
[RTP Header]
0x18 0x00 (Type is 24, meaning STAP-A)
[Remaining Payload]8x
[RTP Header]
0x5c (Type is 28, meaning FU-A) then either 0x81 (first) 0x01 (middle) or 0x41 (last)
[Remaining Payload]...the cycle then repeats... typically there are 29 0x18/0x5c RTP packets for each 0x78/0x7c packet
- Approximately every 100 packets, there is an audio RTP packet, all have their Marker set to true and their sequence numbers ascend as expected. Sometimes there is an individual RTP audio packet and sometimes there are three, see a sample one here...
RTP 1042 PT=ITU-T G.711 PCMU, SSRC=0x238E1F29, Seq=31957, Time=1025208762, Mark
...also, the type of each audio RTP packet is different (as far as first bytes go... I see 0x4e, 0x55, 0xc5, 0xc1, 0xbc, 0x3c, 0x4d, 0x5f, 0xcc, 0xce, 0xdc, 0x3e, 0xbf, 0x43, 0xc9, and more)
- From what I gather... to re-create the video, I first need to create a file of the format
0x000001 [SPS Payload]
0x000001 [PPS Payload]
0x000001 [Complete H.264 Frame (NAL Byte, followed by all fragmented RTP payloads without the first 2 bytes)
0x000001 [Next Frame]
Etc...I made some progress where I can run "ffmpeg -i file" without it saying a bad input format or unable to find codec. But currently it complains something about MP3. My questions are as follows...
-
Should I be using the SPS and PPS payload returned by the response to the DESCRIBE RTSP call or use the data sent in the first STAP-A RTP packets (0x78 and 0x18) ?
-
How does the file format change to incorporate the audio track ?
-
Why is the audio track payload headers all over the place and how can I make sense / utilize them ?
-
Is my understanding of anything incorrect ?
Any help is GREATLY appreciated, thanks !
-
-
MP4 - Prepare header for pseudostreaming requests
3 février 2014, par davidkomerAssuming the client does not support byte-range requests and therefore will make requests like test.mp4 ?startoffset=2000
How can the server prepare an mp4 header that works for all requests... is there a bare minimum that works every time or must it be the actual original header ?
Similarly, is there a way to use ffprobe to export the original header as-is (i.e. binary format) so that it can simply be resent at the beginning of each request, by the server ?
Thanks !
EDIT : Did some digging around using AtomicParsley and looking at some pseudostreamed videos via archive.org. Seems that the "header" does need to be reconstructed for the new stream. Specifically, the moov atom and mdat data.
Putting aside mdat for now, are there any helpful libraries out there that will convert from moov to moov, or at least make it easier ? No C++ please, but C is fine