[FFmpeg-user] Mux encoded video data directly into mp4 files
Francois Visagie
francois.visagie at gmail.com
Wed Sep 17 09:03:21 CEST 2014
> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of fernando.takeshi
> Sent: 17 September 2014 01:39
> To: ffmpeg-user at ffmpeg.org
> Subject: [FFmpeg-user] Mux encoded video data directly into mp4 files
>
> Hello,
>
> I've been searching for ways to create .mp4 files directly from saved raw
> video data. The sources of said data can record frames in the h264, mpeg
and
> mjpeg formats; I end up with files that are basically raw frames of these
> formats, one after the other.
>
> Now, I've tested the command line approach (that I cannot use,
> unfortunately) and it seems to work for h264 and mpeg files, but not for
> mjpeg. I need to do this programmatically; so I've followed ffmpeg's
muxing
> example and many others I found online (stackoverflow, etc) and can't seem
> to find any consistency in how to (or what would be the correct way to)
> accomplish this.
>
> Right now, I do not have any sample code working - the muxing example
> generates a divide by zero error on av_write_frame (I tried messing with
> DTS/PTS but nothing seems to work). Other examples all yielded different
> results, but none worked.
>
> So, what I ask is basically: given a file consisting of raw frames (h264,
mpeg or
> mjpeg), how do I go about creating a playable video mp4 file? What would
be
> the correct way? Specifically speaking, which functions should I be
calling and
> in what order as to make the code work for those three formats?
I hope you get the help you need, but failing that, consider making a
(custom) debug build of ffmpeg to trace the sequence in the successful
command line multiplexing you mention.
>
> Some sample data can be found at
> https://drive.google.com/file/d/0B8XSlN4yAH72T1R0Ti1zaGViNmM/edit?usp
> =sharing
>
> Thanks in advance!
>
>
>
> --
> View this message in context: http://ffmpeg-
> users.933282.n4.nabble.com/Mux-encoded-video-data-directly-into-mp4-
> files-tp4667372.html
> Sent from the FFmpeg-users mailing list archive at Nabble.com.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
More information about the ffmpeg-user
mailing list