easy question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

easy question

Good Developer
I hope it is an easy question for someone who came across this issue.
I am recording a video from an ip camera. The video stream comes in h264
format and there is no audio stream. In order to save cpu, I am not
decoding and then re encoding it back to h264, I just copy it. The problem
is that a resulting video sometimes comes distorted. Here is a simple
command that I am using:

ffmpeg -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v copy -f
segment -segment_time 60 -segment_wrap 10 -reset_timestamps 1 result%d.mp4


Also, for your information, there is no problem if I encode the video to
h264, but I am trying to avoid this for saving cpu time:


ffmpeg -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v libx264 -b:v
512K -pix_fmt yuv420p -g 60 -f segment -segment_time 60 -segment_wrap 10
-reset_timestamps 1 result%d.mp4


Can someone point me in a right direction please?
_______________________________________________
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: easy question

Brainiarc7
Retry with the rstream option:

ffmpeg -re -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v copy -f
segment -segment_time 60 -segment_wrap 10 -reset_timestamps 1 result%d.mp4


On 11 May 2018 at 00:00, Good Developer <[hidden email]>
wrote:

> I hope it is an easy question for someone who came across this issue.
> I am recording a video from an ip camera. The video stream comes in h264
> format and there is no audio stream. In order to save cpu, I am not
> decoding and then re encoding it back to h264, I just copy it. The problem
> is that a resulting video sometimes comes distorted. Here is a simple
> command that I am using:
>
> ffmpeg -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v copy -f
> segment -segment_time 60 -segment_wrap 10 -reset_timestamps 1 result%d.mp4
>
>
> Also, for your information, there is no problem if I encode the video to
> h264, but I am trying to avoid this for saving cpu time:
>
>
> ffmpeg -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v libx264
> -b:v
> 512K -pix_fmt yuv420p -g 60 -f segment -segment_time 60 -segment_wrap 10
> -reset_timestamps 1 result%d.mp4
>
>
> Can someone point me in a right direction please?
> _______________________________________________
> 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: easy question

Good Developer
Thanks for reply Denis. I tried it with -re option already. I get even worse distortion.

> On May 10, 2018, at 5:11 PM, Dennis Mungai <[hidden email]> wrote:
>
> Retry with the rstream option:
>
> ffmpeg -re -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v copy -f
> segment -segment_time 60 -segment_wrap 10 -reset_timestamps 1 result%d.mp4
>
>
> On 11 May 2018 at 00:00, Good Developer <[hidden email]>
> wrote:
>
>> I hope it is an easy question for someone who came across this issue.
>> I am recording a video from an ip camera. The video stream comes in h264
>> format and there is no audio stream. In order to save cpu, I am not
>> decoding and then re encoding it back to h264, I just copy it. The problem
>> is that a resulting video sometimes comes distorted. Here is a simple
>> command that I am using:
>>
>> ffmpeg -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v copy -f
>> segment -segment_time 60 -segment_wrap 10 -reset_timestamps 1 result%d.mp4
>>
>>
>> Also, for your information, there is no problem if I encode the video to
>> h264, but I am trying to avoid this for saving cpu time:
>>
>>
>> ffmpeg -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v libx264
>> -b:v
>> 512K -pix_fmt yuv420p -g 60 -f segment -segment_time 60 -segment_wrap 10
>> -reset_timestamps 1 result%d.mp4
>>
>>
>> Can someone point me in a right direction please?
>> _______________________________________________
>> 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".
_______________________________________________
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".