VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. hi all,

    I'm trying to mux a raw h264 with a raw g711 audio file to mp4 container.
    for that I'm converting the g711 audio stream to 'au' by adding the au header,
    and then using the ffmpeg program:
    ffmpeg -i audio.au -i video.h264 -strict experimental av.mp4
    the result is mp4 file with both video and audio streams
    but the video is playing almost 3 times faster then the original h264 stream.

    ffmpeg version N-31932-g41bf67d, Copyright (c) 2000-2011 the FFmpeg developers
    built on Aug 16 2011 18:54:12 with gcc 4.6.1
    configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --ena
    ble-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
    able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --ena
    ble-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
    libavutil 51. 12. 0 / 51. 12. 0
    libavcodec 53. 10. 0 / 53. 10. 0
    libavformat 53. 7. 0 / 53. 7. 0
    libavdevice 53. 3. 0 / 53. 3. 0
    libavfilter 2. 31. 1 / 2. 31. 1
    libswscale 2. 0. 0 / 2. 0. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    [au @ 01ECB720] max_analyze_duration 5000000 reached at 5056000
    [au @ 01ECB720] Estimating duration from bitrate, this may be inaccurate
    Input #0, au, from 'audio.au':
    Duration: N/A, bitrate: N/A
    Stream #0.0: Audio: pcm_mulaw, 16000 Hz, 1 channels, s16, 128 kb/s
    [h264 @ 01EC91A0] max_analyze_duration 5000000 reached at 5000000
    [h264 @ 01EC91A0] 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 #1, h264, from 'video.h264':
    Duration: N/A, bitrate: N/A
    Stream #1.0: Video: h264 (High), yuv420p, 704x576, 50 fps, 25 tbr, 1200k tbn, 50 tbc
    [buffer @ 01EC9C20] w:704 h:576 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
    [mpeg4 @ 01FD1B40] removing common factors from framerate
    Output #0, mp4, to 'av.mp4':
    Metadata:
    encoder : Lavf53.7.0
    Stream #0.0: Video: mpeg4, yuv420p, 704x576, q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0.1: Audio: aac, 16000 Hz, 1 channels, s16, 64 kb/s
    Stream mapping:
    Stream #1.0 -> #0.0
    Stream #0.0 -> #0.1
    Press [q] to stop, [?] for help
    frame= 165 fps= 86 q=23.9 Lsize= 492kB time=00:00:06.60 bitrate= 610.9kbits/s dup=0 drop=163
    video:340kB audio:147kB global headers:0kB muxing overhead 1.000657%
    i know that the input raw stream is interlaced 25 fps 704x576.
    does any one can help me to find the reason why the video stream is playing faster then it should be?

    ran.
    Quote Quote  
  2. ffmpeg "sees" your video stream as 50FPS (it should be identifying it as 25FPS)


    Stream #1.0: Video: h264 (High), yuv420p, 704x576, 50 fps, 25 tbr, 1200k tbn, 50 tbc

    Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (50/2)
    ffmpeg can have problems with interlaced streams

    You can try FFMBC, it seems to work better with interlaced streams



    What is the source of the video? What was the original container? ffmpeg works better with video in container (there will be timestamps to read) . Also if the video was not flagged as "interlaced" then ffmpeg might read it as progressive
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    What is the source of the video? What was the original container? ffmpeg works better with video in container (there will be timestamps to read) .
    i agree, unfortunately the container is not a known one, and i had to demux the h264 stream from it with a code i wrote.
    note that playing the video.h264 on vlc player works great, and with the right playing speed.

    is there a way to tweak that with ffmpeg or any other open source windows base prog?
    Quote Quote  
  4. It might be a playback issue contributing as well. Interlaced AVC works best in transport stream (.m2ts, .ts, .mts) . MP4 might not be suitable

    1st thing I would try is FFMBC, it handles interlaced avc better than FFMPEG.

    Maybe you can try VLC to mux it ? not sure how

    Even if you mux it with tsmuxer 1st (and if that is read correctly), then ffmpeg will have a better chance than raw avc input
    Quote Quote  
  5. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    [ ignore this ]
    Quote Quote  
  6. thanks for your suggestions,


    1. ffmbc is linux base program.
    2. couldn't make it with vlc either .

    i can strip the time stamp from the original container.
    is there any way i can place it in the raw h264 stream?
    if so where and how?

    here is the dump of a the h264 sync codes:
    Code:
    00 00 00 01 27 64 00 1f 
    ad 88 0e 43 98 20 e1 0c 
    29 0a 44 07 21 cc 10 70 
    86 14 85 22 03 90 e6 08 
    38 43 0a 42 90 c0 42 18 
    c2 1c 66 32 10 86 02 10 
    c6 10 e3 31 90 84 30 10 
    86 30 87 19 8c 84 22 02 
    11 98 ce 23 c2 9f 11 f8 
    8f e2 3f 11 f1 1e 33 88 
    c4 44 42 81 08 8c 47 11 
    e2 3e 4f c4 7f 27 e4 f8 
    8f 11 c4 64 88 b6 05 81 
    22 40 00 00 00 01 28 e9 
    08 3c b0 00 00 00 01 25 
    88 85 06 ff 94 01 a8 61 
    03 4f fc cb 24 5d 8e e7 
    f7 78 89 f7 ac 9a 16 cc 
    b8 b9 25 70 45 5e a4 b3 
    0c 4f be 1d 11 f9 1a d3 
    8d e2 85 a3 5f d0 9e f7 
    5e 47 16 24 4e 7c 2f 08 
    0f bf d7 cf 1a 98 ea 57 
    5b 5f 9a 61 82 f6 62 48 
    d0 11 ea ad 00 4f 8b 3e 
    a4 66 15 33 e5 14 8e b7 
    5e b2 9b 8b 42 b6 0b a9 
    9d d2 5f c9 4d 3e e1 06 
    99 f5 82 a5 07 94 55 3f 
    98 b7 4d fd 03 e4 14 1c ... 
    
    
    00 00 00 01 21 88 86 1b 
    ff 94 01 82 40 3c 3f cc 
    b2 47 36 e4 fd 88 49 06 
    67 aa 2f cc be 68 77 df 
    d2 fd 93 7c b7 84 37 17 
    a0 2f 30 03 f6 0e 21 78 
    be 28 03 46 a6 7d 6e 3b 
    4f c8 44 5c a0 40 2e c2 
    92 a4 43 c3 20 d8 df 1b 
    d7 e8 b4 6f d1 7b 20 ed 
    3b 19 6f a9 72 48 bf 4b 
    da 19 1e 82 82 4e 91 7b 
    8d 18 7d 6a 4a 28 27 2e 
    62 35 a0 96 2e ec a8 15 
    7e a9 6c a8 86 04 df f3 
    71 dd 5e 07 e4 6e 12 89 
    b5 4a cb 7f 63 01 35 93 
    
    Quote Quote  



Similar Threads