wiki:Mod-H264-Streaming-Testing-Version2

Testing the H264 Streaming Module (version 2)

back


Dependencies

For testing purposes we recommend a tool like WGET, or Curl.

Download a complete movie

Upload an MP4 video to the document root of your website and download the full file. make sure you change the URL to your own domain.

wget -O test.mp4 "http://h264-demo.code-shop.com/demo/apache/trailer2.mp4"

Specify a start time

Specify a start time:

wget -O test.mp4 "http://h264-demo.code-shop.com/demo/apache/trailer2.mp4?start=45.5"

This saves a file (test.mp4) on your local disk that will have the first 45.5 seconds removed from the original (trailer2.mp4) video. You can use your favorite player to see if worked okay.

Query parameters

parameter namevaluenotes
startstart time of video clip (in seconds)defaults to start of clip
endend time of video clip (in seconds)defaults to end of clip
clientFLASHwhen the client is specified as FLASH meta data will not be compressed and only 1 video and audio stream is returned

Note that the start and end times are always aligned to the nearest keyframe. The more keyframes you have in your video the more accurate it will be. In FFMPEG you can set the number of keyframes with the 'Set group of pictures size' (-g gop_size) option.

Virtual video clips

As you can see it is easy to create 'virtual video clips'. Let's say that you have a *very* long video that you do not want to re-encode into smaller parts, you can easily specify them using the start and end times.

So there is only one full clip stored, but parts of it can be made available, like so:

The full cliphttp://h264.code-shop.com/demo/apache/workers_world_co64_box64.mp4?start=0
The first minutehttp://h264.code-shop.com/demo/apache/workers_world_co64_box64.mp4?start=0&end=60
The last two minuteshttp://h264.code-shop.com/demo/apache/workers_world_co64_box64.mp4?start=404

Help

If you need help have a read through the forum or leave a message.

Last modified 4 years ago Last modified on 04/17/13 02:35:00