Discussion:
[MPlayer-users] MPlayer not playing HTTP video stream for one specific content from the same source
Joel Ng
2017-06-20 03:43:07 UTC
Permalink
Hello,

I am currently using MPlayer to play a video stream from a HTTP source.
This HTTP source is created on my own. It is a video capture stream from
a video game. I basically capture the video, encode it into a video,
then stream it out as HTTP via FFmpeg.

MPlayer works for most of the games I have tried, but in one specific
situation*, MPlayer is not able to display anything. It manages to
connect, but then it gets stuck here indefinitely:

"libavformat version 57.72.101 (internal)
Stream not seekable!
H264-ES file format detected"

*This specific situation is if I launch the game to the main menu, it
fails to play the video. If I skip the main menu and launch directly
into the game level, it works. If I use another game, it also works.

I have tried using ffplay, as well as outputting the video locally. They
both work fine. MPlayer also manages to play the locally output video.
It just refuses to play the HTTP stream.

The MPlayer command I am using is this:
mplayer -quiet -vo gl -nosound -benchmark http://address:port

I have tried many other commands as well, none of them worked:
mplayer http://address:port
mplayer -fps 30 -vo gl -nosound -benchmark http://address:port
mplayer -fps 30 -screenw 720 -screenh 1280 -vo gl -nosound -benchmark
http://address:port
mplayer -fps 30 -vo directx -nosound -benchmark http://address:port
mplayer -fps 30 -vo null -nosound -benchmark http://address:port

One more strange quirk is that MPlayer does succeed in playing the video
in very rare occasions. I would place the chances of succeeding at about
once every 15-20 tries.

This is extremely strange, so I am wondering if anyone has an idea why
this happens.
Reimar Döffinger
2017-06-25 16:37:09 UTC
Permalink
Post by Joel Ng
Hello,
I am currently using MPlayer to play a video stream from a HTTP source. This
HTTP source is created on my own. It is a video capture stream from a video
game. I basically capture the video, encode it into a video, then stream it
out as HTTP via FFmpeg.
MPlayer works for most of the games I have tried, but in one specific
situation*, MPlayer is not able to display anything. It manages to connect,
"libavformat version 57.72.101 (internal)
Stream not seekable!
H264-ES file format detected"
I guess the format is not actually H264-ES but only contains it.
It would help to know what the format of the stream really is,
probably its detection should be prioritized over H264-ES.
-dumpstream should also work for getting us a sample of the problematic
stream so we can check what goes on and possibly improve
the H264-ES autodetection.
It might not be reproducible by playing the dumped file directly,
but it should be when piping the problematic file via a fifo
or stdin.
Joel Ng
2017-06-27 06:42:51 UTC
Permalink
Post by Reimar Döffinger
Post by Joel Ng
Hello,
I am currently using MPlayer to play a video stream from a HTTP source. This
HTTP source is created on my own. It is a video capture stream from a video
game. I basically capture the video, encode it into a video, then stream it
out as HTTP via FFmpeg.
MPlayer works for most of the games I have tried, but in one specific
situation*, MPlayer is not able to display anything. It manages to connect,
"libavformat version 57.72.101 (internal)
Stream not seekable!
H264-ES file format detected"
I guess the format is not actually H264-ES but only contains it.
It would help to know what the format of the stream really is,
probably its detection should be prioritized over H264-ES.
-dumpstream should also work for getting us a sample of the problematic
stream so we can check what goes on and possibly improve
the H264-ES autodetection.
It might not be reproducible by playing the dumped file directly,
but it should be when piping the problematic file via a fifo
or stdin.
Hi,

I am not actually sure if the format is ES, but it is definitely H264. I
am using Nvidia Codec SDK to do the encoding. FFmpeg streams it via "...
-vcodec copy ... -f h264 http://ip:port".

Here is a dropbox link to the dumped file from -dumpstream:
https://www.dropbox.com/s/0fvukbvwrkpbk9u/stream.dump?dl=0

