video without SMC - first success + tutorial for linux and windows

Big thanks for the tutorial. Converted one test file and it works great. This really opens up a whole new world for me to use sansa fuze, since I don’t have windows and thus haven’t used the video playback before :slight_smile:

@ewelot wrote:

Tutorial on

How to create video for the Sansa Fuze without using SMC.

(version 1.0)

 

 

1. Fuze video format specifications

AVI Container

  • legacy index is beeing ignored by the Fuze

 

 

 

One question comes to my mind after reading this: If the legacy index is ignored by the Fuze, why is ‘create legacy index’ turned on?

If I understand it right, the fuze needs open-dml muxing with special parameters. In other forums I read, that mencoder by default uses open-dml output. Is this correct? And if so, what are the problematic muxing parameters that cannot be fulfilled by mencoder?

Although your proposed procedure works very nice (excelent work!), it would be even nicer if mencoder could be used for muxing also.

struct

Linux folks: Here is a bash script to ease video conversion for the Fuze! It does everything in one call from the command line. You don’t need any special setup. Just have mencoder installed and AVI-Mux GUI unpacked. It should run on any Linux distribution.

Installation:

Download my script pvc.sh and save it to disk with unix line endings. Verify file integrity by running

md5sum pvc.sh

which must print the following hash value:

d9b3efdec6a32f1853f59784101d8503  pvc.sh

Install as root in appropriate place, e.g.

install -p pvc.sh /usr/local/bin

Usage examples:

  • show some help for available options (which are rarely used anyway):

pvc.sh -h

  • convert a video file for the Fuze:

pvc.sh anyvideo.mkv file.avi

  • convert chapters 3 to 5 of title 2 from an anamorpic 16:9 DVD:

pvc.sh -x dvd://2:3-5 dvdchapter.avi

  • get youtube video ready for the Fuze (using youtube-dl)

youtube-dl "http://www.youtube.com/watch?v=HvZNg_lv33o"
pvc.sh HvZNg_lv33o.flv sansa.avi

Have fun!

Edit: I had to upload my script to an external location because I couldn’t use the internal message editor to copy the script content. It would be messed up with several smileys added in upon posting. Strange.

Edit: The script has been upgraded to version 1.1 (new link and md5sum).

Message Edited by ewelot on 09-03-2009 10:04 PM

@struct wrote:

One question comes to my mind after reading this: If the legacy index is ignored by the Fuze, why is ‘create legacy index’ turned on?

 

If I understand it right, the fuze needs open-dml muxing with special parameters. In other forums I read, that mencoder by default uses open-dml output. Is this correct? And if so, what are the problematic muxing parameters that cannot be fulfilled by mencoder?

 

Although your proposed procedure works very nice (excelent work!), it would be even nicer if mencoder could be used for muxing also.

 

struct

I’d recommend to keep the legacy index just for compatibility with players/devices other than the Fuze which rely on this index.

Mencoder and almost any other encoding software will write OpenDML indexes on AVI files > 1GB only. No way to force these indexes on smaller files, unfortunately.

@ssorgatem wrote:
avi-mux GUI could be ported. It’s written in c++ I think. First, you should port it to mingw, and when it compiles  in windows with mingw, then i would be able to compile in any unix with winelib. Then, stripping the ui and replacing any resting win32 calls should get rid of the winelib dependency.

It doesn’t seem a very difficult process… but avi-mux GUI pretty large, I don’t know how well commented is it’s code, and it wouldn’t be very funny to do, all of the above.

Or maybe it would be easier to reimplement what avimux-GUI does. My c++ skills are reduced to being able to red *some* code snippets, but maybe there’s some else out there who could be interested in it.

In theory, no, it shouldn’t be hard to port to C on *nix. In practice, maybe not. I found a project page that was started in 2008 where the plan was to port AVI-mux GUI to Linux, but it hadn’t been updated beyond that; there must be a reason they gave up. I’m in no position to complain, though, since I don’t have time to port it myself.

I find it hard to believe that nobody else has written code that does this. I mean, Linux has at least two implementations of almost everything from system commands to entire environments, and I suspect this is also true for open source Windows apps, but only one person has ever written code to let you put an OpenDML index every 4000 frames? Well, besides Sandisk. To be fair, I’m not all that familiar with video specs, so it’s possible that someone has and I’m not searching for the right jargon.

Message Edited by Peach on 08-26-2009 06:07 AM

This thread wins my approval. Very good stuff!

No more faulty, buggy SMC for me!!! No more having to convert Youtube videos to a SMC-supported format, just to convert them again!!!  Well done, bro.  :smileyvery-happy:

Message Edited by halonachos117 on 08-31-2009 08:07 PM

ewelot wrote: 

 

Mencoder and almost any other encoding software will write OpenDML indexes on AVI files > 1GB only. No way to force these indexes on smaller files, unfortunately.

Maybe a feature request to the mplayer team could do the trick?

Tried both the deb installer as well as the universal distribution under Ubuntu 9.04 and I can’t get the deb version to work but running the universal works perfectly!

When I press convert, the terminal flashes up for just a split second and then wine comes up with an error saying that it basically crashed. Great tool though! I’ve been wanting to get video on this thing since I got it a couple months ago!

@bassmannate wrote:

Tried both the deb installer as well as the universal distribution under Ubuntu 9.04 and I can’t get the deb version to work but running the universal works perfectly!

 

