[gst-devel] some issues when trying to save content to disk during http progressive downloaded

Zhao, Halley halley.zhao at intel.com
Sat Sep 25 09:33:21 CEST 2010


However, I think it in another way, the way like most bittorrent tools does.
At the start of progressive downloaded, a dummy file is created on disk;
When there is seek operation requested from parser, souphttpsrc will write bunk of data to file with offset as well.
Then I will get the entire file after finish playback.


From: Marco Ballesio [mailto:gibrovacco at gmail.com]
Sent: Monday, September 20, 2010 1:54 PM
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] some issues when trying to save content to disk during http progressive downloaded

Hi,
2010/9/20 Zhao, Halley <halley.zhao at intel.com<mailto:halley.zhao at intel.com>>
Your suggestion may be helpful,
But I expect a solution needn’t care about demux/mux, because all these data are passed through souphttpsrc, save the data from souphttpsrc shouldn’t care about mux/demux.

As you wrote:

"it seek to the end of the mp4 file at the beginning of playback."

the seek operation is performed from the demuxer (qtdemux), which identifies essential meta-data present at the end of the file. This data will not be transferred again at the end of the playback, so *in this case* you can't consider souphttpsrc as just a mere data pipe through which you get the complete clip.

Said so, you have many ways to address this:

- You can (try and) use the "moov-recovery-file" transmuxing the file after having saved it. It will restore the missing meta-info.
- You can re-mux on-the-file the file while you're getting it from souphttpsrc. Again, it will rebuild the lost meta-infos.
- You can use only progressive-download compliant files: they will have all the meta-information stored at the beginning and no seek will be needed.

Regards




From: Marco Ballesio [mailto:gibrovacco at gmail.com<mailto:gibrovacco at gmail.com>]
Sent: Sunday, September 19, 2010 12:53 AM

To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] some issues when trying to save content to disk during http progressive downloaded

Hi,
2010/9/13 Zhao, Halley <halley.zhao at intel.com<mailto:halley.zhao at intel.com>>
Thanks Stefan.
After add a 'queue' after 'souphttpsrc' and use 'decodebin2'; I still got same result.

I think the possible solution is to enhance souphttpsrc to save content to disk after some refractor, because souphttpsrc does some seek following the command of parser.

Attached mp4.log is the log of souphttpsrc, it seek to the end of the mp4 file at the beginning of playback. Finally, tail of the original mp4 file is missing in downloaded mp4 file.

It looks like you're not re-muxing the content. Are you simply storing the raw mp4 data to a file or are you using a muxer before the filesink? What does mp4info tell about your output file?

You may try and recover the saved files with mp4mux using the option "moov-recovery-file". What happens if you transmux the files using it?

Regards

halley at halley-lucid:~/swap/streaming/mp4$ ls -l
total 5216
-rwxr--r-- 1 halley halley 1776915 2010-09-08 23:08 download.mp4
-rw-r--r-- 1 halley halley 1773281 2010-09-08 18:15 original.mp4

-----Original Message-----
From: Stefan Kost [mailto:ensonic at hora-obscura.de<mailto:ensonic at hora-obscura.de>]
Sent: 2010年9月11日 1:27
To: Discussion of the development of GStreamer
Cc: Zhao, Halley
Subject: Re: [gst-devel] some issues when trying to save content to disk during http progressive downloaded
Am 08.09.2010 04:45, schrieb Zhao, Halley:
> During playback of progressive content, I tried to save the content to disk as well.
>
> But the result is strange:
>
> Some contents are saved correctly, some contents are saved but can’t playback
> again; some contents even can’t playback during progressive downloaded.
>
>
>
> ## most ogg contents work well, the saved contents can playback again
>
> gst-launch-0.10 souphttpsrc
> location=http://10.238.37.11/share/media/video/test.ogv ! tee name=t ! decodebin
> ! ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.ogv
>
>
>
> ## some mp4 saved contents can’t playback again, the saved contents differ from
> the original one; even the following test.mp4 and test2.mp4 are different
>
> gst-launch-0.10 souphttpsrc location=http://
> 10.238.37.11/share/media/video/test.mp4<http://10.238.37.11/share/media/video/test.mp4> ! tee name=t ! decodebin !
> ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.mp4
>
> gst-launch-0.10 souphttpsrc location=http://
> 10.238.37.11/share/media/video/test.mp4<http://10.238.37.11/share/media/video/test.mp4> ! filesink
> location=/home/halley/swap/streaming/test2.mp4
>

At first use decodebin2!

If the http source is seekable, the muxer in decodebin will do pull. You could try:

gst-launch-0.10 souphttpsrc
location=http://10.238.37.11/share/media/video/test.mp4 ! queue ! tee name=t !
decodebin2 ! ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.mp4

Stefan

>
>
> ## some wmv contents even can’t playback during progressive downloaded (though
> some saved wmv contents can playback again)
>
> gst-launch-0.10 -v -v souphttpsrc location=http://
> 10.238.37.11/share/media/test.wmv<http://10.238.37.11/share/media/test.wmv> ! tee name=t ! queue ! decodebin !
> ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.wmv
>
>
>
> thanks in advance for your help.
>
>
>
>
>
> *ZHAO, Halley (Aihua)*
>
> Email: halley.zhao at intel.com<mailto:halley.zhao at intel.com> <blocked::mailto:aihua.zhao at intel.com<mailto:aihua.zhao at intel.com>>
>
> Tel: +86(21)61166476   iNet: 8821-6476
>
> SSG/OTC/Moblin 3W038 Pole: F4
>
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net<mailto:gstreamer-devel at lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net<mailto:gstreamer-devel at lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net<mailto:gstreamer-devel at lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100925/3a54cfa7/attachment.htm>


More information about the gstreamer-devel mailing list