NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Extras v
« Previous 1 2 3 4 Next »
ffmpeg Question RTSP to HLS

 
  • 0 Vote(s) - 0 Average
ffmpeg Question RTSP to HLS
Brucek2839
Offline

Senior Member

Chicago, Il
Posts: 516
Threads: 147
Joined: May 2018
#21
2022-02-03, 12:15 AM
I GOT IT WITH THIS ONE

C:\FFMPEG\ffmpeg-5.0-essentials_build\bin>ffmpeg -re -v panic -f lavfi -i anullsrc=r=48000:cl=mono -i "rtsp://admin:12345@192.168.1.138:554/Streaming/Channels/1?transportmode=unicast&profile=Profile_1" -vcodec copy -acodec aac -f mpegts - | ffplay -i pipe:
ffplay version 5.0-essentials_build-www.gyan.dev Copyright © 2003-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
Input #0, mpegts, from 'pipe:': 0KB vq= 0KB sq= 0B f=0/0
Duration: N/A, start: 1.400000, bitrate: N/A
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720, 25 fps, 25 tbr, 90k tbn
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, mono, fltp, 4 kb/s
4.76 A-V: -0.007 fd= 2 aq= 1KB vq= 56KB sq= 0B f=0/0

C:\FFMPEG\ffmpeg-5.0-essentials_build\bin>
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#22
2022-02-03, 12:17 AM
Instead of creating the pipe, save it to a file by replacing - | ffplay -i pipe: with filename.ts Also change -v panic with -v verbose to see the input error.

BTW I am about to give up on this, I have a rule about helping with ffmpeg that I am breaking.

Martin
Brucek2839
Offline

Senior Member

Chicago, Il
Posts: 516
Threads: 147
Joined: May 2018
#23
2022-02-03, 12:27 AM
I do appreciate you helping me!!!!!!!!!! I have been trying to get this for a few years now...
Brucek2839
Offline

Senior Member

Chicago, Il
Posts: 516
Threads: 147
Joined: May 2018
#24
2022-02-03, 12:35 AM
I get a lot or streaming garbage on the screen when I run the batch file.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#25
2022-02-03, 12:49 AM
You didn't remove the dash.

Martin
Brucek2839
Offline

Senior Member

Chicago, Il
Posts: 516
Threads: 147
Joined: May 2018
#26
2022-02-03, 12:53 AM
ok, I think I finally have it...


C:\FFMPEG\ffmpeg-5.0-essentials_build\bin>Cmd
Microsoft Windows [Version 10.0.19042.1466]
© Microsoft Corporation. All rights reserved.

C:\FFMPEG\ffmpeg-5.0-essentials_build\bin>webcam.bat

C:\FFMPEG\ffmpeg-5.0-essentials_build\bin>ffmpeg -re -v verbose -f lavfi -i anullsrc=r=48000:cl=mono -i "rtsp://admin:12345@192.168.1.138:554/Streaming/Channels/1?transportmode=unicast&profile=Profile_1" -vcodec copy -acodec aac -f mpegts Video.ts
ffmpeg version 5.0-essentials_build-www.gyan.dev Copyright © 2000-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
Input #0, lavfi, from 'anullsrc=r=48000:cl=mono':
Duration: N/A, start: 0.000000, bitrate: 384 kb/s
Stream #0:0: Audio: pcm_u8, 48000 Hz, mono, u8, 384 kb/s
[tcp @ 00000262575f62c0] Starting connection attempt to 192.168.1.138 port 554
[tcp @ 00000262575f62c0] Successfully connected to 192.168.1.138 port 554
[rtsp @ 00000262575f2b00] SDP:
v=0
o=- 1643828080887970 1643828080887970 IN IP4 192.168.1.138
s=Media Presentation
e=NONE
b=AS:5050
t=0 0
a=control:rtsp://192.168.1.138:554/Streaming/Channels/1/?transportmode=unicast&profile=Profile_1
m=video 0 RTP/AVP 96
b=AS:5000
a=control:rtsp://192.168.1.138:554/Streaming/Channels/1/trackID=1?transportmode=unicast&profile=Profile_1
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=420029; packetization-mode=1; sprop-parameter-sets=Z00AH5pmAoAt/zUBAQFAAAD6AAAw1AE=,aO48gA==
a=Media_header:MEDIAINFO=494D4B48010100000400010000000000000000000000000000000000000000000000000000000000;
a=appversion:1.0

[rtsp @ 00000262575f2b00] setting jitter buffer size to 500
[h264 @ 00000262575f7f80] Reinit context to 1280x720, pix_fmt: yuv420p
Input #1, rtsp, from 'rtsp://admin:12345@192.168.1.138:554/Streaming/Channels/1?transportmode=unicast&profile=Profile_1':
Metadata:
title : Media Presentation
Duration: N/A, start: 0.040089, bitrate: N/A
Stream #1:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1280x720, 25 fps, 25 tbr, 90k tbn
File 'Video.ts' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #1:0 -> #0:0 (copy)
Stream #0:0 -> #0:1 (pcm_u8 (native) -> aac (native))
Press [q] to stop, [?] for help
[graph_0_in_0_0 @ 000002625777ce00] tb:1/48000 samplefmt:u8 samplerate:48000 chlayout:0x4
[format_out_0_1 @ 00000262578c0e40] auto-inserting filter 'auto_aresample_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_aresample_0 @ 000002625789ba80] ch:1 chl:mono fmt:u8 r:48000Hz -> ch:1 chl:mono fmt:fltp r:48000Hz
[mpegts @ 0000026257e1cb40] service 1 using PCR in pid=256, pcr_period=80ms
[mpegts @ 0000026257e1cb40] muxrate VBR, sdt every 500 ms, pat/pmt every 100 ms
Output #0, mpegts, to 'Video.ts':
Metadata:
encoder : Lavf59.16.100
Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1280x720 (0x0), q=2-31, 25 fps, 25 tbr, 90k tbn
Stream #0:1: Audio: aac (LC), 48000 Hz, mono, fltp, delay 1024, 69 kb/s
Metadata:
encoder : Lavc59.18.100 aac
[rtsp @ 00000262575f2b00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[mpegts @ 0000026257e1cb40] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mpegts @ 0000026257e1cb40] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
frame= 460 fps= 25 q=-1.0 size= 1280kB time=00:00:18.34 bitrate= 571.5kbits/s speed=0.998x
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#27
2022-02-03, 12:57 AM
Ok, so you need to see if you can get ffplay to play stream too. You may need to transcode to get better timestamps for NextPVR.

Good luck, hopefully you are on your way now.

Martin
Brucek2839
Offline

Senior Member

Chicago, Il
Posts: 516
Threads: 147
Joined: May 2018
#28
2022-02-03, 01:17 AM
Thank you for all your help. Now how do I go about getting it into extras to see a new device? I tried it but it did nothing.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#29
2022-02-03, 01:20 AM
Once you get it to work with ffplay as a pipe, use those parameters the args area shown in the wiki link link I posted for you.

Martin
Brucek2839
Offline

Senior Member

Chicago, Il
Posts: 516
Threads: 147
Joined: May 2018
#30
2022-02-03, 02:00 AM
Is this the link you are speaking about?


<args>-re -v panic -f lavfi -i anullsrc=r=48000:cl=mono -rtsp_transport tcp -i "rtsp://xxx:xxx@192.168.1.182:554/11" -vcodec h264 -acodec aac -f mpegts -</args>
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (9): « Previous 1 2 3 4 5 … 9 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Locast Multiple Streams Question pkscout 4 1,619 2021-08-30, 12:14 AM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode