[FFmpeg-user] FFmpeg save livestream issue

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Jun 21 15:40:36 EEST 2018


2018-06-21 14:37 GMT+02:00, ashas <asha.s at accord-soft.com>:

> I am running FFMPEG on ARM based board (booting from SD card).
> I have cross compiled ffmpeg source and the binaries are place in
> SD card.
>
> I wanted to save the RTSP live stream to a video file and below is
> the command used on ARM target
>
> *ffmpeg -i rtsp://192.168.0.160:554/stream -f matroska
> -vcodec copy -acodec copy /mnt/sd2/sample2.mkv*

Complete, uncut console output missing.

> This command generates the video file and I am able to play it.
> The issue I am facing is the time duration of output file. For
> example ,If I run ffmpeg for 50 seconds and quit safely (pressed
> 'q' to stop) the generated *.mkv file contains only ~20 sec video.
>
> Another observation is ,terminate ffmpeg and unmount the sd
> card where output file is stored  then the complete 50 sec data
> is available.
>
> My understanding is I need to flush the incoming packets
> immediately to output file and I don't want to umount the sd
> card . How to do it ? Kindly help me to resolve this issue.

Did you try "sync"?

Carl Eugen


More information about the ffmpeg-user mailing list