Log in

View Full Version : Saving H.264 rtp stream


OTT81
26th January 2007, 09:43
I've been trying to find solution to this problem to quite some time now. I really hope somebody here can help.

I'm receiving h264 streamed over rtp. (Video is encoded and streamed with Helix Mobile Producer, but I don't think that matters). Using the correct sdp file I can see the video just fine with VLC and QuickTime.

I want to save the streamed AV content, but have not found any tools that support saving h.264. If possible, content should be saved to file without transcoding.

Does anybody know how this can be done? All solutions or hints are very much appreciated.


Best regards,
Olli

nm
26th January 2007, 10:09
What does VLC do when you try to save the stream with it?
If that won't work, try mplayer -dumpstream.

OTT81
26th January 2007, 11:11
What does VLC do when you try to save the stream with it?
If that won't work, try mplayer -dumpstream.

VLC creates a file that is not playable. While saving it gives this warning:

main warning: trying to send non-dated packet to stream output

also, this does not look very promising:

Discussion from VLC forum:
http://forum.videolan.org/viewtopic.php?t=20463


The problem with saving H264 RTSP, is that RTP only specifies the PTS of video frames, and not the DTS (decoding timestamp). This means that this DTS needs to be reconstructed.

For mpeg4 and a few other formats, this is implemented. Unfortunately, for H264, it is EXTREMELY complicated to reconstruct this value.
It is not implemented yet, and most likely will not be for a while.


As for mplayer, I've already tried that, but maybe I should do that again. Unfortunately, mplayer documentation is terrible, so the whole testing process is pretty much trial and error.

nm
26th January 2007, 12:10
As for mplayer, I've already tried that, but maybe I should do that again. Unfortunately, mplayer documentation is terrible, so the whole testing process is pretty much trial and error.
Well, I've always found MPlayer's and MEncoder's documentation one of the best available for any video tool (almost as good as Transcode and much better than VLC). If -dumpstream with the SVN version won't give you a playable file, then there isn't much you could possibly try without hacking the code itself. Perhaps you could write a feature request to the mplayer-users mailing list, but I doubt there is much interest in implementing this for now.