When I press convert, the terminal flashes up for just a split second and then wine comes up with an error saying that it basically crashed. Great tool though! I’ve been wanting to get video on this thing since I got it a couple months ago!

Are you talking about video4fuze? It has its own dedicated thread. Maybe you should post there if you want to get help or discuss things related to this GUI application. If you like to report/discuss issues with the underlying applications (mencoder, AVI-Mux GUI) or the command line conversion tool pvc.sh you are welcome to continue posting here, of course.

A new version 1.1 of the P ortable Media Player V ideo C onverter for Linux (pvc.sh) has been uploaded here (md5sum d9b3efdec6a32f1853f59784101d8503). Thanks to Jeff Ammons for his bug report!

For more information read the related post.

Message Edited by ewelot on 09-03-2009 10:17 PM

Great tutorial! With my version of mencoder (dev-SVN-r27637-4.3-openSUSE) the mencoder command will hang indefinitely and a little spelunking has shown that that is because of the -af resample paramer. It turns out, however, that you can do away with resampling (according to the manpage it is default if needed) so taking just -af format=s16le will do the trick.

Regards, Jos.

@vankan wrote:

Great tutorial! With my version of mencoder (dev-SVN-r27637-4.3-openSUSE) the mencoder command will hang indefinitely and a little spelunking has shown that that is because of the -af resample paramer. It turns out, however, that you can do away with resampling (according to the manpage it is default if needed) so taking just -af format=s16le will do the trick.

 

Regards, Jos.

Thanks for your feedback. The resample filter is automatically enabled upon playback only! That means for example if you try to play 48000Hz audio on a 41000Hz sound card mplayer does the necessary conversion by default. On the other hand it you encode audio to a new file - using mencoder in this case - it does apply any conversion upon request only. You see the difference?

In our case where we try to convert video/audio for the fuze it is required to create audio at 44100Hz. At least that is the only accepted value for sample rate which I know of. If the audio stream of your source video is already at 44100Hz then you are fine and could savely skip the resample filter. If the source audio is at 48000Hz then you must apply the ‘-af resample=44100:0:1,format=s16le’ filter.

I’d like you to check your source videos. If you find one having audio sample rate at 48000Hz and therefore needs to be resampled you have two possibilities: The first one is coded in my current pvc.sh shell script and works with my versions of mencoder (Debian Lenny: dev-SVN-r26940, Ubuntu Jaunty:?). The second choice is to replace mencoders resample filter with the lavcresample filter ‘-af lavcresample=44100,format=s16le’. Wonder if that works better for you?

Please let me know.

Yes, I see the difference. Yet the following happened

(mencoder  version dev-SVN-r27637-4.3-openSUSE , openSUSE 11.0)

  vankan@pavilion102:~/video/danielle> file al_desio.avi
al_desio.avi: RIFF (little-endian) data, AVI, 720 x 576, 25.00 fps, video: FFMpeg MPEG-4, audio: Dolby AC3 (stereo, 48000 Hz)

  vankan@pavilion102:~/video/danielle> srcvideo=al_desio.avi
  vankan@pavilion102:~/video/danielle> outfile=al_desio_fuze2.avi
  vankan@pavilion102:~/video/danielle> mencoder -ffourcc DX50 -ofps 20 -vf \ pp=li,expand=:::::224/176,scale=224:176,harddup -ovc lavc -lavcopts \ vcodec=mpeg4:vbitrate=650:vmax_b_frames=0:keyint=15:turbo:vpass=1 -srate 44100 -af </font> format=s16le -oac mp3lame -lameopts cbr:br=128 $srcvideo -o $outfile 

(snip mega output mencoder)

  vankan@pavilion102:~/video/danielle> file al_desio_fuze2.avi
al_desio_fuze2.avi: RIFF (little-endian) data, AVI, 224 x 176, 20.00 fps, video: DivX 5, audio: MPEG-1 Layer 3 (stereo, 44100 Hz)

Curious isn’t it? You’d say it takes the resample frequency from -srate.  BTW taking -af lavcresample=44100,format=s16le also works fine and gives a file of exactly the same size…

Regards,  Jos.

vankan,

thanks for your reply. Curious indeed. Maybe -srate parameter is sufficient. I’ll have a look at this when I’m back from vacation in about 10 days … :smiley:

none of your explanation is comprehensible to a layman. Why does someone have to be a computer genious to use their Sandisk Fuze? why is it so complicated? I am taking mine back for a refund. The sandisk fuze is a waste of money and worse than that, valuable time.

You could try video4fuze, which is intended to be non-computer-savy* proof, but still being usable by people with special needs.

*Like my girlfriend, who has a fuze.

Tutorial is mostly gibberish to most PC users. Downloaded first suggestion but next download stumped me.

“The second part of required software is the AVI-Mux GUI. Get it from the given site and extract/install it.”

The point? Too much time wasted for product use.  Suck It SanDisk!!

Strackify the Ubuntu 9.04 ffmpeg remux with the video to generate OpenDML indexes after audio interleaving between bum cheekery in the Output/AVI file structure with infantile preloaded 0ms and without the initial ffmpeg with stepped in it rate conversions. Easy enough don’t you think?

Strackify the Ubuntu 9.04 ffmpeg remux with the video to generate OpenDML indexes after audio interleaving between bum cheekery in the Output/AVI file structure with infantile preloaded 0ms and without the initial ffmpeg with stepped in it rate conversions. Easy enough don’t you think?