[FFmpeg-user] [ffplay] Trouble using concat protocol

Nicolas George george at nsup.org
Mon Jan 16 12:37:43 EET 2017

Le septidi 27 nivôse, an CCXXV, Jian Guo a écrit :
> Recently I want to use the concat protocol to play multiple online videos,
> I tried the command below:
> ffplay -safe 0 -protocol_whitelist concat,file,subfile,http,https,tcp,tls
> concat:
> http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear3/prog_index.m3u8|http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear0/prog_index.m3u8
> But it gives me an error:
> Error when loading first segment 'concat:
> http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear3/fileSequence0.ts
> '
> concat:
> http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear3/prog_index.m3u8:
> Invalid data found when processing input

This is a subtle one. Using concat:a.m3u8|b.m3u8, you concatenate the
contents of the files a.m3u8 and b.m3u8. Fortunately, m3u8 files are
simple URL lists with comments, and therefore the concatenation works.
If the files had been XML, for example, it would have failed.

The result is that ffplay sees a single m3u8 file with URL starting as
"concat:". Then it tries to read the first file in the list, i.e.
"fileSequence0.ts". Since it is a relative URL, it must be turned into
an absolute one. Normally, the base would have been
but since you concatenated the m3u8 files first, the base is considered
to be
and the name of the segment is appended to it.

Note that you did not quote the error message correctly. This is why we
request full uncut console output.


  Nicolas George

More information about the ffmpeg-user mailing list