VideoHelp Forum




Results 1 to 4 of 4
  1. I am trying to convert an AVI file to DVD while adding subtitles and converting it to NTSC framerate from PAL (don't ask too much do I?). The original file is:
    VIDEO: [DIVX] 608x336 24 bpp 25.000 fps 1148.9 kbps (140.2 kbyte/s)
    audiocodec: framecopy (format=55 chans=2 rate=48000 bits=0 bps=16989 sample-0)
    (audio is mp3, 48000 Hz, stereo, 135 kb/s)

    I can do this with multiple convoluted encodings, but I would really like to do this in 1 pass as this situation comes up often enough. The problem is that ffmpeg chokes on encoding the audio, and when i try to do the audio seperately and then mux them, I get serious sync issues (15 min off by the end).

    So, the current attempt involves:
    1) set the Quick Preset to DVD mpeg2enc
    2) under Video, set Framerate to NTSC (29.97)
    3) under Video, reset Autosize to DVD (to get NTSC video size)
    4) under Filters, check VOB Subtitles (drop down already set to Burn)
    5) under Filters, Load subs to get subtitle file
    6) under Options, select Decode with mplayer
    7) under Tools, I deselect Keep elementary streams (why? why not?)

    This fails on the audio processing portion (log below). What I am looking for is to either fix this problem and get the one pass, or I would happily do the audio seperately and mux them, but something in the PAL -> NTSC conversion is apparently making this difficult as the sound starts synced at the beginning, but the sync starts rapidly slipping and the video ends about 15 minutes before the audio.

    Thanks for any help!

    The log I get is:
    Encoding started on Sat Jul 2 17:21:51 EDT 2005
    /Volumes/PAL/MarksMovie.avi.ff/
    -f 5 -b 4000 -q 3 -B 260 -V 230 -a 2
    -F 4
    INFO: [yuvscaler] yuvscaler (version 1.7.0) is a general scaling utility for yuv frames
    INFO: [yuvscaler] (C) 2001-2002 Xavier Biquard <xbiquard@free.fr>
    INFO: [yuvscaler] yuvscaler -h for help, or man yuvscaler
    MPlayer dev-CVS-050123-19:55-3.3 (C) 2000-2005 MPlayer Team
    Mac OSX static build for ffmpegX
    AltiVec found
    CPU: PowerPC
    Using Unoptimized OnScreenDisplay
    Using Darwin accurate timing
    Terminal type `unknown' is not defined.
    get_path('input.conf') -> '/Users/mark/.mplayer/input.conf'
    Parsing input config file /Users/mark/.mplayer/input.conf
    Input config file /Users/mark/.mplayer/input.conf parsed: 2 binds
    get_path('MarksMovie.avi.conf') -> '/Users/mark/.mplayer/MarksMovie.avi.conf'
    Playing /Volumes/PAL/MarksMovie.avi.
    [file] File size is 734834688 bytes
    STREAM: [file] /Volumes/PAL/MarksMovie.avi
    STREAM: Description: File
    STREAM: Author: Albeu
    STREAM: Comment: based on the code from ??? (probably Arpi)
    AVI file format detected.
    list_end=0x22D6
    ======= AVI Header =======
    us/frame: 40000 (fps=25.000)
    max bytes/sec: 0
    padding: 0
    MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
    frames total: 113216 initial: 0
    streams: 2
    Suggested BufferSize: 0
    Size: 608 x 336
    ==========================
    list_end=0x1138
    ==> Found video stream: 0
    ====== STREAM Header =====
    Type: sdiv FCC: divx (64697678)
    Flags: 0
    Priority: 0 Language: 0
    InitialFrames: 0
    Rate: 25/1 = 25.000
    Start: 0 Len: 113216
    Suggested BufferSize: 51218
    Quality 10000
    Sample size: 0
    ==========================
    found 'bih', 108 bytes of 40
    ======= VIDEO Format ======
    biSize 40
    biWidth 608
    biHeight 336
    biPlanes 1
    biBitCount 24
    biCompression 1145656920='DIVX'
    biSizeImage 612864
    ===========================
    Regenerating keyframe table for MPEG4 video
    list_end=0x21CA
    ==> Found audio stream: 1
    ====== STREAM Header =====
    Type: sdua FCC: (0)
    Flags: 0
    Priority: 0 Language: 0
    InitialFrames: 1
    Rate: 48000/1152 = 41.667
    Start: 0 Len: 188693
    Suggested BufferSize: 960
    Quality -1
    Sample size: 0
    ==========================
    found 'wf', 30 bytes of 18
    ======= WAVE Format =======
    Format Tag: 85 (0x55)
    Channels: 2
    Samplerate: 48000
    avg byte/sec: 16989
    Block align: 1152
    bits/sample: 0
    cbSize: 12
    mp3.wID=256
    mp3.fdwFlags=0x2000000
    mp3.nBlockSize=38657
    mp3.nFramesPerBlock=256
    mp3.nCodecDelay=0
    ===========================
    list_end=0x22D6
    AVI: dmlh found (size=248) (total_frames=113216)
    list_end=0x22FA
    hdr=Software size=15
    Software : Nandub v1.0rc2
    list_end=0x2B82F5B4
    Found movie at 0x280C - 0x2B82F5B4
    Reading INDEX block, 301909 chunks for 113216 frames (fpos=0x0)
    AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x18C)
    Auto-selected AVI audio ID = 1
    Auto-selected AVI video ID = 0
    AVI: Searching for audio stream (id:1)
    AVI video size=650376659 (113216) audio size=77144256 (188693)
    VIDEO: [DIVX] 608x336 24bpp 25.000 fps 1148.9 kbps (140.2 kbyte/s)
    [V] filefmt:3 fourcc:0x44495658 size:608x336 fps:25.00 ftime:=0.0400
    Clip info:
    Software: Nandub v1.0rc2
    SUB: Detected subtitle file format: subviewer
    SUB: opened iconv descriptor.
    SUB: closed iconv descriptor.
    SUB: Read 54 subtitles.
    SUB: added subtitle file (1): /Volumes/PAL/MarksMovie.srt
    get_path('sub/') -> '/Users/mark/.mplayer/sub/'
    SUB: Detected subtitle file format: subviewer
    SUB: opened iconv descriptor.
    SUB: closed iconv descriptor.
    SUB: Read 54 subtitles.
    SUB: added subtitle file (2): /Volumes/PAL/MarksMovie.srt
    ================================================== ========================
    Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
    dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
    mp3lib: using generic C decore!
    MP3lib: init layer2&3 finished, tables done
    MPEG 1.0, Layer III, 48000 Hz 128 kbit Joint-Stereo, BPF: 384
    Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
    AUDIO: 48000 Hz, 2 ch, 16 bit (0x8), ratio: 16000->192000 (128.0 kbit)
    Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
    ================================================== ========================
    Using (default) progressive frame mode.============================================= =============================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    INFO: libavcodec init OK!
    Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
    ================================================== ========================
    Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
    [libaf] Adding filter dummy
    [dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000008 and bps = 2
    AF_pre: af format: 2 bps, 2 ch, 48000 hz, big-endian 16-bit signed int
    AF_pre: 48000Hz 2ch big-endian 16-bit signed int
    [AO PCM] File: audiodump.wav (WAVE)
    PCM: Samplerate: 48000Hz Channels: Stereo Format s16le
    [AO PCM] Info: fastest dumping is achieved with -vc dummy -vo null
    PCM: Info: to write WAVE files use -waveheader (default).
    AO: [pcm] 48000Hz 2ch little-endian 16-bit signed int (2 bps)
    AO: Description: RAW PCM/WAVE file writer audio output
    AO: Author: Atmosfear
    Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
    [dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000008 and bps = 2
    [libaf] Adding filter format
    [format] Changing sample format from big-endian 16-bit signed int to little-endian 16-bit signed int
    [format] Accelerated endianess conversion only
    [dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000008 and bps = 2
    [format] Changing sample format from big-endian 16-bit signed int to little-endian 16-bit signed int
    [format] Accelerated endianess conversion only
    Starting playback...
    [libaf] Reallocating memory in module format, old len = 0, new len = 65540
    [ffmpeg] aspect_ratio: 1.809524
    VDec: vo config request - 608 x 336 (preferred csp: Planar YV12)
    Trying filter chain: vo
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 1.81:1 - prescaling to correct movie aspect.
    VO Config (608x336->608x336,flags=0,'MPlayer',0x32315659)
    VO: [yuv4mpeg] 608x336 => 608x336 Planar YV12
    VO: Description: yuv4mpeg output for mjpegtools
    VO: Author: Robert Kesterson <robertk@robertk.com>
    *** [vo] Allocating (slices) mp_image_t, 608x336x12bpp YUV planar, 306432 bytes
    INFO: [yuvscaler] SVCD output format requested in PAL/SECAM norm
    INFO: [yuvscaler] input: frame size: 608x336 pixels (306432 bytes)
    INFO: [yuvscaler] input: frame rate: 25/1 fps (~25.000000)
    INFO: [yuvscaler] input: interlace: none/progressive
    INFO: [yuvscaler] input: sample aspect ratio: ?
    INFO: [yuvscaler] from 608x336, take 608x336+0+0, NOT_INTERLACED/PROGRESSIVE
    INFO: [yuvscaler] scale to 720x360, 720x480 being displayed, NOT_INTERLACED/PROGRESSIVE
    INFO: [yuvscaler] Scaling uses the BICUBIC algorithm,
    INFO: [yuvscaler] without line switching
    INFO: [yuvscaler] without time forwarding
    INFO: [yuvscaler] Without luminance correction
    INFO: [yuvscaler] Without chrominance correction
    INFO: [yuvscaler] black lines: 60 above and 60 under
    INFO: [yuvscaler] black columns: 0 left and 0 right
    INFO: [yuvscaler] frame rate: 25.000 fps
    INFO: [yuvscaler] Scaling ratio for width is 38 to 45
    INFO: [yuvscaler] and is 14 to 15 for height
    INFO: [mpeg2enc] Selecting SVCD output profile
    Unicode font: 242 glyphs.
    INFO: [mpeg2enc] Assuming norm PAL
    ++ WARN: [mpeg2enc] Specified display frame-rate 29.97 will over-ride
    ++ WARN: [mpeg2enc] (different!) frame-rate 25.00 of the input stream
    ++ WARN: [mpeg2enc] Generating dummy SVCD scan-data offsets to be filled in by "vcdimager"
    INFO: [mpeg2enc] Encoding MPEG-2 video to /Volumes/PAL/MarksMovie.avi.ff.mpv
    INFO: [mpeg2enc] Horizontal size: 720 pel
    INFO: [mpeg2enc] Vertical size: 480 pel
    INFO: [mpeg2enc] Aspect ratio code: 2 = 4:3 display
    INFO: [mpeg2enc] Frame rate code: 4 = 30000.0/1001.0 (NTSC VIDEO)
    INFO: [mpeg2enc] Bitrate: 4000 KBit/s
    INFO: [mpeg2enc] Quality factor: 3 (Quantisation = 3) (1=best, 31=worst)
    INFO: [mpeg2enc] Field order for input: none/progressive
    INFO: [mpeg2enc] New Sequence every 9999 Mbytes
    INFO: [mpeg2enc] Assuming non-video stream of 260 Kbps
    INFO: [mpeg2enc] Search radius: 16
    INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 15
    INFO: [mpeg2enc] Setting colour/gamma parameters to "PAL B/G"
    INFO: [mpeg2enc] Progressive format frames = 0
    INFO: [mpeg2enc] Using default unmodified quantization matrices
    INFO: [mpeg2enc] Buffering 39 frames
    INFO: [yuvscaler] output: frame size: 720x480 pixels (518400 bytes)
    INFO: [yuvscaler] output: frame rate: 25/1 fps (~25.000000)
    INFO: [yuvscaler] output: interlace: none/progressive
    INFO: [yuvscaler] output: sample aspect ratio: ?
    XXX initial v_pts=0.000 a_pos=7680 (0.452)
    *** [vo] Allocating (slices) mp_image_t, 608x336x12bpp YUV planar, 306432 bytes
    INFO: [mpeg2enc] SETTING AltiVec for QUANTIZER!
    INFO: [mpeg2enc] SETTING AltiVec for MOTION!
    INFO: [mpeg2enc] SETTING AltiVec for TRANSFORM!
    INFO: [mpeg2enc] SETTING AltiVec for PREDICTION!
    B quant=4.38 total act=2840911.8
    1 B quant=4.33 total act=2841578.0
    0330
    9.7
    d 71668 I quant=4.61 total act=9089949.8
    ds_fill_buffer: EOF reached (stream: video)
    EOF code: 1
    Uninit audio filters...
    [libaf] Removing filter dummy
    [libaf] Removing filter format
    uninit audio: mp3lib
    uninit video: ffmpeg
    INFO: [yuvscaler] End of stream!
    INFO: [yuvscaler] Normal exit: end of stream with frame number 113217!
    Exiting... (End of file)
    INFO: [mpeg2enc] Guesstimated final muxed size = 1856238463
    wait, encoding to mp2 audio with mp2enc...
    INFO: Opened WAV file, freq = 48000 Hz, channels = 2, bits = 16
    Could not create "/Volumes/PAL/MarksMovie.avi.ff".
    INFO: format = 0x1, audio length = 869466112 bytes
    INFO: [mplex] mplex version 2.2.2 ($Date: 2003/05/13 20:27:15 $)
    INFO: [mplex] File /Volumes/PAL/MarksMovie.avi.ff.mpv looks like an MPEG Video stream.
    **ERROR: [mplex] Unable to open file /Volumes/PAL/MarksMovie.avi.ff.mpa for reading.

  2. Try instead "DVD ffmpeg" so as that your subtitles will be selectable and not burned-in the movie. Enabling or disabling "Decode with Quicktime" may affect quality of audio sync when converting framerate. You may try with a short clip first so as to spot any issues before the long encoding.

  3. Thanks Major,

    Of course that worked. I have been using sizzle so much (to add chapters and menus) that I forgot about using the ffmpeg option with selectable subtitles. Although I do want to add my vote to have some way to do DVD chapters in ffmpegx (and maybe menus)!

    CGuy

  4. I will maybe add DVD chaptering in 0.0.9t.




Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!