Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

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

Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

Rishit Temp
Hello,

I am trying to read an incomplete MP4 file as it is being written in real time. Due to the limitations fo the tool I am required to use, the file I need to read in real time is constrained to mp4 or mov.

With that in mind, I first tried to execute the following command to turn the mp4 file into an flv file so that I could stream it to an RTMP server.

ffmpeg -i input.mp4 -codec copy -map 0 -movflags +faststart ./output.mp4

However, I got the no moov atom found error. I tried the ignore error command (below) but the following was returned: Unrecognized option 'err_detect ignore_err'.

ffmpeg -err_detect -Ignore_err - i input.mp4 -codec copy -map 0 -movflags +faststart ./output.mp4



Are there any options (whether or not they are unconventional or avoided) that I have to stream an mp4 file being written in real time using FFMPEG or otheriwise? By change, can I extract the raw video data from the mp4 file as it is being written and then stream that?

Any help is truly appreciated!

Thanks,
Rishi
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

Carl Eugen Hoyos-2
Am Mo., 11. Jan. 2021 um 01:19 Uhr schrieb Rishit Temp
<[hidden email]>:

> I am trying to read an incomplete MP4 file as it is being written in real time.

This is in general impossible with FFmpeg.

If the file would be written in a way that makes this possible (by renaming
"old" moov atoms to free atoms every few seconds), you wouldn't ask here
(and that likely wouldn't solve your general issue).

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

Carl Zwanzig
On 1/10/2021 4:23 PM, Carl Eugen Hoyos wrote:
> Am Mo., 11. Jan. 2021 um 01:19 Uhr schrieb Rishit Temp
> <[hidden email]>:
>
>> I am trying to read an incomplete MP4 file as it is being written in real time.

> This is in general impossible with FFmpeg.

I'm not sure it's possible at all with mp4/mov at all- you need metadata
that's written when the file is closed.

Later,

z!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

Gyan Doshi-2


On 11-01-2021 10:34 am, Carl Zwanzig wrote:

> On 1/10/2021 4:23 PM, Carl Eugen Hoyos wrote:
>> Am Mo., 11. Jan. 2021 um 01:19 Uhr schrieb Rishit Temp
>> <[hidden email]>:
>>
>>> I am trying to read an incomplete MP4 file as it is being written in
>>> real time.
>
>> This is in general impossible with FFmpeg.
>
> I'm not sure it's possible at all with mp4/mov at all- you need
> metadata that's written when the file is closed.

In some live broadcast workflows, which need some post work before
telecast, the encoder writes a file with pre-specified metadata i.e.
timestamps and packet offsets, and writes out the media to those
offsets. This is inefficient in terms of space packing but any NLE can
open these files and access the new data as it gets added.

Regards,
Gyan
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

Carl Zwanzig
On 1/10/2021 10:04 PM, Gyan Doshi wrote:
> In some live broadcast workflows, which need some post work before telecast,
> the encoder writes a file with pre-specified metadata i.e. timestamps and
> packet offsets, and writes out the media to those offsets.

Thanks, learn something new every day. Given that would be a higher-end
setup, only the OP knows if his software will do that, but the I'd say odds
are against it.

Later,

z!

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

Rishit Temp
In reply to this post by Gyan Doshi-2
I see. That puts me in a really tough spot and unfortunately I don’t have control over where the metadata is located.

I might be able to access a raw H264 stream or a series of image captures. Can ffmpeg turn a series of images into a video feed and broadcast it given the frames per second assuming that the appropriate number of images are created in real time?

Thank you to everyone who has provided their input!

Rishi

> On Jan 11, 2021, at 12:04 AM, Gyan Doshi <[hidden email]> wrote:
>
>
>
> On 11-01-2021 10:34 am, Carl Zwanzig wrote:
>> On 1/10/2021 4:23 PM, Carl Eugen Hoyos wrote:
>>> Am Mo., 11. Jan. 2021 um 01:19 Uhr schrieb Rishit Temp
>>> <[hidden email]>:
>>>
>>>> I am trying to read an incomplete MP4 file as it is being written in real time.
>>
>>> This is in general impossible with FFmpeg.
>>
>> I'm not sure it's possible at all with mp4/mov at all- you need metadata that's written when the file is closed.
>
> In some live broadcast workflows, which need some post work before telecast, the encoder writes a file with pre-specified metadata i.e. timestamps and packet offsets, and writes out the media to those offsets. This is inefficient in terms of space packing but any NLE can open these files and access the new data as it gets added.
>
> Regards,
> Gyan
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

Carl Zwanzig
On 1/11/2021 9:48 AM, Rishit Temp wrote:
> I might be able to access a raw H264 stream or a series of image
> captures. Can ffmpeg turn a series of images into a video feed and
> broadcast it given the frames per second assuming that the appropriate
> number of images are created in real time?
ffmpeg can convert a series of still images into video, a quick search with
"ffmpeg still image to video" will turn up the commands and some of the
potential issues. But since you want to re-stream anyway, getting a stream
to start with will make the job easier.

Oh, and please do not top-post on this mailing list.

z!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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