Playing the dumped file directly has no issue. Piping the dumped file
via stdin also has no issue.
Joel Ng
2017-06-29 08:10:00 UTC
Permalink
Post by Joel Ng
Post by Reimar Döffinger
Post by Joel Ng
Hello,
I am currently using MPlayer to play a video stream from a HTTP source. This
HTTP source is created on my own. It is a video capture stream from a video
game. I basically capture the video, encode it into a video, then stream it
out as HTTP via FFmpeg.
MPlayer works for most of the games I have tried, but in one specific
situation*, MPlayer is not able to display anything. It manages to connect,
"libavformat version 57.72.101 (internal)
Stream not seekable!
H264-ES file format detected"
I guess the format is not actually H264-ES but only contains it.
It would help to know what the format of the stream really is,
probably its detection should be prioritized over H264-ES.
-dumpstream should also work for getting us a sample of the problematic
stream so we can check what goes on and possibly improve
the H264-ES autodetection.
It might not be reproducible by playing the dumped file directly,
but it should be when piping the problematic file via a fifo
or stdin.
Hi,
I am not actually sure if the format is ES, but it is definitely H264. I
am using Nvidia Codec SDK to do the encoding. FFmpeg streams it via "...
-vcodec copy ... -f h264 http://ip:port".
https://www.dropbox.com/s/0fvukbvwrkpbk9u/stream.dump?dl=0
Playing the dumped file directly has no issue. Piping the dumped file
via stdin also has no issue.
Hi,

I have played the stream this time with "-msglevel all=9". I keep
getting the message "head_check failed" over and over.

Any idea what that is supposed to mean?
Reimar Döffinger
2017-07-03 19:16:46 UTC
Permalink
Hi,
I am not actually sure if the format is ES, but it is definitely H264. I am
using Nvidia Codec SDK to do the encoding. FFmpeg streams it via "...
-vcodec copy ... -f h264 http://ip:port".
https://www.dropbox.com/s/0fvukbvwrkpbk9u/stream.dump?dl=0
Ok, so it really is play H264-ES, that is a bit weird and won't
be very reliable.
Playing the dumped file directly has no issue. Piping the dumped file via
stdin also has no issue.
I can reproduce the (or at least some) issue piping via stdin...
I haven't checked much, but going by those tests you need to either
use a larger -cache value or explicitly specify the format it should
interpret it as: "-demuxer h264es"
Reimar Döffinger
2017-07-03 19:19:37 UTC
Permalink
Playing the dumped file directly has no issue. Piping the dumped file via
stdin also has no issue.
Just to double-check, did you actually pipe it?
Or did you do something like:
mplayer -noconsolecontrols - < stream.dump
That one doesn't behave like the streaming case, because
MPlayer actually gets full access to the file.
You need to do it the way that normally is considered
horrible style (because it needlessly can create issues):
cat stream.dump | mplayer -noconsolecontrols -
Joel Ng
2017-07-04 07:43:09 UTC
Permalink
Post by Reimar Döffinger
Ok, so it really is play H264-ES, that is a bit weird and won't
be very reliable.
I can reproduce the (or at least some) issue piping via stdin...
I haven't checked much, but going by those tests you need to either
use a larger -cache value or explicitly specify the format it should
interpret it as: "-demuxer h264es"
Hi, using either one of the options worked great!
Post by Reimar Döffinger
Just to double-check, did you actually pipe it?
mplayer -noconsolecontrols - < stream.dump
That one doesn't behave like the streaming case, because
MPlayer actually gets full access to the file.
You need to do it the way that normally is considered
cat stream.dump | mplayer -noconsolecontrols -
I used the input redirection method (<).

I went to use the "cat" command method a few minutes ago and it says the
following:

MPlayer 1.1-4.8 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.

Playing -.
Reading from stdin...
libavformat version 54.20.4 (external)
Mismatching header version 54.20.3
Cannot seek backward in linear streams!
Seek failed

Anyway, since the video can now be played, I will consider my problem
solved. If you need more info to improve the autodetection (logs, etc.),
feel free to ask.

Thanks for the help.

Loading...