Discussion:
H264 to streamable mp4
bomba
2016-04-26 11:55:45 UTC
Permalink
Hello,

I've got an incoming H264 live stream which I want to play from a webpage
with low latency. The video format has to be HTML5 compatible and I want to
avoid any transcoding. With that in mind, I've choosen mp4 as the container.

Just for the starts, I'm testing the pipeline using videotestsrc and
different encoding/containers:

theora video in ogg container:
gst-launch-1.0 -v videotestsrc is-live=true ! clockoverlay
shaded-background=true font-desc="Sans 38" ! theoraenc ! oggmux !
tcpserversink host=127.0.0.1 port=8080

shows fine in webpage:
<html>
<title>A simple HTML5 video test</title>
</html>
<body>
<video autoplay controls width=320 height=240>
<source src="http://localhost:8080" type="video/mp4">
You browser doesn't support element <code>video</code>.
</video>
</body>

notice that MIME type is set as "video/mp4" - weird but works.

then I'm finally testing H264 video in mp4 container:
gst-launch-1.0 -v videotestsrc is-live=true ! clockoverlay
shaded-background=true font-desc="Sans 38" ! x264enc ! mpegtsmux ! queue !
tcpserversink host=127.0.0.1 port=8080

It does not work. I don't know why, it flows just fine but I can't see any
video on the webpage.

Any hints?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-26 14:37:13 UTC
Permalink
Post by bomba
gst-launch-1.0 -v videotestsrc is-live=true ! clockoverlay
shaded-background=true font-desc="Sans 38" ! x264enc ! mpegtsmux ! queue !
tcpserversink host=127.0.0.1 port=8080
It does not work. I don't know why, it flows just fine but I can't see any
video on the webpage.
Just my two cents, but MPEG Transport Stream is not MP4. You should try
mp4mux with the streamable value set to true and I'm not sure about the
fragment-duration.
bomba
2016-04-26 14:55:15 UTC
Permalink
gst-launch-1.0 -v videotestsrc is-live=true ! clockoverlay
shaded-background=true font-desc="Sans 38" ! x264enc ! mp4mux
streamable=true fragment-duration=1000 ! tcpserversink host=127.0.0.1
port=8080


Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0: current-port = 8080
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps =
"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstClockOverlay:clockoverlay0.GstPad:src: caps =
"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive"
Redistribute latency...
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps =
"video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstClockOverlay:clockoverlay0.GstPad:video_sink: caps
= "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\
interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps =
"video/x-h264\,\
codec_data\=\(buffer\)01640014ffe1001967640014acd94141fb0110000003001000000303c8f142996001000568ebecb22c\,\
stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\
level\=\(string\)2\,\ profile\=\(string\)high\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\
framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstMP4Mux:mp4mux0.GstPad:video_0: caps =
"video/x-h264\,\
codec_data\=\(buffer\)01640014ffe1001967640014acd94141fb0110000003001000000303c8f142996001000568ebecb22c\,\
stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\
level\=\(string\)2\,\ profile\=\(string\)high\,\ width\=\(int\)320\,\
height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\
framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstMP4Mux:mp4mux0.GstPad:src: caps =
"video/quicktime\,\ variant\=\(string\)iso"
/GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0.GstPad:sink: caps =
"video/quicktime\,\ variant\=\(string\)iso"
/GstPipeline:pipeline0/GstMP4Mux:mp4mux0: streamable = true

No video on the webpage player.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677118.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-26 16:20:21 UTC
Permalink
Again, I have no experience with GStreamer, only with MP4 and HTML5 video
as such. If there is still no video then there are following solutions:

1) If you have Chrome, it has a nice internal tab chrome://media-internals/
which contains all the information about all of the created media
pipelines. You can open that after you have launched your player and see in
what state it is and what errors it has reported.
2) Add the event listeners to the video element for error, loadedmetadata
and canplay events (see https://www.w3.org/2010/05/video/mediaevents.html)
to get additional info.

You could also try playing the stream with ffplay or VLC and check their
error logs.
bomba
2016-04-26 16:02:27 UTC
Permalink
This is the output from VLC:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f3ef4c28780] could not find corresponding trex
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f3ef4c28780] error reading header
[00007f3ef4001db8] avformat demux error: Could not open
tcp://127.0.0.1:8080: Unknown error 1094995529

it looks like I'm passing a wrong header



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677122.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rudolfs Bundulis
2016-04-26 17:06:23 UTC
Permalink
It's not you but the muxer. So this is the point where GStreamer knowledge comes in play:) I'd suggest looking at the mp4mux parameters and trying to tweak them because for some reason the muxer is not emitting a trex atom or it emitts it in a way VLC does not understand. If you want more of my help then maybe you can paste the full VLC log so that I can see what boxes were sent.

-----Original Message-----
From: "bomba" <***@gmail.com>
Sent: ‎26/‎04/‎2016 19:36
To: "gstreamer-***@lists.freedesktop.org" <gstreamer-***@lists.freedesktop.org>
Subject: Re: H264 to streamable mp4

This is the output from VLC:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f3ef4c28780] could not find corresponding trex
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f3ef4c28780] error reading header
[00007f3ef4001db8] avformat demux error: Could not open
tcp://127.0.0.1:8080: Unknown error 1094995529

it looks like I'm passing a wrong header



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677122.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
bomba
2016-04-26 16:47:26 UTC
Permalink
Thanks Rudolf, unfortunately that is the whole VLC output.

I've been gst-inspecting like crazy but can't find anything stream-related



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677125.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rudolfs Bundulis
2016-04-26 17:28:52 UTC
Permalink
It cant be all:) VLC is quite verbose if you tell it to be. I dont know if you are running vlc from command line or with GUI. But with GUI be sure to open the Tools->Messages window before you open the stream and set the verbosity to 2 (debug) in the combo box at the bottom. Sadly i dont know what are the equivivalent command line arguments.

-----Original Message-----
From: "bomba" <***@gmail.com>
Sent: ‎26/‎04/‎2016 20:21
To: "gstreamer-***@lists.freedesktop.org" <gstreamer-***@lists.freedesktop.org>
Subject: RE: H264 to streamable mp4

Thanks Rudolf, unfortunately that is the whole VLC output.

I've been gst-inspecting like crazy but can't find anything stream-related



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677125.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
bomba
2016-04-26 17:01:17 UTC
Permalink
Thanks Rudolf, here is a bit verbose log from VLC:

