Change the fps of mp4 file during streaming without restarting video

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Change the fps of mp4 file during streaming without restarting video

mahek delawala
Hi Everyone,

I am having one mp4 file. During the streaming of the file I want to change
the fps of video file without restarting the video or without creating the
new mp4 file with modified fps. Is it possible to change the fps of
streamed video without restarting or creating the new file using ffmpeg
command ?

Please help me in solving this isuue.

Regards,
Mahek
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Change the fps of mp4 file during streaming without restarting video

Moritz Barsnick
On Sun, Jun 10, 2018 at 23:05:31 +0530, mahek delawala wrote:
> I am having one mp4 file. During the streaming of the file I want to change
> the fps of video file without restarting the video or without creating the
> new mp4 file with modified fps.

Assuming you are using ffmpeg for streaming, use "-r <fps>" as an
output option (i.e. before your output stream URI).

Note that ffmpeg will achieve this frame rate by dropping or
duplicating frames. If you want to interpolate, you need to use a
filter.

Note also that this doesn't work with the video copy codec (-c:v copy).

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Change the fps of mp4 file during streaming without restarting video

mahek delawala
Hi Moritz,

I am having some issues regarding changing the fps of the streamed video.

I am applying the following ffmpeg command on the terminal which has 30 fps
in the output and pushes the stream to wowza server.
ffmpeg -re -i ~/Videos/Movie/Chhello\ Divas\ 2015.mp4 -acodec copy  -r 30
-f rtsp -muxdelay 0.01  rtsp://mahek:Mahek@123@
192.168.201.76:1935/live/mystream

During the execution of the above command, i am applying the below command
simultaneously in other terminal which has 15 fps in the output.
ffmpeg -re -i ~/Videos/Movie/Chhello\ Divas\ 2015.mp4 -acodec copy  -r 15
-f rtsp -muxdelay 0.01  rtsp://mahek:Mahek@123@
192.168.201.76:1935/live/mystream

I am able to see that fps gets changed in the second terminal but I am not
able to see the video in vlc in any of the above command ( vlc just plays
the audio stream, video stream is not present).

Following are my queries regarding changing the fps of the streamed video :
1. What can I do so that I am able to see the video track in vlc ?
2. When I am entering the second command it starts from 00:00:00 time, so
how can I check the exact instance of time at which change in fps has
resulted in video ? (for example if I am having 10 min video and I have
entered first command, it starts streaming now after 5 minutes I am
applying second command in another terminal it also starts with 00:00:00
time now. Actually, FPS Changes effect must come from the 5 mintues(the
time at which i executed fps chagne command) only, Video plying must not be
start from the beginning.)






On 11 June 2018 at 00:45, Moritz Barsnick <[hidden email]> wrote:

> On Sun, Jun 10, 2018 at 23:05:31 +0530, mahek delawala wrote:
> > I am having one mp4 file. During the streaming of the file I want to
> change
> > the fps of video file without restarting the video or without creating
> the
> > new mp4 file with modified fps.
>
> Assuming you are using ffmpeg for streaming, use "-r <fps>" as an
> output option (i.e. before your output stream URI).
>
> Note that ffmpeg will achieve this frame rate by dropping or
> duplicating frames. If you want to interpolate, you need to use a
> filter.
>
> Note also that this doesn't work with the video copy codec (-c:v copy).
>
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Change the fps of mp4 file during streaming without restarting video

Moritz Barsnick
On Mon, Jun 11, 2018 at 19:33:43 +0530, mahek delawala wrote:
> I am able to see that fps gets changed in the second terminal but I am not
> able to see the video in vlc in any of the above command ( vlc just plays
> the audio stream, video stream is not present).

I have no idea about RTSP and its format, and it seems it's not
something I can test. The best you can do it t hope for someone else's
help. What you need to do, is to provide the complete, uncut console
output to each of these commands. Their output may give some indication
as what might be happening.

> 1. What can I do so that I am able to see the video track in vlc ?

Have you tried some other player? (That's quite a long shot, as VLC
should be capable of ... a lot.)

> 2. When I am entering the second command it starts from 00:00:00 time, so
> how can I check the exact instance of time at which change in fps has
> resulted in video ? (for example if I am having 10 min video and I have
> entered first command, it starts streaming now after 5 minutes I am
> applying second command in another terminal it also starts with 00:00:00
> time now. Actually, FPS Changes effect must come from the 5 mintues(the
> time at which i executed fps chagne command) only, Video plying must not be
> start from the beginning.)

I have no idea what you are trying to say, sorry.

Can you explain to me how both your commands can simulaneously send to
the identical RTSP URL? (As I mentioned, I have no idea about RTSP.)

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Change the fps of mp4 file during streaming without restarting video

Carl Eugen Hoyos-2
In reply to this post by mahek delawala
2018-06-11 16:03 GMT+02:00, mahek delawala <[hidden email]>:

> I am able to see that fps gets changed in the second terminal but I am not
> able to see the video in vlc in any of the above command ( vlc just plays
> the audio stream, video stream is not present).

Please test with testsrc2 as input and no audio and if it still fails,
provide the command line you tested together with the complete,
uncut console output.

Changing the frame rate on-the-fly is not possible with ffmpeg (the
application) afaict, vfr input and output is possible in some cases.

Please remember not to top-post here, Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".