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
#1
2022-02-02, 08:28 PM
Hello,
I am starting to master the use of ffmpeg and have run into a error with the following script.  The RTSP stream works fine in ffplay.  From the script is looks to connect to the camera but I am stumped by the no output file error.  Any assistance would be appreciated.
Thank you,
Bruce

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 -v verbose  -i rtsp://admin:12345@192.168.1.138:554/Streaming/Channels/1?transportmode=unicast  & profile=Profile_1 -vf scale=1920:1080  -vcodec
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
[tcp @ 000001dfe9a6b940] Starting connection attempt to 192.168.1.138 port 554
[tcp @ 000001dfe9a6b940] Successfully connected to 192.168.1.138 port 554
[rtsp @ 000001dfe9a6b180] SDP:
v=0
o=- 1643809403001074 1643809403001074 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
m=video 0 RTP/AVP 96
b=AS:5000
a=control:rtsp://192.168.1.138:554/Streaming/Channels/1/trackID=1?transportmode=unicast
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 @ 000001dfe9a6b180] setting jitter buffer size to 500
[h264 @ 000001dfe9a6fc80] Reinit context to 1280x720, pix_fmt: yuv420p
Input #0, rtsp, from 'rtsp://admin:12345@192.168.1.138:554/Streaming/Channels/1?transportmode=unicast':
  Metadata:
    title          : Media Presentation
  Duration: N/A, start: 0.039333, bitrate: N/A
  Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1280x720, 25 fps, 25 tbr, 90k tbn
At least one output file must be specified
'profile' is not recognized as an internal or external command,
operable program or batch file.

C:\FFMPEG\ffmpeg-5.0-essentials_build\bin>libx264 -r 25 -b:v 1000000 -crf 31 -acodec aac  -sc_threshold 0 -f hls_time 5  -segment_time 5 -hls_list_size 5 C:\Webpages\Video\stream.m3u8
'libx264' is not recognized as an internal or external command,
operable program or batch file.

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

Posting Freak

Ontario Canada
Posts: 53,167
Threads: 958
Joined: May 2006
#2
2022-02-02, 08:34 PM
Sorry your FFmpeg line is truncated

Code:
ffmpeg -v verbose  -i rtsp://admin:12345@192.168.1.138:554/Streaming/Channels/1?transportmode=unicast  & profile=Profile_1 -vf scale=1920:1080  -vcodec

- add quotes around the URL that you add that you use in the batch file that works with ffplay
- the last parameter is typically the filename, but you can use the dash (-) to send it to standard output for the extra.
- remember to not use -v verbose with the extra.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#3
2022-02-02, 08:39 PM
As well as needing quotes around the url, it looks like you've got some extra spaces in there too.

"rtsp://admin:12345@192.168.1.138:554/Streaming/Channels/1?transportmode=unicast&profile=Profile_1"
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,167
Threads: 958
Joined: May 2006
#4
2022-02-02, 08:43 PM
I also noted the thread title, you don't want HLS you want -f mpegts

to test your batch file

webcam.bat | ffplay -i pipe:

Martin
Brucek2839
Offline

Senior Member

Chicago, Il
Posts: 516
Threads: 147
Joined: May 2018
#5
2022-02-02, 08:56 PM
Added the Quotes and took out the extra spaces and this is what I get now..


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 -v verbose -i "rtsp://admin:12345@192.168.1.138:554/Streaming/Channels/1?transportmode=unicast&profile=Profile_1" -vf scale=1920:1080 -vcodec
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
Missing argument for option 'vcodec'.
Error splitting the argument list: Invalid argument

C:\FFMPEG\ffmpeg-5.0-essentials_build\bin>libx264 -r 25 -b:v 1000000 -crf 31 -acodec aac -sc_threshold 0 -f hls_time 5 -segment_time 5 -hls_list_size 5 C:\Webpages\Video\stream.m3u8
'libx264' is not recognized as an internal or external command,
operable program or batch file.

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

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

Posting Freak

Ontario Canada
Posts: 53,167
Threads: 958
Joined: May 2006
#6
2022-02-02, 08:59 PM
Why don't you just zip up webcam.bat, attach it and we can look at it properly?

Martin
Brucek2839
Offline

Senior Member

Chicago, Il
Posts: 516
Threads: 147
Joined: May 2018
#7
2022-02-02, 09:03 PM
Martin,
Sounds like a great idea. Thank you,,,


ffmpeg -v verbose -i "rtsp://admin:12345@192.168.1.138:554/Streaming/Channels/1?transportmode=unicast&profile=Profile_1" -vf scale=1920:1080 -vcodec
libx264 -r 25 -b:v 1000000 -crf 31 -acodec aac -sc_threshold 0 -f hls_time 5 -segment_time 5 -hls_list_size 5 C:\Webpages\Video\stream.m3u8
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,167
Threads: 958
Joined: May 2006
#8
2022-02-02, 09:07 PM
Is that zipped and attached?

Martin
Brucek2839
Offline

Senior Member

Chicago, Il
Posts: 516
Threads: 147
Joined: May 2018
#9
2022-02-02, 10:10 PM
that is all of it...
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,167
Threads: 958
Joined: May 2006
#10
2022-02-02, 10:11 PM
But is is not what I asked for.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (9): 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,657 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