core debug: adding item `tcp://127.0.0.1:8080' ( tcp://127.0.0.1:8080 )
core debug: meta ok for (null), need to fetch art
core debug: processing request item: tcp://127.0.0.1:8080, node: null, skip:
0
core debug: rebuilding array of current - root Scaletta
core debug: rebuild done - 1 items, index 0
core debug: starting playback of the new playlist item
core debug: resyncing on tcp://127.0.0.1:8080
core debug: tcp://127.0.0.1:8080 is at 0
core debug: creating new input thread
core debug: Creating an input for 'tcp://127.0.0.1:8080'
core debug: looking for meta fetcher module matching "any": 1 candidates
core debug: requesting art for tcp://127.0.0.1:8080
core debug: using timeshift granularity of 50 MiB, in path '/tmp'
core debug: `tcp://127.0.0.1:8080' gives access `tcp' demux `' path
`127.0.0.1:8080'
core debug: specified demux `any'
core debug: creating demux: access='tcp' demux='any'
location='127.0.0.1:8080' file='(null)'
core debug: looking for access_demux module matching "tcp": 20 candidates
core debug: no access_demux modules matched
core debug: creating access 'tcp' location='127.0.0.1:8080', path='(null)'
core debug: looking for access module matching "tcp": 25 candidates
core debug: looking for meta fetcher module matching "any": 1 candidates
core debug: net: connecting to 127.0.0.1 port 8080
core debug: connection succeeded (socket = 33)
core debug: using access module "tcp"
core debug: Using stream method for AStream*
core debug: starting pre-buffering
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
core debug: no meta fetcher modules matched
core debug: searching art for tcp://127.0.0.1:8080
core debug: looking for art finder module matching "any": 2 candidates
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
core debug: no meta fetcher modules matched
core debug: searching art for tcp://127.0.0.1:8080
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
qt4 debug: IM: Setting an input
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
core debug: no art finder modules matched
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
core debug: no art finder modules matched
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
core debug: using meta fetcher module "lua"
core debug: removing module "lua"
core debug: searching art for tcp://127.0.0.1:8080
core debug: looking for art finder module matching "any": 2 candidates
core debug: using meta fetcher module "lua"
core debug: removing module "lua"
core debug: searching art for tcp://127.0.0.1:8080
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
core debug: no art finder modules matched
core debug: art not found for tcp://127.0.0.1:8080
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
core debug: no art finder modules matched
core debug: art not found for tcp://127.0.0.1:8080
core debug: received first data after 1979 ms
core debug: pre-buffering done 560 bytes in 1s - 0 KiB/s
core debug: looking for stream_filter module matching "any": 9 candidates
core debug: no stream_filter modules matched
core debug: looking for stream_filter module matching "record": 9 candidates
core debug: using stream_filter module "record"
core debug: creating demux: access='tcp' demux='any'
location='127.0.0.1:8080' file='(null)'
core debug: looking for demux module matching "any": 66 candidates
mp4 warning: MP4 plugin discarded (not seekable)
ts debug: TS module discarded (lost sync)
mod debug: MOD validation failed (ext=)
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/playlist
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/playlist
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/anevia_streams.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/anevia_xml.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/appletrailers.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/bbc_co_uk.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/break.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/canalplus.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/cue.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/dailymotion.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/extreme.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/france2.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/googlevideo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/jamendo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/joox.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/katsomo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/koreus.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/lelombrik.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/liveleak.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/metacafe.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/metachannels.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/mpora.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/pinkbike.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/pluzz.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/rockbox_fm_presets.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/soundcloud.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/vimeo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/youtube.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/youtube_homepage.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/zapiks.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/playlist
avformat debug: trying url: tcp://127.0.0.1:8080
avformat debug: CPU flags: 0x0107d3db
avformat debug: detected format: mov,mp4,m4a,3gp,3g2,mj2
avformat error: Could not open tcp://127.0.0.1:8080: Unknown error
1094995529
vobsub debug: this doesn't seem to be a vobsub file
ps warning: this does not look like an MPEG PS stream, continuing anyway
core debug: using demux module "ps"
core debug: looking for meta reader module matching "any": 2 candidates
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/reader
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/reader/filename.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
core debug: no meta reader modules matched
core debug: `tcp://127.0.0.1:8080' successfully opened
ps debug: es id=0xf8 format unknown
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps debug: es id=0xf4 format unknown
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677127.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-26 18:41:47 UTC
Permalink
The verbose trace does not contain the error you showed previously. Could
it be that the tcp server in gstreamer is going on and on and thus the new
connections do not get the initial metadata (moov atom?). Or is there some
other reason why the error does not show in the second log?

One more thing that made me wonder - you are using a url with tcp://.
Shouldn't it be http? I think that the content type header in the response
would certainly help VLC determine the format. One more thing - if you
can't reproduce the error with VLC what you can do is use wget to capture
an initial fragment of the HTTP response and then there is a tool called
AtomicParsley that prints the atom tree, that is another way to see what
exactly is the structure of the response.
Post by bomba
core debug: adding item `tcp://127.0.0.1:8080' ( tcp://127.0.0.1:8080 )
core debug: meta ok for (null), need to fetch art
0
core debug: rebuilding array of current - root Scaletta
core debug: rebuild done - 1 items, index 0
core debug: starting playback of the new playlist item
core debug: resyncing on tcp://127.0.0.1:8080
core debug: tcp://127.0.0.1:8080 is at 0
core debug: creating new input thread
core debug: Creating an input for 'tcp://127.0.0.1:8080'
core debug: looking for meta fetcher module matching "any": 1 candidates
core debug: requesting art for tcp://127.0.0.1:8080
core debug: using timeshift granularity of 50 MiB, in path '/tmp'
core debug: `tcp://127.0.0.1:8080' gives access `tcp' demux `' path
`127.0.0.1:8080'
core debug: specified demux `any'
core debug: creating demux: access='tcp' demux='any'
location='127.0.0.1:8080' file='(null)'
core debug: looking for access_demux module matching "tcp": 20 candidates
core debug: no access_demux modules matched
core debug: creating access 'tcp' location='127.0.0.1:8080', path='(null)'
core debug: looking for access module matching "tcp": 25 candidates
core debug: looking for meta fetcher module matching "any": 1 candidates
core debug: net: connecting to 127.0.0.1 port 8080
core debug: connection succeeded (socket = 33)
core debug: using access module "tcp"
core debug: Using stream method for AStream*
core debug: starting pre-buffering
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
core debug: no meta fetcher modules matched
core debug: searching art for tcp://127.0.0.1:8080
core debug: looking for art finder module matching "any": 2 candidates
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
core debug: no meta fetcher modules matched
core debug: searching art for tcp://127.0.0.1:8080
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
qt4 debug: IM: Setting an input
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
core debug: no art finder modules matched
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: skipping script (unmatched scope)
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
core debug: no art finder modules matched
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/fetcher/tvrage.luac
core debug: using meta fetcher module "lua"
core debug: removing module "lua"
core debug: searching art for tcp://127.0.0.1:8080
core debug: looking for art finder module matching "any": 2 candidates
core debug: using meta fetcher module "lua"
core debug: removing module "lua"
core debug: searching art for tcp://127.0.0.1:8080
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
core debug: no art finder modules matched
core debug: art not found for tcp://127.0.0.1:8080
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
core debug: no art finder modules matched
core debug: art not found for tcp://127.0.0.1:8080
core debug: received first data after 1979 ms
core debug: pre-buffering done 560 bytes in 1s - 0 KiB/s
core debug: looking for stream_filter module matching "any": 9 candidates
core debug: no stream_filter modules matched
core debug: looking for stream_filter module matching "record": 9 candidates
core debug: using stream_filter module "record"
core debug: creating demux: access='tcp' demux='any'
location='127.0.0.1:8080' file='(null)'
core debug: looking for demux module matching "any": 66 candidates
mp4 warning: MP4 plugin discarded (not seekable)
ts debug: TS module discarded (lost sync)
mod debug: MOD validation failed (ext=)
lua debug: Trying Lua scripts in /home/bomba/.local/share/vlc/lua/playlist
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/playlist
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/anevia_streams.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/anevia_xml.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/appletrailers.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/bbc_co_uk.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/break.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/canalplus.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/cue.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/dailymotion.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/extreme.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/france2.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/googlevideo.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/jamendo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/joox.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/katsomo.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/koreus.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/lelombrik.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/liveleak.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/metacafe.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/metachannels.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/mpora.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/pinkbike.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/pluzz.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/rockbox_fm_presets.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/soundcloud.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/vimeo.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/youtube.luac
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/playlist/youtube_homepage.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/playlist/zapiks.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/playlist
avformat debug: trying url: tcp://127.0.0.1:8080
avformat debug: CPU flags: 0x0107d3db
avformat debug: detected format: mov,mp4,m4a,3gp,3g2,mj2
avformat error: Could not open tcp://127.0.0.1:8080: Unknown error
1094995529
vobsub debug: this doesn't seem to be a vobsub file
ps warning: this does not look like an MPEG PS stream, continuing anyway
core debug: using demux module "ps"
core debug: looking for meta reader module matching "any": 2 candidates
lua debug: Trying Lua scripts in
/home/bomba/.local/share/vlc/lua/meta/reader
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
lua debug: Trying Lua playlist script
/usr/lib/vlc/lua/meta/reader/filename.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
core debug: no meta reader modules matched
core debug: `tcp://127.0.0.1:8080' successfully opened
ps debug: es id=0xf8 format unknown
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps debug: es id=0xf4 format unknown
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
ps warning: found sync code
ps warning: garbage at input, trying to resync...
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677127.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 10:32:27 UTC
Permalink
I was not able to reproduce the first error. Like my last log says, VLC keeps
try to connect to the stream and catch description of the stream.

I'm thinking about dropping mp4mux / qtmux and embed the H264 video into
flv, to be played with a flash player. This is annoying, since HTML5 is
supposed to handle MP4 natively and I can stream closed files without any
problem.

*RESTREAM SOURCE (working)*
gst-launch-1.0 -v rtspsrc location=rtsp://192.168.1.121:8554/eyescream
protocols=0x00000004 latency=2000 do-timestamp=true ! rtph264depay !
rtph264pay config-interval=1 pt=96 ! multiudpsink
clients=127.0.0.1:5556,127.0.0.1:5560 sync=false

*FILE SAVER (working)*
gst-launch-1.0 -v udpsrc port=5560 do-timestamp=true ! application/x-rtp,
payload=96 ! rtpjitterbuffer ! rtph264depay ! h264parse ! splitmuxsink
location=5560-%05d.mp4 max-size-time=60000000000

*HTML5 LIVE (not working)*
gst-launch-1.0 -v udpsrc uri=udp://127.0.0.1:5556 do-timestamp=true !
application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! mp4mux
streamable=true fragment-duration=1000 ! tcpserversink host=0.0.0.0
port=8080 sync-method=2

*WEBPAGE (supposed to embed the live mp4 stream)
*<html>
<title>A simple HTML5 video test</title>
</html>
<body>
<video autoplay controls>
<source src="tcp://127.0.0.1:8080" type="video/mp4">
You browser doesn't support element <code>video</code>.
</video>
</body>

Any hints?





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677143.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 11:25:59 UTC
Permalink
Well, I have developed a custom RTSP to HTML5 video solution and I can tell
that it's not always the browser (however they also have problems) - the
client side (in this case GStreamer) can also be unabled to produce a
correct fragmented (streamable) format. And since I'm all for open source,
if you have the time and energy we could try to track down what exactly is
bad - but for that I'd need to see the contents of the mp4 stream from the
beginning or output of Atomic Parsley from these contents. Btw - I advised
to check the Chrome media-internals page. What did that say? What errors
were present?
Post by bomba
I was not able to reproduce the first error. Like my last log says, VLC keeps
try to connect to the stream and catch description of the stream.
I'm thinking about dropping mp4mux / qtmux and embed the H264 video into
flv, to be played with a flash player. This is annoying, since HTML5 is
supposed to handle MP4 natively and I can stream closed files without any
problem.
*RESTREAM SOURCE (working)*
gst-launch-1.0 -v rtspsrc location=rtsp://192.168.1.121:8554/eyescream
protocols=0x00000004 latency=2000 do-timestamp=true ! rtph264depay !
rtph264pay config-interval=1 pt=96 ! multiudpsink
clients=127.0.0.1:5556,127.0.0.1:5560 sync=false
*FILE SAVER (working)*
gst-launch-1.0 -v udpsrc port=5560 do-timestamp=true ! application/x-rtp,
payload=96 ! rtpjitterbuffer ! rtph264depay ! h264parse ! splitmuxsink
location=5560-%05d.mp4 max-size-time=60000000000
*HTML5 LIVE (not working)*
gst-launch-1.0 -v udpsrc uri=udp://127.0.0.1:5556 do-timestamp=true !
application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! mp4mux
streamable=true fragment-duration=1000 ! tcpserversink host=0.0.0.0
port=8080 sync-method=2
*WEBPAGE (supposed to embed the live mp4 stream)
*<html>
<title>A simple HTML5 video test</title>
</html>
<body>
<video autoplay controls>
<source src="tcp://127.0.0.1:8080" type="video/mp4">
You browser doesn't support element <code>video</code>.
</video>
</body>
Any hints?
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677143.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 11:06:40 UTC
Permalink
Not much (chrome://media-internals/)

error Failed loading buffered resource. Error code=-302
event WEBMEDIAPLAYER_CREATED
pipeline_state kCreated
player_id 11
render_id 207
url tcp://192.168.1.30:8080 (the IP:PORT is correct)



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677146.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 11:45:04 UTC
Permalink
Hmm, here you again are using tcp:// while your initial markup (first mail)
had http://. Can you explain? Again as I said - I do not know what
GStreamer does - if ti sends raw TCP data or actually handles HTTP
requests. But I would assume browser is expecting the second.
Post by bomba
Not much (chrome://media-internals/)
error Failed loading buffered resource. Error code=-302
event WEBMEDIAPLAYER_CREATED
pipeline_state kCreated
player_id 11
render_id 207
url tcp://192.168.1.30:8080 (the IP:PORT is correct)
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677146.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 11:28:54 UTC
Permalink
Sorry about that, the first mail carries unholy cut&paste mistakes.
it has to be tcp:// - not http:// - tested with webm and ogg muxers,
tcp://ip:port did the job in the same webpage I'm using for mp4.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677149.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
bomba
2016-04-27 11:36:53 UTC
Permalink
You are right. tcp://ip:port was terribly wrong.
Retried with http://

render_id: 84
player_id: 45
pipeline_state: kStopped
event: WEBMEDIAPLAYER_CREATED
url: http://192.168.1.30:8080/
total_bytes: -1
streaming: true
single_origin: true
passed_cors_access_check: false
range_header_supported: false
error: FFmpegDemuxer: open context failed
pipeline_error: demuxer: could not open


00:00:00 00 pipeline_state kCreated
00:00:00 00 event WEBMEDIAPLAYER_CREATED
00:00:00 00 url http://192.168.1.30:8080/
00:00:00 254 total_bytes -1
00:00:00 254 streaming true
00:00:00 254 single_origin true
00:00:00 254 passed_cors_access_check false
00:00:00 254 range_header_supported false
00:00:00 254 pipeline_state kInitDemuxer
00:00:00 255 error FFmpegDemuxer: open context failed
00:00:00 255 pipeline_state kStopping
00:00:00 255 pipeline_state kStopped
00:00:00 255 pipeline_error demuxer: could not open



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677150.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 12:16:07 UTC
Permalink
I thought so:) Ok now that we have that solved, it seems that Chrome can't
even detect the format. I'd advise trying VLC with the http:// url and
maybe also capturing a Wireshark log:

1) Chrome usually sends a Range: 0- header in the request to detect whether
the source is streamable or no - not sure how GStreamer handles this (and
if it handles HTTP requests at all)
2) If the headers are ok, then the atoms of the stream must be inspected.
Post by bomba
You are right. tcp://ip:port was terribly wrong.
Retried with http://
render_id: 84
player_id: 45
pipeline_state: kStopped
event: WEBMEDIAPLAYER_CREATED
url: http://192.168.1.30:8080/
total_bytes: -1
streaming: true
single_origin: true
passed_cors_access_check: false
range_header_supported: false
error: FFmpegDemuxer: open context failed
pipeline_error: demuxer: could not open
00:00:00 00 pipeline_state kCreated
00:00:00 00 event WEBMEDIAPLAYER_CREATED
00:00:00 00 url http://192.168.1.30:8080/
00:00:00 254 total_bytes -1
00:00:00 254 streaming true
00:00:00 254 single_origin true
00:00:00 254 passed_cors_access_check false
00:00:00 254 range_header_supported false
00:00:00 254 pipeline_state kInitDemuxer
00:00:00 255 error FFmpegDemuxer: open context failed
00:00:00 255 pipeline_state kStopping
00:00:00 255 pipeline_state kStopped
00:00:00 255 pipeline_error demuxer: could not open
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677150.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 12:04:24 UTC
Permalink
*test case 1: *
gst-launch-1.0 -v videotestsrc is-live=true ! clockoverlay
shaded-background=true font-desc="Sans 38" ! theoraenc ! oggmux !
tcpserversink host=0.0.0.0 port=8080

*VLC* - http://127.0.0.1:8080 don't work, tcp://127.0.0.1:8080 works
*HTML5* - http://127.0.0.1:8080 works, I see the stream in the webpage


*test case 2: *
gst-launch-1.0 -vvv videotestsrc is-live=true ! clockoverlay
shaded-background=true font-desc="Sans 38" ! x264enc ! mp4mux
streamable=true fragment-duration=1000 ! tcpserversink host=0.0.0.0
port=8080

*VLC* - http://127.0.0.1:8080 don't work, tcp://127.0.0.1:8080 don't work
*HTML5* - http://127.0.0.1:8080 don't work


I'm pretty sure this is a muxing problem. How do you suggest to inspect the
atoms?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677154.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 12:50:34 UTC
Permalink
Well, the easiest way would be to use wget on http://127.0.0.1:8080, save
the contents to file and use Atomic Parsley on that file (actually, you can
also try playing the file with VLC, if the file contains valid mp4 content
it should play).

Did you anything relevant in the VLC logs for the test case 2?
Post by bomba
*test case 1: *
gst-launch-1.0 -v videotestsrc is-live=true ! clockoverlay
shaded-background=true font-desc="Sans 38" ! theoraenc ! oggmux !
tcpserversink host=0.0.0.0 port=8080
*VLC* - http://127.0.0.1:8080 don't work, tcp://127.0.0.1:8080 works
*HTML5* - http://127.0.0.1:8080 works, I see the stream in the webpage
*test case 2: *
gst-launch-1.0 -vvv videotestsrc is-live=true ! clockoverlay
shaded-background=true font-desc="Sans 38" ! x264enc ! mp4mux
streamable=true fragment-duration=1000 ! tcpserversink host=0.0.0.0
port=8080
*VLC* - http://127.0.0.1:8080 don't work, tcp://127.0.0.1:8080 don't work
*HTML5* - http://127.0.0.1:8080 don't work
I'm pretty sure this is a muxing problem. How do you suggest to inspect the
atoms?
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677154.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 13:05:14 UTC
Permalink
Post by Rūdolfs Bundulis
Did you anything relevant in the VLC logs for the test case 2?
cvlc -v tcp://127.0.0.1:8080
VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
[000000000110d338] dummy interface: using the dummy interface module...
[00007f2ed4001dc8] mp4 demux warning: MP4 plugin discarded (not seekable)
Post by Rūdolfs Bundulis
use wget on http://127.0.0.1:8080, save the contents to file and use
Atomic Parsley on that file
./AtomicParsley test.mp4 -T 1
AtomicParsley error: bad mpeg4 file (ftyp atom missing or alignment error).




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677157.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 13:43:29 UTC
Permalink
Post by bomba
./AtomicParsley test.mp4 -T 1
AtomicParsley error: bad mpeg4 file (ftyp atom missing or alignment error).
Ok this is extremely weird. Can you post lets say the first 16 bytes in hex
from the file? Normally an mp4 file should begin with an ftyp atom so you
should have the FourCC ftyp in the bytes 5-8 (first 4 are size), but it
seems that the actual contents are totally different.
Post by bomba
Post by Rūdolfs Bundulis
Did you anything relevant in the VLC logs for the test case 2?
cvlc -v tcp://127.0.0.1:8080
VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
[000000000110d338] dummy interface: using the dummy interface module...
[00007f2ed4001dc8] mp4 demux warning: MP4 plugin discarded (not seekable)
Post by Rūdolfs Bundulis
use wget on http://127.0.0.1:8080, save the contents to file and use
Atomic Parsley on that file
./AtomicParsley test.mp4 -T 1
AtomicParsley error: bad mpeg4 file (ftyp atom missing or alignment error).
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677157.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 13:15:13 UTC
Permalink
Post by Rūdolfs Bundulis
Ok this is extremely weird. Can you post lets say the first 16 bytes in hex
from the file? Normally an mp4 file should begin with an ftyp atom so you
should have the FourCC ftyp in the bytes 5-8 (first 4 are size), but it
seems that the actual contents are totally different.
0000000 0000 3c01 6f6d 666f 0000 1000 666d 6468
0000020 0000 0000 0000 0f00 0000 2401 7274 6661
0000040 0000 1800 6674 6468 0000 2800 0000 0100
0000060 0000 6400 0100 c000 0000 0401 7274 6e75
0000100 0000 010a 0000 1e00 0000 4401 0000 8f18
0000120 0000 f401 0000 df18 0000 c800 0000 0f18
0000140 0000 0000 0000 1c18 0000 6400 0000 3918
0000160 0000 9001 0000 1318 0000 c800 0000 ff17
0000200 0000 0000 0000 b11b 0000 9001 0000 0f18
0000220 0000 c800 0000 2518 0000 0000 0000 7f18
0000240 0000 f401 0000 1819 0000 c800 0000 3718

keep in mind that this is a /live/ source. The muxing problem could be
originated by GStreamer not passing the required * atom when the client
connects.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677159.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 14:11:32 UTC
Permalink
Ok, this was the first really useful piece.

Yeah, it seems that the data you have is actually not the beginning - it
has a moof atom (which simply denotes a fragment), but that is useless
without an initial moov. Ok, I guess this is where GStreamer knowledge is
needed - how to make the source spit out proper content starting from the
beginning for each client. That is why I tried to stress that you connect
to a fresh pipeline - then I *assume* the very first connect could even
work, but again not sure. But yeah, it seems that all the future
connections get the data simply from the point where the pipeline is at the
moment. Maybe using files is really a better idea, but that can possibly
create latency.
Post by bomba
Post by Rūdolfs Bundulis
Ok this is extremely weird. Can you post lets say the first 16 bytes in hex
from the file? Normally an mp4 file should begin with an ftyp atom so you
should have the FourCC ftyp in the bytes 5-8 (first 4 are size), but it
seems that the actual contents are totally different.
0000000 0000 3c01 6f6d 666f 0000 1000 666d 6468
0000020 0000 0000 0000 0f00 0000 2401 7274 6661
0000040 0000 1800 6674 6468 0000 2800 0000 0100
0000060 0000 6400 0100 c000 0000 0401 7274 6e75
0000100 0000 010a 0000 1e00 0000 4401 0000 8f18
0000120 0000 f401 0000 df18 0000 c800 0000 0f18
0000140 0000 0000 0000 1c18 0000 6400 0000 3918
0000160 0000 9001 0000 1318 0000 c800 0000 ff17
0000200 0000 0000 0000 b11b 0000 9001 0000 0f18
0000220 0000 c800 0000 2518 0000 0000 0000 7f18
0000240 0000 f401 0000 1819 0000 c800 0000 3718
keep in mind that this is a /live/ source. The muxing problem could be
originated by GStreamer not passing the required * atom when the client
connects.
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677159.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 14:07:11 UTC
Permalink
I can attach to the first stream if I delay the pipeline start and refresh
the browser. No luck on the second one or if I attach the browser after
pipeline starting. The correct headers are being sent only at the beginning
of the stream. This is a muxing/sinking problem definitely.

Any suggestion, hints, trick?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677161.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 14:52:57 UTC
Permalink
Well sadly I can't help much any more:) Let's hope someone more familiar
with GStreamer will be able to advise you. I hope that it's not like such
behavior is not possible by design.
Post by bomba
I can attach to the first stream if I delay the pipeline start and refresh
the browser. No luck on the second one or if I attach the browser after
pipeline starting. The correct headers are being sent only at the beginning
of the stream. This is a muxing/sinking problem definitely.
Any suggestion, hints, trick?
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677161.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 14:39:14 UTC
Permalink
Post by Rūdolfs Bundulis
I hope that it's not like such
behavior is not possible by design.
And as Jan said, it looks like this is not possible by design.

Is it possible to embed H264 video in HLS or DASH keeping latency <= 1
second



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677167.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 15:19:17 UTC
Permalink
I guess it should be, if the file sizes are small enough but I have no
experience with HLS or DASH.

My personal view: the issue with HLS is that if you don't already receive
the data in an MPEG TS you have to mux the raw H264 into a MPEG TS which as
far as I understand is subject to patents and that is where MPEG LA kicks
in. As for DASH, i know that you can use mp4 files there but I'm not sure
about the browser support. Firefox mentions only WebM (
https://developer.mozilla.org/en-US/docs/Web/HTML/DASH_Adaptive_Streaming_for_HTML_5_Video),
but of course you have external libraries like dash.js.
Post by bomba
Post by Rūdolfs Bundulis
I hope that it's not like such
behavior is not possible by design.
And as Jan said, it looks like this is not possible by design.
Is it possible to embed H264 video in HLS or DASH keeping latency <= 1
second
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677167.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 14:19:37 UTC
Permalink
mp4 is not a streamable format in the sense of being able to be played
as it is generated. streamable=true simply puts the required indexes at
the end of the stream instead of seeking back to the start to rewrite
then when finishing up. A browser won't be able to play the stream until
it receives the final parts at EOS.
You should take a look at
https://coaxion.net/blog/2014/05/http-adaptive-streaming-with-gstreamer/
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677163.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
bomba
2016-04-27 14:24:23 UTC
Permalink
This is chrome://media-internals/ on the catched-while-starting

render_id: 280
player_id: 16
pipeline_state: kPlaying
event: PLAY
url: http://192.168.1.30:8080/
is_downloading_data: true
total_bytes: -1
streaming: true
single_origin: true
passed_cors_access_check: false
range_header_supported: false
buffer_current: 2195456
buffer_end: 2242576
buffer_start: 100776
info: FFmpegDemuxer: created video stream, config codec: h264 format: 2
profile: h264 baseline coded size: [640,480] visible rect: [0,0,640,480]
natural size: [640,480] has extra data? true encrypted? false
duration: 1.3932
found_audio_stream: false
found_video_stream: true
video_codec_name: h264
width: 640
height: 480
coded_width: 640
coded_height: 480
time_base: 1/20000
video_format: PIXEL_FORMAT_YV12
video_is_encrypted: false
max_duration: 1.3932
start_time: 0
bitrate: 1326434
video_dds: false
video_decoder: FFmpegVideoDecoder




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677164.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 15:05:55 UTC
Permalink
Seems that you are out of luck:(

As for the Chrome info - well it seems that it gets the initial metadata,
but what goes on after who knows - i know that Chrome is picky about how
the fragments should be constructed.

What is the source of the video? As a final bit of help, our software has a
free edition so if the source matches what we can handle maybe you can use
that (if using Windows is not a problem).
Post by bomba
This is chrome://media-internals/ on the catched-while-starting
render_id: 280
player_id: 16
pipeline_state: kPlaying
event: PLAY
url: http://192.168.1.30:8080/
is_downloading_data: true
total_bytes: -1
streaming: true
single_origin: true
passed_cors_access_check: false
range_header_supported: false
buffer_current: 2195456
buffer_end: 2242576
buffer_start: 100776
info: FFmpegDemuxer: created video stream, config codec: h264 format: 2
profile: h264 baseline coded size: [640,480] visible rect: [0,0,640,480]
natural size: [640,480] has extra data? true encrypted? false
duration: 1.3932
found_audio_stream: false
found_video_stream: true
video_codec_name: h264
width: 640
height: 480
coded_width: 640
coded_height: 480
time_base: 1/20000
video_format: PIXEL_FORMAT_YV12
video_is_encrypted: false
max_duration: 1.3932
start_time: 0
bitrate: 1326434
video_dds: false
video_decoder: FFmpegVideoDecoder
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677164.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 14:52:25 UTC
Permalink
Post by Rūdolfs Bundulis
As for the Chrome info - well it seems that it gets the initial metadata,
but what goes on after who knows - i know that Chrome is picky about how
the fragments should be constructed.
The first stream is actually doing really good, only problem is you have to
catch it as it starts :) this behaviour is not what I need for my web
application: a client should be able to connect anytime and start playing
the live stream from the next keyframe, keeping latency stretched to 1
second.
Post by Rūdolfs Bundulis
What is the source of the video?
It is a remote rtsp source from a chip-on-board device that streams H264
video. The rtsp stream is catched on the server and restreamed locally for
http clients and a recording service.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677169.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rūdolfs Bundulis
2016-04-27 15:30:08 UTC
Permalink
Well, ok, then at least it is clear that the whole content itself is fine,
it is the offset that matters.
Post by bomba
It is a remote rtsp source from a chip-on-board device that streams H264
video. The rtsp stream is catched on the server and restreamed locally for
http clients and a recording service.
So in general you are making some kind of NVR solution? :)
Post by bomba
Post by Rūdolfs Bundulis
As for the Chrome info - well it seems that it gets the initial metadata,
but what goes on after who knows - i know that Chrome is picky about how
the fragments should be constructed.
The first stream is actually doing really good, only problem is you have to
catch it as it starts :) this behaviour is not what I need for my web
application: a client should be able to connect anytime and start playing
the live stream from the next keyframe, keeping latency stretched to 1
second.
Post by Rūdolfs Bundulis
What is the source of the video?
It is a remote rtsp source from a chip-on-board device that streams H264
video. The rtsp stream is catched on the server and restreamed locally for
http clients and a recording service.
--
http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677169.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
bomba
2016-04-27 15:15:23 UTC
Permalink
Post by Rūdolfs Bundulis
So in general you are making some kind of NVR solution? :)
Kind of, yep. I'm trying to keep things HTML5 based - very fast and
portable.
Luck/Unluck: the camera that acquires the video at the first step natively
encodes H264 - that's the reason why I'd like to stick with MP4 and avoid
transcoding in the whole process.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677174.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Rudolfs Bundulis
2016-04-27 16:03:48 UTC
Permalink
Clear. Well since I just finished HTML5 live streaming for the NVR system our company makes I can assure you are in for a lot of fun:D Had to debug both Firefox and Chrome to make it work and even with that there are still open bugs in Chrome:)

-----Original Message-----
From: "bomba" <***@gmail.com>
Sent: ‎27/‎04/‎2016 18:49
To: "gstreamer-***@lists.freedesktop.org" <gstreamer-***@lists.freedesktop.org>
Subject: Re: H264 to streamable mp4
Post by Rūdolfs Bundulis
So in general you are making some kind of NVR solution? :)
Kind of, yep. I'm trying to keep things HTML5 based - very fast and
portable.
Luck/Unluck: the camera that acquires the video at the first step natively
encodes H264 - that's the reason why I'd like to stick with MP4 and avoid
transcoding in the whole process.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-to-streamable-mp4-tp4677114p4677174.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Loading...