[mythtv-users] H264 conversion of interlaced MPEG2?

Stephen Worthington stephen_agent at jsw.gen.nz
Wed May 6 02:51:04 UTC 2015


On Tue,  5 May 2015 21:41:26 -0400 (EDT), you wrote:

>    > Date: Mon, 4 May 2015 21:12:06 -0500
>    > From: dennis <deg at outlook.com>
>
>    > If you plan on streaming the video to a mobile device,  you also want to 
>    > move 'moov atom' to the beginning of the file, so it can utilize 
>    > faststart.   This allows the video to start streaming before the entire 
>    > file is transferred.   ( -movflags faststart ).
>
>Somewhat off-topic:  Is an H264 stream missing the moov atom recoverable?
>
>I have a streamed lecture, recorded to H264 MP4 via VLC, during which
>the stream went away at the end.  VLC apparently failed to terminate
>the recording correctly, and attempts to play it fail in both mplayer
>("moov atom not found") and VLC (a lonely cone).
>
>I had an earlier recording of a different segment with the same
>recording parameters; naively trying to prepend the first 1KB or 1MB
>of a working recording to the broken one (after first removing the
>same number of bytes) didn't work, which was unsurprising.
>Concatenating working-to-broken played the working segment but not the
>broken one.  (I was assuming a header that gets fixed up later, not a
>missing trailer.)  Googling was unsatisfactory, except perhaps for a
>for-pay Windows program (and sneaky workarounds for the "pay" part),
>none of which I've tried 'cause even booting Windows is a hassle.
>
>Am I just SOL here?
>
>(Except for alignment issues, perhaps "cat bad good > both; qt-faststart..."
>might do something, but I somehow doubt it. :)
>
>P.S.  I wised up and started recording to ogg instead of H264 after
>that; it appears that ogg doesn't have an "all or nothing" approach
>to video and lets me play the video while it's being written instead
>of only after VLC is finished with it, etc.  But that still leaves
>me out of luck on the broken piece I've got.

Concatenating video files does not work as the header records need to
be fixed up between the files, at the very least.  There are some
programs out there that allow you to fiddle with the settings in video
file headers without touching the video and audio streams at all, and
can allow the changing of various options, such as the aspect ratio in
AVI files.  They usually only work where the size of the file does not
have to be changed, just a data field needs rewriting with a different
value.  From the sound of it, a "moov atom" would require adding an
extra header record at the start of the file somewhere.  But it is
possible that there is some software out there that can do it.  What
you are likely looking for is something that can extract the video and
audio streams (and any other streams such as subtitles) and then
re-multiplex them together with new header records.  Which you can do
with ffmpeg / avconf for example, but whether they could add the "moov
atom" or would just do it automatically I have no idea.


More information about the mythtv-users mailing list