1

I'm trying to re stream a RTSP feed and convert to h264.

I'm using the following command line:

C:\Users\Martyn>ffmpeg -re -i rtsp://192.168.2.207/VideoInput/1/mpeg4/ -preset ultrafast -vcodec libx264 -tune zerolatency -b:v 900k -f rtsp udp://192.168.0.2:1234

The output I get is:

C:\Users\Martyn>ffmpeg -re -i rtsp://192.168.2.207/VideoInput/1/mpeg4/ -preset u
ltrafast -vcodec libx264 -tune zerolatency -b:v 900k -f rtsp udp://192.168.0.2:1
234
ffmpeg version N-87043-gf0f48884b0 Copyright (c) 2000-2017 the FFmpeg developers

  built with gcc 7.2.0 (Rev1, Built by MSYS2 project)
  configuration:  --enable-avisynth --enable-gcrypt --enable-libmp3lame --enable
-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --
enable-cuda --enable-cuvid --enable-schannel --disable-w32threads --extra-cflags
=-DPTW32_STATIC_LIB --extra-libs=-lpthread --extra-libs=-lwsock32 --enable-gpl -
-disable-debug
  libavutil      55. 74.100 / 55. 74.100
  libavcodec     57.103.100 / 57.103.100
  libavformat    57. 77.100 / 57. 77.100
  libavdevice    57.  7.101 / 57.  7.101
  libavfilter     6.100.100 /  6.100.100
  libswscale      4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, rtsp, from 'rtsp://192.168.2.207/VideoInput/1/mpeg4/':
  Metadata:
    title           : MC153906N015_Camera_1
  Duration: N/A, start: 0.040000, bitrate: N/A
    Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 1920x1080 [SAR 1:1 DAR
16:9], 25 tbr, 90k tbn, 1k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0000000002c422c0] using SAR=1/1
[libx264 @ 0000000002c422c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX
[libx264 @ 0000000002c422c0] profile Constrained Baseline, level 4.0
[libx264 @ 0000000002c422c0] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC cod
ec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 r
ef=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0
 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 ch
roma_qp_offset=0 threads=8 lookahead_threads=8 sliced_threads=1 slices=8 nr=0 de
cimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 ke
yint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=900 ra
tetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0

How do I know if this is streaming or not? when I try to connect to udp://192.168.0.2:1234 nothing happens.

martyn
  • 11
  • 1
  • 3
  • `-f h264` --> `-f rtsp` – Gyan Aug 24 '17 at 16:54
  • Hi @Mulvya, I have made the changes but now receive the follow error about pthreads? is it possible to enable this on the pre built windows version of ffmpeg? [udp @ 000000000071df40] 'circular_buffer_size' option was set but it is not sup ported on this build (pthread support is required) [udp @ 000000000036b1a0] 'circular_buffer_size' option was set but it is not sup ported on this build (pthread support is required) Please use -profile:a or -profile:v, -profile is ambiguous – martyn Aug 24 '17 at 17:27
  • Doesn't [look](https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=2&t=4837) like it. You can use this autobuild script: https://github.com/jb-alvarado/media-autobuild_suite – Gyan Aug 24 '17 at 17:54
  • @Mulvya I have re compiled ffmpeg and now no longer get the udp error. however when I run the command below I cannot connect to the feed using VLC etc. I presume I should be connecting to rtsp://192.168.0.2:8000 to view the stream? – martyn Aug 24 '17 at 22:15
  • Input #0, rtsp, from 'rtsp://192.168.2.207/VideoInput/1/mpeg4/1': Metadata: title : MC153906N015_Camera_1 Duration: N/A, start: 0.040000, bitrate: N/A Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 24.92 tbr, 90k tbn, 1k tbc Please use -profile:a or -profile:v, -profile is ambiguous Stream mapping: Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264)) – martyn Aug 24 '17 at 22:20
  • It seems to suggest that its streaming but I cant connect to it on any device – martyn Aug 25 '17 at 14:54

0 Answers0