Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
about the "application/vnd.apple.mpegURL" I'll try to mess with that a little today and see what happens The HTML stuff, I am not sure but if the doctype isn't there html/html5 is assume, but you're right, I put it there. Since html5, and I want to use the html5 video tag, the header in an html5 document is now instead of head. I am aware I don't need it, if there's nothing in it, but at some point there will be.. once I have the video working Ron On 5/10/19 10:58 AM, Ted Park wrote: Your browser does not support the video tag. The type for the “extended” m3u8 files for hls is registered as application/vnd.apple.mpegURL Usually whatever handles mime types on your http server handles that for you. personally I don’t mark mime types except maybe to make a link download instead of playing in browser. You would put video/mp4 if it was an ISO format being embedded as a prerecorded file, but the m3u8 is just a text listing of where to find all the fragments. Oh, and I forgot to mention, but the example I gave you was like the simplest thing that usually works on the major browsers. It doesn’t even meet the minimum specs for HLS, you might want to look into implementing more features (especially the ones notated “MUST”) Sort of off topic, but maybe try using an HTML authoring tool out, or at least a decent text editor that checks syntax… I don’t know if any of these other things are contributing, probably not, but still: You need to declare a document type, not sure if it got left out when you copy and pasted. i.e. You probably also meant to put , not , those are headers like you might see on the top of a page. And If you actually don’t have anything in the html header, you don’t need to have them at all, just go from html to body. Would be cool if I could have the output as a stream, that I can embed. Were you referring to the same problem when you said this? Or some other difference from real streaming protocols? Have a look at some options available with the muxer to see if any look like they might be helpful # ffmpeg -h muxer=hls | more ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
I might have made a few mistakes, :), when I threw hat together real quick. For some quick tests I did the document type didn't really matter. (I used the html more as an "entry point" I'll clean it up this weekend and give it a shot. I did notice that the ffmpeg command keeps "adding" new files, and the old ones don't really go awa (deleted) if not needed anymore.. so I would probably have to look into that. I haven't done much (I mean pretty much nothing) with streaming video, understanding what options do in ffmpeg (or gstreamer) would help (looking for a guide with examples that are useful) thanks, Ron On Fri, May 10, 2019 at 10:58 AM Ted Park wrote: > > > > > > Your browser does not support the video tag. > > > > > The type for the “extended” m3u8 files for hls is registered as > application/vnd.apple.mpegURL > Usually whatever handles mime types on your http server handles that for > you. > personally I don’t mark mime types except maybe to make a link download > instead of playing in browser. > > You would put video/mp4 if it was an ISO format being embedded as a > prerecorded file, but the m3u8 is just a text listing of where to find all > the fragments. > > Oh, and I forgot to mention, but the example I gave you was like the > simplest thing that usually works on the major browsers. It doesn’t even > meet the minimum specs for HLS, you might want to look into implementing > more features (especially the ones notated “MUST”) > > > > Sort of off topic, but maybe try using an HTML authoring tool out, or at > least a decent text editor that checks syntax… I don’t know if any of these > other things are contributing, probably not, but still: > > > > > > > > > > > > You need to declare a document type, not sure if it got left out when you > copy and pasted. i.e. > You probably also meant to put , not , those are headers > like you might see on the top of a page. > And If you actually don’t have anything in the html header, you don’t need > to have them at all, just go from html to body. > > > Would be cool if I could have the output as a stream, that I can embed. > > Were you referring to the same problem when you said this? Or some other > difference from real streaming protocols? > > Have a look at some options available with the muxer to see if any look > like they might be helpful > # ffmpeg -h muxer=hls | more > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
> > > Your browser does not support the video tag. > The type for the “extended” m3u8 files for hls is registered as application/vnd.apple.mpegURL Usually whatever handles mime types on your http server handles that for you. personally I don’t mark mime types except maybe to make a link download instead of playing in browser. You would put video/mp4 if it was an ISO format being embedded as a prerecorded file, but the m3u8 is just a text listing of where to find all the fragments. Oh, and I forgot to mention, but the example I gave you was like the simplest thing that usually works on the major browsers. It doesn’t even meet the minimum specs for HLS, you might want to look into implementing more features (especially the ones notated “MUST”) Sort of off topic, but maybe try using an HTML authoring tool out, or at least a decent text editor that checks syntax… I don’t know if any of these other things are contributing, probably not, but still: > > > > You need to declare a document type, not sure if it got left out when you copy and pasted. i.e. You probably also meant to put , not , those are headers like you might see on the top of a page. And If you actually don’t have anything in the html header, you don’t need to have them at all, just go from html to body. > Would be cool if I could have the output as a stream, that I can embed. Were you referring to the same problem when you said this? Or some other difference from real streaming protocols? Have a look at some options available with the muxer to see if any look like they might be helpful # ffmpeg -h muxer=hls | more ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
Hello Michael, I have that ffmpeg command going, it seems However I don't see anything really in the http/html page (Just a sad smiley with the text: "No video with supported format and MIME type found" this is the HTML I am using: Your browser does not support the video tag. ffmpeg is creating files like: -rw-r--r-- 1 root root 148 May 8 21:46 index.m3u8 -rw-r--r-- 1 root root 628296 May 8 21:46 segment-0.ts -rw-r--r-- 1 root root 1962532 May 8 21:35 segment-10.ts -rw-r--r-- 1 root root 2030588 May 8 21:36 segment-11.ts below is what ffmpeg throws on the terminal: tia, Ron # ffmpeg -i rtsp://192.168.x.y:554/user=admin_password=_channel=1_stream=0.sdp?real_stream -f hls -hls_playlist_type event -hls_segment_type mpegts -hls_segment_filename segment-%d.ts index.m3u8 ffmpeg version 3.4.6 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Guessed Channel Layout for Input Stream #0.1 : mono Input #0, rtsp, from 'rtsp://192.168.x.y:554/user=admin_password=_channel=1_stream=0.sdp?real_stream': Metadata: title : RTSP Session Duration: N/A, start: 0.00, bitrate: N/A Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720, 6 fps, 6 tbr, 90k tbn, 12 tbc Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (pcm_alaw (native) -> aac (native)) Press [q] to stop, [?] for help [aac @ 0x10a6e80] Too many bits 8832.00 > 6144 per frame requested, clamping to max [libx264 @ 0x108a9a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 [libx264 @ 0x108a9a0] profile High, level 3.1 [libx264 @ 0x108a9a0] 264 - core 148 r2795 aaa9aa8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=22 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 [hls @ 0x1089fa0] Opening 'segment-0.ts' for writing Output #0, hls, to 'index.m3u8': Metadata: title : RTSP Session encoder : Lavf57.83.100 Stream #0:0: Video: h264 (libx264), yuvj420p(pc), 1280x720, q=-1--1, 6 fps, 90k tbn, 6 tbc Metadata: encoder : Lavc57.107.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream #0:1: Audio: aac (LC), 8000 Hz, mono, fltp, 48 kb/s Metadata: encoder : Lavc57.107.100 aac [hls @ 0x1089fa0] Packets poorly interleaved, failed to avoid negative timestamp -18480 in stream 0. Try -max_interleave_delta 0 as a possible workaround. [hls @ 0x1089fa0] Packets poorly interleaved, failed to avoid negative timestamp -3480 in stream 0. Try -max_interle
Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
uhm... no... basically, I just want "some way" to pull a stream from a camera, and display it in a web page, basically rstsp over http... I don't really want to try anything commercial. It shouldn't be too difficult, accept, since a bit, streaming with players is disabled in most browsers. Ron On 5/3/19 5:19 PM, Michael Shaffer wrote: Have you experimented with Unreal Live Server? http://www.umediaserver.net/umediaserver/download.html On Fri, May 3, 2019 at 6:58 PM R C wrote: Hello Ted, that seems to work! thank you!! That ffmpeg command is indeed making a movie from that stream into a file, tried watching it, VLC does give me trouble, but it shows it as a movie. Would be cool if I could have the output as a stream, that I can embed. I am new to ffmpeg and gstreamer things.. and the command options don't seem to be too obvious to me thanks, Ron On 5/3/19 2:17 AM, Ted Park wrote: So my idea was tho use ffmpeg or gstreamer to embed it in html, with some sort of player. Html you’re gonna need to write yourself, but you can use the rtsp stream as an input and output HLS to embed in your html, I think this will get you what you want. Something like ffmpeg -i rtsp://192.0.2.123/stream.sdp -f hls -hls_playlist_type event -hls_segment_type mpegts -hls_segment_filename segment-%d.ts index.m3u8 Will produce a playlist file pointing to little segments of ts files that you can host with any http server. It should work, (you might need to transcode to h264 if it’s not) A html5 video element with the playlist file as the source should play in most browsers nowadays. This text displays if the video element isn’t supported. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
Have you experimented with Unreal Live Server? http://www.umediaserver.net/umediaserver/download.html On Fri, May 3, 2019 at 6:58 PM R C wrote: > Hello Ted, > > > that seems to work! thank you!! That ffmpeg command is indeed making a > movie from that stream into a file, tried watching it, VLC does give me > trouble, but it shows it as a movie. > > Would be cool if I could have the output as a stream, that I can embed. > > I am new to ffmpeg and gstreamer things.. and the command options don't > seem to be too obvious to me > > > thanks, > > > Ron > > > > On 5/3/19 2:17 AM, Ted Park wrote: > >> So my idea was tho use ffmpeg or gstreamer to embed it in html, with > some > >> sort of player. > > Html you’re gonna need to write yourself, but you can use the rtsp > stream as an input and output HLS to embed in your html, I think this will > get you what you want. > > > > Something like > > > > ffmpeg -i rtsp://192.0.2.123/stream.sdp -f hls -hls_playlist_type event > -hls_segment_type mpegts -hls_segment_filename segment-%d.ts index.m3u8 > > > > Will produce a playlist file pointing to little segments of ts files > that you can host with any http server. It should work, (you might need to > transcode to h264 if it’s not) A html5 video element with the playlist file > as the source should play in most browsers nowadays. > > > > This text displays if > the video element isn’t supported. > > ___ > > ffmpeg-user mailing list > > ffmpeg-user@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > > > To unsubscribe, visit link above, or email > > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
Hello Ted, that seems to work! thank you!! That ffmpeg command is indeed making a movie from that stream into a file, tried watching it, VLC does give me trouble, but it shows it as a movie. Would be cool if I could have the output as a stream, that I can embed. I am new to ffmpeg and gstreamer things.. and the command options don't seem to be too obvious to me thanks, Ron On 5/3/19 2:17 AM, Ted Park wrote: So my idea was tho use ffmpeg or gstreamer to embed it in html, with some sort of player. Html you’re gonna need to write yourself, but you can use the rtsp stream as an input and output HLS to embed in your html, I think this will get you what you want. Something like ffmpeg -i rtsp://192.0.2.123/stream.sdp -f hls -hls_playlist_type event -hls_segment_type mpegts -hls_segment_filename segment-%d.ts index.m3u8 Will produce a playlist file pointing to little segments of ts files that you can host with any http server. It should work, (you might need to transcode to h264 if it’s not) A html5 video element with the playlist file as the source should play in most browsers nowadays. This text displays if the video element isn’t supported. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
> So my idea was tho use ffmpeg or gstreamer to embed it in html, with some > sort of player. Html you’re gonna need to write yourself, but you can use the rtsp stream as an input and output HLS to embed in your html, I think this will get you what you want. Something like ffmpeg -i rtsp://192.0.2.123/stream.sdp -f hls -hls_playlist_type event -hls_segment_type mpegts -hls_segment_filename segment-%d.ts index.m3u8 Will produce a playlist file pointing to little segments of ts files that you can host with any http server. It should work, (you might need to transcode to h264 if it’s not) A html5 video element with the playlist file as the source should play in most browsers nowadays. This text displays if the video element isn’t supported. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
I can get pretty much anything out of it I want. It is an onvif camera, so with some C, soap, xml, I can access it, get URIs, and can do things like a reboot etc. I can get snapshots out, and streams, H.264 and mp4. I can also access it with VLC and stream different resolutions with it. So that part is not the problem. The problem is that I want some that is common, stream over HTTP, are flash etc, because as I said, rtsp (and 'related protocols' are often blocked.) So my idea was tho use ffmpeg or gstreamer to embed it in html, with some sort of player. On Thu, May 2, 2019 at 1:16 AM Ted Park wrote: > > I have a few IP cameras (onvif) that I can get stills and video out of > with > > scriprts. > What exactly can you get out of your cameras? (Format, codec, protocol, > etc.) > Is this a live stream you want to serve? > > > What I would want to do is put a stream into a web page, html document. > > I'd prefer to used "something different" than rtsp, to be used by the > > browser because rtsp seems to be blocked more and more (people watching > > baby monitors crashing networks). > I don’t understand the bit about baby monitors crashing networks, but if > you don’t want rtsp, you might consider HLS or DASH. > More details about the source would be needed to know what steps to take. > > > From what I read is that ffmpeg can be used to 'transcode' an rtsp > stream, > > to a format that directly can be used in a browser (firefox)? If so, is > > there an exam[le or write up for how to do that? > With some configuration on the http server an rtsp stream can be served as > is, but rtsp is a protocol, it doesn’t tell us anything about what is being > streamed. > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] ffmpeg for transcoding a stream into web pag
> I have a few IP cameras (onvif) that I can get stills and video out of with > scriprts. What exactly can you get out of your cameras? (Format, codec, protocol, etc.) Is this a live stream you want to serve? > What I would want to do is put a stream into a web page, html document. > I'd prefer to used "something different" than rtsp, to be used by the > browser because rtsp seems to be blocked more and more (people watching > baby monitors crashing networks). I don’t understand the bit about baby monitors crashing networks, but if you don’t want rtsp, you might consider HLS or DASH. More details about the source would be needed to know what steps to take. > From what I read is that ffmpeg can be used to 'transcode' an rtsp stream, > to a format that directly can be used in a browser (firefox)? If so, is > there an exam[le or write up for how to do that? With some configuration on the http server an rtsp stream can be served as is, but rtsp is a protocol, it doesn’t tell us anything about what is being streamed. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] ffmpeg for transcoding a stream into web pag
Hello, this probably has been asked a million times before. I have a few IP cameras (onvif) that I can get stills and video out of with scriprts. What I would want to do is put a stream into a web page, html document. I'd prefer to used "something different" than rtsp, to be used by the browser because rtsp seems to be blocked more and more (people watching baby monitors crashing networks). From what I read is that ffmpeg can be used to 'transcode' an rtsp stream, to a format that directly can be used in a browser (firefox)? If so, is there an exam[le or write up for how to do that? thanks, Ron ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".