SMC video format e200v2

I found a “shortcut” that can save a lot of time with “difficult” conversions. I redid my second test movie, the one with the ac3 audio stream. I loaded the source directly into WinFF. I created a new preset with exactly the same line suggested by themichael, but I added “-async 1” at the end. As per the documentation, this option tells ffmpeg to “stretch/squeeze” the audio stream to match the timestamps. The parameter is the maximum samples per second by which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction.

As expected, when I ran my avi through WinFF with this preset, ffmpeg gave a lot of errors but it completed the job. I ran the output through SMC. The result is that the video and audio streams are in sync.The only minor problem is that the audio has minor glitches: once or twice per minute, you hear a very short “missing sound”. This imperfection is very tolerable in my opinion (much more so than the out of sync audio I’ve been trying to resolve since I acquired my e260v2.) In my first post above, I gave a procedure to get perfect audio, but it is a lot more work than the shortcut I just described.

A final word on the “-async 1” option. If you find that your audio is a bit out of sync, you might want to create another preset with “-async 2” instead and rerun your conversion in WinFF. This will spread the corrections more evenly throughout the avi and it might be just what you need to get more consistent tracking.

Just another quick update. I converted another avi with an ac3 audio stream. In WinFF, I used the preset with “-async 2” at the end. The ffmpeg log was 100% clean. The result is perfect sound (no glitches, perfectly synchonized with video). I guess this means a couple of things:

  1. ac3 audio streams can convert just as well as cbr mp3 streams with this procedure.

  2. Some avi’s are “dirty” and do not convert as cleanly as others. In this case, unless you take several steps to doctor the audio stream and ensure proper synchronization, the “quick procedure” can produce a very good result with minor audio glitches.

Another update… The following procedure has been giving consistently perfect results with large avi files (movies) on my Windows XP SP2 computer.

  1. Download and install AviDemux from here: Avidemux download

  2. Open the avi file in Avidemux and accept any suggestion to “fix” the avi. It may offer to unpack packed bitstreams, rebuild a frame index or something else: just accept it. It usually takes about one to two minutes to do its maintenance. Then, on the left side, make sure Video and Audio are set to “Copy” and Format is set to “AVI, unpack VOP.” See the image below. Press “Ctrl S” to save the video. It will take about 5 minutes to complete the job.

Avidemux

  1. Create a preset in WinFF as described by themichael and process the avi as fixed by Avidemux. It will take about 40 minutes on a dual core 3 GHz computer (your mileage may vary). Watch the DOS window: it should be very clean, with no error messages, like this:

ffmpeg

4.Run the output of the WinFF job through Sansa Media Converter to transfer it to your Sansa e200v.

For me, this is the end of “out of sync” videos.

So i went into WinFF and edited the Presets to put the command line in from themichaels post, however, i think i might have entered it in wrong, and could use some help in regards to getting winff setup to convert the avi which avidemux processed w/out any hitches (didnt even offer to fix the file when i loaded it)

You’re not telling us much about your problems…

In WinFF, to create the preset, choose Edit/Presets in the menu. Fill in the data as below, making sure to copy and paste the whole command line given by themichael above.

Click Add/Update and then Save.

On the main screen,on the Convert to… line, choose Sansa and then the preset you just added. Also click the Add button to add your source file in the top part. Press Convert.

winff error winff convert errorOk, im trying to post a pic of the conversion error but I cant seem to get the insert/edit image option to work on this page…all im entering is image url, description, and alignment, do i have to fill everything else out to post it?

All you really need is the image url, don’t bother with the rest. The url has to be an image hosting service (free) like ImageShack.

http://picasaweb.google.com/lh/photo/pswnxS5AcF7rqK8ZEV4OKw?authkey=Gv1sRgCPTb_-uKtfL6Ng&feat=directlink

thats the command box error i get after trying to convert

Can you change your preset line to this and try again:

-r 20 -vcodec mpeg4 -vtag DX50 -s 224x176 -aspect 1.273  -b 700k -qmin 3 -qmax 5 -mbd 2 -bf 2 -aic 2 -cmp 2 -subcmp 2 -bf 0 -acodec libmp3lame -ar 44100 -ab 128k -ac 2

