[FFmpeg-user] Muxing raw H264 to container format (MP4, MOV)

oblivion vlad.ion at gmail.com
Thu Oct 20 17:21:26 CEST 2011


Hi,

I have a raw H264 stream that I want to mux into a container format in order
to get timing information in it (for seeking purposes). I tried the standard
option "-vcodec copy" and I get an empty file. 

ffmpeg -i input.h264 -vcodec copy out.mp4

I tried variations like specifying the frame rate and the format with "-f
h264" but I get the same. Muxing it together with an audio file outputs a
container containing the audio file only.

The output for the command above is this:

ffmpeg version N-33818-gd049257, Copyright (c) 2000-2011 the FFmpeg
developers
  built on Oct 19 2011 23:01:30 with gcc 4.6.1
  configuration: --disable-static --enable-shared --enable-gpl
--enable-version3
 --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--e
nable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype
--enable
-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp
--enable-libsc
hroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc
--enable-l
ibvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxa
vs --enable-libxvid --enable-zlib
  libavutil    51. 22. 0 / 51. 22. 0
  libavcodec   53. 22. 0 / 53. 22. 0
  libavformat  53. 17. 0 / 53. 17. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 44. 1 /  2. 44. 1
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[h264 @ 01E4E8E0] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 50.00
(50/1)
-> 25.00 (50/2)
Input #0, h264, from 'input.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p, 1280x960, 25 fps, 25 tbr,
1200k tb
n, 50 tbc
File 'out.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf53.17.0
    Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 1280x960,
q=2-31, 2
5 tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0 (copy)
Press [q] to stop, [?] for help
frame=    0 fps=  0 q=-1.0 Lsize=       0kB time=00:00:00.00 bitrate=  
0.0kbits
/s
video:0kB audio:0kB global headers:0kB muxing overhead 1.#INF00%

I looks like it does absolutely no processing and just exists. Re-encoding
the file works but I don't want that, I just want to use the already encoded
data.\

I also tried an older tool, avc2avi.exe, which works fine but it writes AVI
1.0 files that are limited in size and I would need AVI 2.0 for large files.


Thanks for any suggestions.

--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Muxing-raw-H264-to-container-format-MP4-MOV-tp3922255p3922255.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list