How to progressively save a file? -movflags faststart

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

How to progressively save a file? -movflags faststart

Osama Alshaykh
Hi everyone,
What is the best approach to progressively save a file while encoding?  
I am encoding using x11grab and want to make sure there is an input file even if the process is not gracefully closed (example stopping it using SIGKILL).

I am encoding video as h264 and using MP4 mux.

Thank you,
Osama


This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message
_______________________________________________
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: How to progressively save a file? -movflags faststart

Moritz Barsnick
On Tue, Feb 14, 2017 at 02:50:46 -0500, Osama Alshaykh wrote:
> What is the best approach to progressively save a file while encoding?  
> I am encoding using x11grab and want to make sure there is an input file even if the process is not gracefully closed (example stopping it using SIGKILL).

SIGINT or SIGQUIT qould really be better, no-one in their sane mind
would kill a program with SIGKILL.

> I am encoding video as h264 and using MP4 mux.

I believe MP4 is the least suitable format for progressive saving.
Perhaps if written as a segmented or fragmented format, each finished
segment will be "complete", but if a single MP4 file is not finalized,
its content cannot be read.

Matroska (MKV) handles progressive writing fine, in my experience the
file can be read even if the temporary header doesn't contain the
complete information. Otherwise, MPEG-TS comes to mind as the "perfect"
format for arbitrary cuts. (It comes with a bit of overhead though.)

Once finished, you can always convert the .mkv or .ts file to .mp4
afterwards, if required.

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: How to progressively save a file? -movflags faststart

Osama Alshaykh
I agree with you, no one would use SIGKILL but FFMPEG is not stopping 100% of the time with SIGINT for us.  We use ubuntu and latest stable version from FFMPEG but still e have problems.

thanks,
Osama




> On Feb 14, 2017, at 4:20 AM, Moritz Barsnick <[hidden email]> wrote:
>
> On Tue, Feb 14, 2017 at 02:50:46 -0500, Osama Alshaykh wrote:
>> What is the best approach to progressively save a file while encoding?  
>> I am encoding using x11grab and want to make sure there is an input file even if the process is not gracefully closed (example stopping it using SIGKILL).
>
> SIGINT or SIGQUIT qould really be better, no-one in their sane mind
> would kill a program with SIGKILL.
>
>> I am encoding video as h264 and using MP4 mux.
>
> I believe MP4 is the least suitable format for progressive saving.
> Perhaps if written as a segmented or fragmented format, each finished
> segment will be "complete", but if a single MP4 file is not finalized,
> its content cannot be read.
>
> Matroska (MKV) handles progressive writing fine, in my experience the
> file can be read even if the temporary header doesn't contain the
> complete information. Otherwise, MPEG-TS comes to mind as the "perfect"
> format for arbitrary cuts. (It comes with a bit of overhead though.)
>
> Once finished, you can always convert the .mkv or .ts file to .mp4
> afterwards, if required.
>
> 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".