VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    I'm trying to convert RMVB file to MP4. I was finally able to get ffmpegx to not freeze every time I tried to put the RMVB as the input thanks to looking through a bunch of old topics on this forum. The problem now is that, no matter what I'm trying to convert it to, the progress bar stays full and the summary will be filled with "Skipping frame!" that goes on and on until I cancel the encoding. I'm using the mencoder presets, so I really have no clue as to what could be causing this.

    I'm on OSX 10.4.11, Intel Core 2 Duo, 1GB RAM.
    Quote Quote  
  2. The infinite progress bar is due to a limitation of ffmpegX when converting Realmedia files. This is perfectly normal. If you want addtional informations about the encoding progress of a realmedia file, you may check the "Open a terminal window" option in the "ffmpegX" menu.

    As for the "skipping frame" error, this may be caused by an inccorrect "framerate" parameter (i.e output fps different from input fps). Try to switch between 24, 25 and 30 fps and see what happens.
    Quote Quote  
  3. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    I tried switching the framerate to 30 and 25, but that caused it to fill with "1 Duplicate Frame" all the way down. I then switched it to 24 (which I'm fairly sure it was at in the first place), and the weird thing is that it is no longer getting that error, but immediately popped up with 5 "1 Duplicate Frames" of its own. Now it has about nine. I think I'll see if it will finish converting it and see what it's like. At least I now know that the filled bar is normal.

    Thanks for your help so far.

    EDIT: Well, it finished. Unfortunately, the output file was "1.264" instead of "1.MP4" for some reason, and even after renaming it, still doesn't open in Quicktime.

    RE-EDIT: Tried it with AVI, too, and it made an unplayable file. I'm beginning to think that ffmpegx just doesn't like me.
    Quote Quote  
  4. Originally Posted by Crimian
    I tried switching the framerate to 30 and 25, but that caused it to fill with "1 Duplicate Frame" all the way down. I then switched it to 24 (which I'm fairly sure it was at in the first place), and the weird thing is that it is no longer getting that error, but immediately popped up with 5 "1 Duplicate Frames" of its own. Now it has about nine.
    Duplicate frames happen on a regular basis (1 / sec) when the source file has a lower fps than the output. Sometimes during a conversion, there a some random duplicate frames (most of the time at the beginning of a file as you mentioned). I don't know what is causing this (broken frames ? small changes in the source framerate ?) but this has no impact on the output quality as long as their quantity remains very low.


    EDIT: Well, it finished. Unfortunately, the output file was "1.264" instead of "1.MP4" for some reason, and even after renaming it, still doesn't open in Quicktime.
    This means that ffmpegX didn't success in multiplexing (i.e joining) the video and the audio part for some reason. The .264 file is a video only track (raw H264 track, without .MP4 container) which is not recognized by Quicktime but can be opened in VLC.
    -> any error message at the end of the encoding process (like "audio conversion failure" or something like that) ?
    -> is your .rmvb a video only file ?
    -> is the .rmvb file using a very low audio sample rate (11 Khz for example) ?

    I have a few tricks in order to deal with these problems but they require additionnal command line usage through the Terminal (not difficult though). Are you still interested ?
    Quote Quote  
  5. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    1) any error message at the end of the encoding process (like "audio conversion failure" or something like that) ?

    The weird thing is that it immediately shows up in the destination as "1.264" instead of "1.MP4". This is what shows up after it is done encoding:

    Encoding started on Sun Dec 2 15:52:19 EST 2007
    MEncoder dev-CVS-060307-04:23-4.0.1 (C) 2000-2006 MPlayer Team
    Mac OSX static build for ffmpegX
    FIXME:Hardenabling SSE and SSE2 without detection
    CPU: Intel (Family: 6, Stepping: 6)
    CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
    success: format: 0 data: 0x0 - 0x49fc0f5
    REAL file format detected.
    Stream description: Video Stream
    Stream mimetype: video/x-pn-realvideo
    Stream description: Audio Stream
    Stream mimetype: audio/x-pn-realaudio
    Stream mimetype: logical-fileinfo
    VIDEO: [RV40] 704x400 24bpp 23.000 fps 0.0 kbps ( 0.0 kbyte/s)
    [V] filefmt:11 fourcc:0x30345652 size:704x400 fps:23.00 ftime:=0.0435
    Opening video filter: [expand osd=1]
    Error: dlopen(/Library/Application Support/ffmpegX/reallib/drvc.so, 1): no suitable image found. Did find:
    /Library/Application Support/ffmpegX/reallib/drvc.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00
    Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    Opening video filter: [scale w=704 h=400]
    Opening video filter: [pp=0x33]
    Opening video filter: [harddup]
    ================================================== ========================
    Opening video decoder: [realvid] RealVideo decoder
    Read the RealVideo section of the DOCS!
    VDecoder init failed
    Opening video decoder: [realvid] RealVideo decoder
    Read the RealVideo section of the DOCS!
    VDecoder init failed
    Error: dlopen(/Library/Application Support/ffmpegX/reallib/drv4.so.6.0, 1): image not found
    ideo decoder
    Read the RealVideo section of the DOCS!
    VDecoder init failed
    Opening video decoder: [realvid] RealVideo decoder
    Selected video codec: [rv40mac] vfm: realvid (Mac OS X RealPlayer 9 RV40 decoder)
    ================================================== ========================
    VDec: vo config request - 704 x 400 (preferred colorspace: Planar I420)
    [PP] Using external postprocessing filter, max q = 6.
    VDec: using Planar I420 as output csp (no 0)
    Movie-Aspect is 1.76:1 - prescaling to correct movie aspect.
    SwScaler: using unscaled Planar YV12 -> Planar YV12 special converter
    x264 [info]: no need for a SAR
    x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    1 duplicate frame(s)!
    Flushing video frames
    Video stream: 413.716 kbit/s (51714 B/s) size: 71103061 bytes 1374.917 secs 32939 frames
    slice I:492 Avg QP:22.03 size: 11865
    x264 [info]: slice P:32473 Avg QP:22.12 size: 2004
    x264 [info]: mb I I16..4: 53.4% 0.0% 46.6%
    x264 [info]: mb P I16..4: 6.5% 0.0% 2.5% P16..4: 19.3% 7.0% 1.2% 0.0% 0.0% skip:63.5%
    x264 [info]: final ratefactor: 16.48
    x264 [info]: kb/s:412.7
    usage: movtoway -o output.wav movie.mov

    2) is your .rmvb a video only file ?

    Nope. Audio and video.

    3) is the .rmvb file using a very low audio sample rate (11 Khz for example) ?

    Nope. 44.1 Khz.

    Thanks helping me.
    Quote Quote  
  6. Originally Posted by Crimian
    I then switched it to 24 (which I'm fairly sure it was at in the first place), and the weird thing is that it is no longer getting that error, but immediately popped up with 5 "1 Duplicate Frames" of its own. Now it has about nine.
    Stream mimetype: logical-fileinfo
    VIDEO: [RV40] 704x400 24bpp 23.000 fps 0.0 kbps ( 0.0 kbyte/s)
    [V] filefmt:11 fourcc:0x30345652 size:704x400 fps:23.00 ftime:=0.0
    Just as I thought : ffmpegX was detecting a 23 fps video instead of 24 fps. This was probably because the very firts seconds of the clip were at 23 fps (hence the 5 "duplicate frames" completing the few missing frames at the beginning of the movie when you manually set 24 fps). During your first attempts, after dropping the clip on the main window, ffmpegX automatically set the output to 23 fps (hence the "numerous skipped frames" corresponding to each dropped 24th frame).


    I have a few tricks in order to deal with these problems but they require additionnal command line usage through the Terminal (not difficult though). Are you still interested ?
    As for achieving your conversion. This is a multi-step process. Lets consider you already have your complete .264 file.


    A - Converting the audio track to PCM .wav with mplayer (note that this is a very useful command as it works with any file recognized by mplayer)
    1/ Find your mplayer binary in Application Support/ffmpegX
    2/ Open a terminal window
    3/ Drop mplayer on the terminal window (you should see the filepath to mplayer)
    4/ Drop your .rm (or .rmvb) file on the terminal window (you should see the filepath to the video)
    5/ Complete the command with the following italic parameters "-vo null -ao pcm"
    Your final command should look something like this :
    Code:
    /Library/Application\ Support/ffmpegX/mplayer /Users/jpschuck/Desktop/video.rm -vo null -ao pcm
    (-vo null disables video output, -ao pcm enables uncompressed PCM .wav conversion)
    6/ Hit return and wait for the conversion to end
    7/ The converted audio track is in your home folder ; append .wav to the filename if needed


    B - Converting the audio track from .wav to AAC .mp4
    1/ Do the conversion with your favourite audio converter (iTunes, Quicktime, ffmpegX, Max…)
    2/ Manually re-set the file extension to .mp4 (in case the file is named .m4a)

    C - Multiplexing video and audio with MP4box
    1/ Locate your ffmpegX application
    2/ Right-click (or control-click) on ffmpegX and choose "Show package content"
    3/ Go to Contents > Resources and locate mp4box
    4/ Open a terminal window
    5/ Drop mp4box on the terminal window
    6/ Type "-add" followed by a space, then drop your video .264 file
    7/ Remove (delete) the last space, then type "#video" followed by a space
    8/ Type "-add" followed by a space, then drop your audio .mp4 file
    9/ Remove (delete) the last space, then type "#audio" followed by a space
    10/ Type "-fps" followed by a space, then enter the framerate number of your video (usually one of the following : 23.976 , 25 or 29.97, don't forget to use stops instead of commas) - this will prevent some synchronization problems
    11/ Type another space
    12/ Type the desired name for your output movie (for example : video_out.mp4)
    13// At this stage, the complete commande should look like this :
    Code:
    /Applications/ffmpegX.app/Contents/Resources/mp4box -add /Users/jpschuck/Desktop/video.264#video -add /Users/jpschuck/Desktop/audio.mp4#audio -fps 23.976 output_video.mp4
    14/ Hit return and wait for the multiplexing process to be achieved
    15/ Your completed .mp4 file is in your Home folder
    Quote Quote  
  7. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    Okay, I managed to do the first two, but the commands for MP4Box just bring up the help shortcuts when I hit return. I've tried it a few different times, just to make sure I didn't screw it up the first time. Any thoughts?

    EDIT: Figured out that I had to type "-add file", not just "-add". After that, though, it tells me this:

    Cannot open destination file /Users/Crimian/Movies/Death Note/1.264: Invalid IsoMedia File

    My exact command was this:

    "/Applications/ffmpegX.app/Contents/Resources/mp4box -add file /Users/Crimian/Movies/Death\ Note/1.264 #video -add file /Users/Crimian/audiodump.mp4 #audio -fps 23.976 Death1.mp4"
    Quote Quote  
  8. Originally Posted by Crimian
    Okay, I managed to do the first two, but the commands for MP4Box just bring up the help shortcuts when I hit return. I've tried it a few different times, just to make sure I didn't screw it up the first time. Any thoughts?

    EDIT: Figured out that I had to type "-add file", not just "-add".
    No. I remember the help shortcuts mention something about "-add file". But "file" is just a generic term.

    After that, though, it tells me this:

    Cannot open destination file /Users/Crimian/Movies/Death Note/1.264: Invalid IsoMedia File

    My exact command was this:

    "/Applications/ffmpegX.app/Contents/Resources/mp4box -add file /Users/Crimian/Movies/Death\ Note/1.264 #video -add file /Users/Crimian/audiodump.mp4 #audio -fps 23.976 Death1.mp4"
    You don't have to type any space between 1.264 and #video, and between audiodump.mp4 and #audio. The #audio and #video attributes must be directly appended to the source path (i.e. audiodump.mp4#audio).

    Code:
    /Applications/ffmpegX.app/Contents/Resources/mp4box -add file /Users/Crimian/Movies/Death\ Note/1.264#video -add file /Users/Crimian/audiodump.mp4#audio -fps 23.976 Death1.mp4
    EDIT : My mistake, I forgot to mention that you must use the backspace/delete key in order to remove the space that is automatically added when you drop a file on the terminal window (steps C-7 and C-9).
    Quote Quote  
  9. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    Now I'm getting this:

    /Applications/ffmpegX.app/Contents/Resources/mp4box -add file /Users/Crimian/Movies/Death\ Note/1.264#video -add file /Users/Crimian/audiodump.mp4#audio -fps 23.976 death1.mp4
    Error - 2 input names specified, please check usage

    Thanks again for being willing to answer all of these questions. I would've given up a long time ago if I had to figure most of this out for myself.
    Quote Quote  
  10. Originally Posted by Crimian
    Now I'm getting this:

    /Applications/ffmpegX.app/Contents/Resources/mp4box -add file /Users/Crimian/Movies/Death\ Note/1.264#video -add file /Users/Crimian/audiodump.mp4#audio -fps 23.976 death1.mp4


    Thanks again for being willing to answer all of these questions. I would've given up a long time ago if I had to figure most of this out for myself.
    I assume my precedent post wasn't clear enough You don't have to type "-add file" but just "-add". In mp4box help, "file" was just a generic term meaning that you have to drop at this place (or type its complete filepath) the file you want to process.

    When you type "-add file blabla.mp4", mp4box understands that you want him to process two files with the same command (-add) : a file named "file" and a file named "blabla.mp4". MP4box doesn't like that : it accepts one - and one only - input file for each "-add" instruction. That's why it throws at you the "Error - 2 input names specified, please check usage".
    Quote Quote  
  11. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    Because I really can't say it enough, thanks for being so patient.

    The interweaving worked this time, but unfortunately the video goes away after the first five seconds and the audio goes on. I'm guessing that that might have something to do with the first five "duplicate frames" that pop up at the very start of the ffmpegx encoding. I'm probably way off, though. Any clue as to how I might be able to get ffmpegx to do the entire video?

    EDIT: Solved it myself, this time. I redid the original file in ffmpegx, but left the setting at 23FPS instead of fixing it. I didn't have high hopes from the fact that it had "skipping frame" all the way down, but the interweaving made a perfect file this time. Thank you so much for all of your help!
    Quote Quote  
  12. Originally Posted by Crimian
    Because I really can't say it enough, thanks for being so patient.

    The interweaving worked this time, but unfortunately the video goes away after the first five seconds and the audio goes on. I'm guessing that that might have something to do with the first five "duplicate frames" that pop up at the very start of the ffmpegx encoding. I'm probably way off, though. Any clue as to how I might be able to get ffmpegx to do the entire video?
    Does the RMVB play fine using the Preview button in ffmpegX ?
    Does the RMVB play fine using Real Player ?


    Anyway we can also try to convert it using the "very hard way" (i.e. more Terminal and Command Line)

    A - Installing mplayer and checking if the file is playable
    1/ Go to the MPlayer Headquarter and download the latest Mplayer for MacOSX (I mean the application with a GUI, not the binary for ffmpegX)
    2/ Download the latest Real Codec Binary Package for your platform PowerPC (MacOS X PPC) or Intel (MacOS X x86)
    3/ Install both Mplayer for OS X and the Codec package. The Codec package is a self-extracting installer that will put the all the needed files in the system folder (/usr/bin, or something like that)
    4/ Check if your Real Media file plays fine in mplayer OS X. If not, I'm affraid that there will be no solution.

    B - Converting the Real Media file to a raw video file (this is the video pendant of the technique described in my precedent post to convert any audio file recognized by mplayer, this can also prove very useful to convert .wmv/ .asf files)
    1/ Locate Mplayer for OS X
    2/ Right-click (or control-click) on the application and choose "show package content"
    3/ Go to Contents > Resources > External Binaries
    4/ Choose the right mplayer for your platform (mplayer_intel for Intel based Macs ; mplayer_ppc for G4 or G5 : mplayer_noaltivec for G3)
    5/ Right-click (or control-click) once more on the element and choose "show package content"
    6/ This time, go to Contents > MacOS ; you will see the mplayer binary that we will use for the conversion.
    7/ Open a terminal window and drop on it the mplayer binary that you found step 6
    8/ Drop the video file you want to convert
    9/ Type "-ao null -vo yuv4mpeg" folllowed by a space
    10/ Type "-fps" followed by a space, then type the framerate number of your video (usually 23.976 , 25 or 29.97 ; mplayer is international : it doesn't matter if you use stops or commas) ; this step is not mandatory but can prevent some synchronization issues in case of variable framerate videos
    11/ Your final command should look something like this
    Code:
    /Applications/MPlayer\ OSX.app/Contents/Resources/External_Binaries/mplayer_intel.app/Contents/MacOS/mplayer -ao null -vo yuv4mpeg -fps 23.976
    11/ Hit return and wait for the conversion to succeed. This will eat a lot of disk space, typically twice as much as a DV file of the same duration. Conversion is pretty fast as it just involves a decompression process (no recompression)
    12/ Your output file (stream.yuv) is in your home folder. Check with mplayer if this file is readable (please note that raw .yuv files doesn't have any index so you can't jump to any part of the movie)

    Note that the entire step B can be done with the mplayer binary used by ffmpegX (i.e. without step A). However, the method I suggest is able to convert a wider range of videos as the binary for ffmpegX is quite old compared to the one included with Mplayer for OS X

    C - Converting the raw file to h264 .mp4
    1/ Simply use ffmpegX to convert the .yuv file to .mp4. Keep that in mind :
    - you may have to manually set the size (in pixels) of your output (usually the same as the input, you can check this with RealPlayer or in the Terminal window during step B)
    - you may have to manually set the fps of your output (usually the same as the input)
    - you may have to manually set the bitrate of your video (~1100 kbps is a good choice for a 704x400 anime)
    - you have to disable audio conversion (of course : the .yuv file is a video only file)
    - the progress bar in ffmpegX won't reflect the actual progression

    2/ Once all this is done, and assuming you already have converted the audio part to mp4 (see my precedent post), you can multiplex the video and the audio in a new file with mp4box.
    Quote Quote  
  13. Member
    Join Date
    Dec 2007
    Location
    United States
    Search Comp PM
    O_O Um, thanks, but I got it to work by having ffmpegx make the .264 at 23FPS instead of 23.976FPS.

    I've seen you in a whole lot of other topics on these boards, and you're always trying to help. The world really needs more patient, helpful people like you, lol.
    Quote Quote  
  14. Member
    Join Date
    Jan 2008
    Location
    United Kingdom
    Search Comp PM
    Hi, I followed everything in this forum and managed to successfully convert my .rmvb file to .mp4, which is great.
    the problem is that my ipod cannot play the file, which is really strange.

    these are the details of the file:
    video: h264, 320x240, 29.000 fps
    audio: aac, 44100 Hz, stereo

    i will be extremely grateful if anyone can help,

    thanks
    Quote Quote  



Similar Threads

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