I simply removed “-flags +4mv+trell” because FFmpeg seems to have a problem with it. You have another issue with the frame rate but I hope FFmpeg will resolve it ifyou get it to start.

http://picasaweb.google.com/lh/photo/ki8IZnpYja7cWxTY-dD9Hw?authkey=Gv1sRgCPTb_-uKtfL6Ng&feat=directlink

and

http://picasaweb.google.com/lh/photo/a_CKlmCARjzi0oyNjkiM7w?authkey=Gv1sRgCPTb_-uKtfL6Ng&feat=directlink

one is using the raw avi straight into Winff, the other is using the raw avi sent through Avidemux, then that file sent through Winff, neither works…

You did not change your preset command line like I suggested in the message just above…

You’re right, i didnt, I thought i had changed it, maybe it didnt update, so i just ran it again as a new preset

http://picasaweb.google.com/lh/photo/YdMxO57fA6FI2bJxvpZcFQ?authkey=Gv1sRgCPTb_-uKtfL6Ng&feat=directlink

the file still seems unfinished though, its filetype is FILE

You get an audio decoding error that possibly stops the process before it is completed. There could be something wrong with your source’s audio. Do you hear a glitch on the source?

The bottom line is that I can’t really tell you how to fix this. You can Google the lame message you get at the end and see what people say about it. I did and I did not really find a simple answer.

Sorry…

Thanks for lookin into it though, much appreciated. Could just be an old cruddy avi that im using. im going to try it with some other newer files and see, my main goal is to be able to convert my digital copies (that come with the blurays) to a propper format to watch them on the fuze.

Good luck on those. Others have posted they’ve tried to convert these and haven’t had much success, but of course ‘your mileage may vary’. :wink:

Ok, so as a test, I followed your instructions from Re: Can’t Convert Movies From DVDs?

1.) Rip .vob files from DVD with DVDFab HD Decrypter (free).

2.) Merge .vob files with (what else?) VOBMerge (also free).

3.) Convert merged .vob files to .avi with WinFF (free again).

4.) Final conversion & transfer to player or memory card with SMC (yep, free too).

5.) Enjoy the show!

ran this on a dvd short student film i had just to see if it would all work right, and sure enough it did. so now im going to try it on a larger file, but my concern is that in the end i will end up with an improperly decrypted video that wont play on the fuze, again, but since ive had luck with this last smaller video, i’ll try it again. As for now i have set aside trying to get the “digital copies” to play, too much of a headache for someone whos no guru at this stuff yet. Again, thanks for your guidance with these issues.

Thanks for the suggestions.  I converted a video and the sound is now syncronized!  The one problem I can’t figure out is how to prevent widescreen video from being stretched to fullscreen.  I would rather add black bars to the top and bottom so the video doesn’t look stretched.  I looked up the ffmpeg documentation, and found the ‘-padtop’ and ‘-padbottom’ options, but I don’t know what size to use for the bars.  Is there any way to automatically pad the video so that the original aspect ratio is preserved?

Thanks!

Andy

PS. I also had to remove the “-flags +4mv+trell” option to get it to work. 

If video res is 640/480 change -aspect in your preset line. (-aspect 1.333) or video is 640/272 -aspect 2.353

Thanks for the reply, but this didn’t seem to do anything.  I tried changing the -aspect to the appropriate ratio and the output was unchanged.  What exactly is the -aspect tag supposed to do?  Removing it had no obvious effect on the output.

I did manage to fix my problem, however, by figuring out what the proper dimensions of the movie should be to fit my player.  So for example I started with a movie that was 704x304, which shrinks to approximately 224x97.  Apparently the padding needs to be in multiples of 2 pixels, so I used 38 pixels for the top and bottom, leaving 100 pixels for the movie (slightly stretched but not really noticeable). So in the end I had:

-r 20 -vcodec mpeg4 -vtag DX50 -s 224x100 -padtop 38 -padbottom 38 -b 700k -qmin 3 -qmax 5 -mbd 2 -bf 2 -aic 2 -cmp 2 -subcmp 2 -bf 0 -acodec libmp3lame -ar 44100 -ab 128k -ac 2

Andy

I just wanted to post a thanks for the info provided here. I’d been having occasional frustrating audio/video lag problems and simply running the files through AVIDEMUX then SMC or MediaConverter 3 completely solved the problems.

Cudos!