Search code examples
videovideo-streamingvlclibvlcframe-rate

Increasing fps & decreasing duration while streaming using VLC


Hello Stackoverflow :3

I have been trying to increase the fps and effectively decreasing the duration while increasing the speed when streaming a video from my hard drive using vlc. I would like to transcode while I am streaming if possible. I can already speed up the video before streaming however that is not the desired task.

The command I use for streaming regularly is (note xxx.xxx.x.xxx represents my ip):

vlc --intf dummy -vvv /Users/amr/Downloads/bigbangsample.mp4 --sout '#rtp{dst=127.0.0.1,port=1234,sdp=rtsp://xxx.xxx.x.xxx:1236/test.sdp}'

After following tips from Change Frames Per Second for VLC Stream I have tried transcoding using the command:

vlc --intf dummy -vvv /Users/amr/Downloads/bigbangsample.mp4 --sout='#transcode{fps=60}:rtp{dst=127.0.0.1,port=1234,sdp=rtsp://xxx.xxx.x.xxx:1236/test.sdp}'

Although I can still view the stream with no warnings or errors the video does not seem to be affected at all.

I am unsure if my command is wrong or if the fps really has been changed but by copying the frames to keep the duration the same. I am new to vlc and video processing and would appreciate any input.

UPDATE: ffprobe (see below) seems to show that the fps hasn't changed. Is there a standard way to change stream fps ?

Input #0, rtsp, from 'rtsp://xxx.xxx.x.xxx:1236/test.sdp':

  Metadata:
    title           : Unnamed
    comment         : N/A
  Duration: N/A, start: 21.377938, bitrate: N/A
    Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp
    Stream #0:1: Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 720x404 [SAR 1:1 DAR 180:101], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc

Thank you for your time.


Solution

  • I think that you have to add the vcodec, even if it's the same. So try

    vlc --intf dummy -vvv /Users/amr/Downloads/bigbangsample.mp4 --sout='#transcode{vcodec=h264,fps=60}:rtp{dst=127.0.0.1,port=1234,sdp=rtsp://xxx.xxx.x.xxx:1236/test.sdp}'
    

    (worked for me at least)