HLS one liner from /dev/videoX
Hi guys, I've received an answer on http://stackoverflow.com/a/29952909/4534 which doesn't work for me. I am simply trying to create a browser friendly stream in my LAN from my /dev/video1 device. Here is the report log: http://s.natalian.org/2015-04-30/ffmpeg-20150430-102645.log http://ix.io/icO is what I saw Here is the tarball of the output http://s.natalian.org/2015-04-30/output.tar.gz IIUC, `curl -s http://s.natalian.org/2015-04-30/output.tar.gz | tar zxvf -` and then `python -m http.server` gets everything setup on my desktop for playing back (last few seconds of?) the live recorded stream. Then accessing playlist.m3u8 on Safari "Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4" will fail to dark grey screen. Before I make a bug report, am I missing something? I've tried -hls_flags live=1 & -segment_list_flags +live to no avail. Also I've noticed a discrepancy in the docs, I think! https://www.ffmpeg.org/ffmpeg-formats.html#Options-2 says the Default value of playlist entries is 5. Yet as you can see from my tarball there is about 22 .ts files after running it for just a minute or so. Sidenote: Would be great to have the MPEG-DASH version of command. https://www.ffmpeg.org/ffmpeg-formats.html#webm_005fdash_005fmanifest is not clear to me. Does Chrome playback from the manifest or these *.chk files? https://www.ffmpeg.org/ffmpeg-formats.html#Example-3 didn't work for me. http://s.natalian.org/2015-04-30/1430361818_1362x740.png Many thanks,
Hi Kai,
Before I make a bug report, am I missing something?
Yes. You have too many links to external stuff (tarballs, logs [why not attached here?], various scenarios, various requests, and it's unclear what the problem is. Your only problem report:
CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4" will fail to dark grey screen.
has unclear wording. What dies "fail to dark grey screen" mean? Does the player show some sort of error ("fail"), or does it just display the video incorrectly (dark grey)? Does audio work? You may have overseen one important message in your logs:
No pixel format specified, yuv422p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players.
Cheers, Moritz
On 30 April 2015 at 15:38, Moritz Barsnick <barsnick@gmx.net> wrote:
Yes. You have too many links to external stuff (tarballs, logs [why not attached here?], various scenarios, various requests, and it's unclear what the problem is.
Whoa, I try to be as detailed as possible and then I get criticized for including too much stuff?! :) Email attachments suck, that's why I didn't include the tarball.
Your only problem report:
CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4" will fail to dark grey screen.
has unclear wording. What dies "fail to dark grey screen" mean? Does the player show some sort of error ("fail"), or does it just display the video incorrectly (dark grey)? Does audio work?
HLS playback fails. Nothing plays back. There is no audio, because A) there was no video B) I haven't included audio in my inputs.
You may have overseen one important message in your logs:
No pixel format specified, yuv422p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players.
I doubt IOS safari is an outdated player. Do you really want me to include the 7M of attachments? Kind regards,
On Thu, Apr 30, 2015 at 10:05 AM, Kai Hendry <hendry@webconverger.com> wrote:
On 30 April 2015 at 15:38, Moritz Barsnick <barsnick@gmx.net> wrote:
Yes. You have too many links to external stuff (tarballs, logs [why not attached here?], various scenarios, various requests, and it's unclear what the problem is.
Whoa, I try to be as detailed as possible and then I get criticized for including too much stuff?! :) Email attachments suck, that's why I didn't include the tarball.
What is missing (and the only thing that is really required) is the full command line that you used to invoke ffmpeg, and the console output that invocation of ffmpeg produced, presented as inline in the email. No attachments, no externally linked files that might go away
You may have overseen one important message in your logs:
No pixel format specified, yuv422p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players.
I doubt IOS safari is an outdated player.
You know you don't have to doubt, there is this thing called google that can answer questions like "Does IOS support h264 in 4:2:2 chrome". I'll let you know - it does not. Almost no hardware accelerated playback supports 4:2:2 chroma, certainly no iphone supports anything other than 4:2:0. See this (extensive) stackoverflow answer: http://stackoverflow.com/questions/26626689/ffmpeg-generated-videos-crashes-... 4:2:2 chroma is used mainly in high end video capture devices and formats. Cheers Tom
On Thu, Apr 30, 2015 at 10:21:07 +0100, Tom Evans wrote:
I doubt IOS safari is an outdated player. I'll let you know - it does not. Almost no hardware accelerated playback supports 4:2:2 chroma, certainly no iphone supports anything other than 4:2:0. See this (extensive) stackoverflow answer:
Even more so: When encoding for web, know your clients well! You will depend very much on using the correct codecs, profiles, and so forth. (And several of them for several targets, if you're unlucky.) Moritz
On 30 April 2015 at 17:21, Tom Evans <tevans.uk@googlemail.com> wrote:
What is missing (and the only thing that is really required) is the full command line that you used to invoke ffmpeg, and the console output that invocation of ffmpeg produced, presented as inline in the email. No attachments, no externally linked files that might go away
Wow, so you've not seen a -report like this? http://s.natalian.org/2015-04-30/ffmpeg-20150430-102645.log
No pixel format specified, yuv422p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players. I doubt IOS safari is an outdated player. You know you don't have to doubt, there is this thing called google
You may have overseen one important message in your logs: that can answer questions like "Does IOS support h264 in 4:2:2 chrome".
I have no idea what 4:2:2 is supposed to mean. But after some testing I must concede that: ffmpeg -f v4l2 -i /dev/video0 -pix_fmt yuv420p playlist.m3u8 Makes it work. Why isn't -pix_fmt yuv420p simply the default ?! This is what's needed to make HLS work in the devices that actually play it.
I'll let you know - it does not. Almost no hardware accelerated playback supports 4:2:2 chroma, certainly no iphone supports anything other than 4:2:0. See this (extensive) stackoverflow answer:
http://stackoverflow.com/questions/26626689/ffmpeg-generated-videos-crashes-... 4:2:2 chroma is used mainly in high end video capture devices and formats.
Interesting. Thanks. Though I still wish ffmpeg has sane defaults. Hours and hours later, here I am reading about Chroma subsampling.
On Thu, Apr 30, 2015 at 11:06 AM, Kai Hendry <hendry@webconverger.com> wrote:
On 30 April 2015 at 17:21, Tom Evans <tevans.uk@googlemail.com> wrote:
What is missing (and the only thing that is really required) is the full command line that you used to invoke ffmpeg, and the console output that invocation of ffmpeg produced, presented as inline in the email. No attachments, no externally linked files that might go away
Wow, so you've not seen a -report like this? http://s.natalian.org/2015-04-30/ffmpeg-20150430-102645.log
I'm not opening random links, so no. See this page for what is expected if you require support: https://www.ffmpeg.org/bugreports.html When writing your bug report, please include (uncompressed): What you were trying to accomplish (e.g., "I am trying to transcode from this format to that format...") The problem you encountered (e.g., "ffmpeg crashed, see the gdb and valgrind output below" or "The output video was all green") The exact command line you were using (e.g., "ffmpeg -i input.mov -an -vcodec foo output.avi") The full, uncut console output provided by ffmpeg -v 9 -loglevel 99 -i followed by the name of your input file (copy/pasted from the console, including the banner that indicates version and configuration options), paste ffplay output only if your problem is not reproducible with ffmpeg. Sufficient information, including any required input files, to reproduce the bug and confirm a potential fix. It is not onerous..
No pixel format specified, yuv422p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players. I doubt IOS safari is an outdated player. You know you don't have to doubt, there is this thing called google
You may have overseen one important message in your logs: that can answer questions like "Does IOS support h264 in 4:2:2 chrome".
I have no idea what 4:2:2 is supposed to mean.
But after some testing I must concede that:
ffmpeg -f v4l2 -i /dev/video0 -pix_fmt yuv420p playlist.m3u8
Makes it work. Why isn't -pix_fmt yuv420p simply the default ?! This is what's needed to make HLS work in the devices that actually play it.
You didn't specify what format you wanted to read from /dev/video0, so you got the highest chroma sampling possible. You didn't specify what sampling you wanted the output in, so ffmpeg preserved the sampling of the source, rather than resample without being told to do so. ffmpeg respects your choices, but shows the warning that you're generating something that won't play on most players.
I'll let you know - it does not. Almost no hardware accelerated playback supports 4:2:2 chroma, certainly no iphone supports anything other than 4:2:0. See this (extensive) stackoverflow answer:
http://stackoverflow.com/questions/26626689/ffmpeg-generated-videos-crashes-... 4:2:2 chroma is used mainly in high end video capture devices and formats.
Interesting. Thanks.
Though I still wish ffmpeg has sane defaults. Hours and hours later, here I am reading about Chroma subsampling.
Video encoding is hard and requires knowledge, there is no getting around that. Cheers Tom
On Thu, 30 Apr 2015 18:06:03 +0800 Kai Hendry <hendry@webconverger.com> wrote:
Wow, so you've not seen a -report like this? http://s.natalian.org/2015-04-30/ffmpeg-20150430-102645.log
The -report option creates an output using the "verbose" loglevel resulting in such a large output. It is often overly verbose for general help and most of the time is detrimental due to the extra noise. This behavior can be changed with the FFREPORT environmental variable. This example will use the "info" loglevel, which is the default loglevel, and output the log to "ffreport.log". FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output (Yes, it would be nice if the level option used the human names – patch welcome). Refer to -loglevel and -report in the ffmpeg manual for more info. Alternatively you could redirect the output to a file: ffmpeg -i input output 2>&1 | tee ffoutput.log tee is used in this example so you can see the output in your console *and* save it to a file (Bash 4+ users can use '|&' instead of '2>&1 |'). Otherwise, if just using: ffmpeg -i input output > ffoutput.log 2>&1 ...there would be no output in your console and this could cause ffmpeg to hang if it is waiting for a response from you, such as confirming a output file overwrite, and anyway you could miss warnings, errors, etc. I don't know if any of this applies to Windows users.
On Thu, Apr 30, 2015 at 17:05:27 +0800, Kai Hendry wrote:
Whoa, I try to be as detailed as possible and then I get criticized for including too much stuff?! :) Email attachments suck, that's why I didn't include the tarball.
Well, within three lines of email, you posted three links:
Here is the report log: http://s.natalian.org/2015-04-30/ffmpeg-20150430-102645.log http://ix.io/icO is what I saw Here is the tarball of the output http://s.natalian.org/2015-04-30/output.tar.gz
Which of the three is what? Am I supposed to look at them all? And yes, attaching 850739 and 4252 bytes of log would have been okay. Okay, the former is quite large, but it's obvious which very large section could have been stripped... The information was not necessarily too much, just very ... unsorted. :-) Moritz
participants (5)
-
Kai Hendry -
Kai Hendry -
Lou -
Moritz Barsnick -
Tom Evans