iAudiophile.net Forums


Go Back   iAudiophile.net Forums > Flash-Memory Players > iAudio 7

Post New Thread  Reply
 
Thread Tools Display Modes
Old 08-13-2007, 09:15   #1
takayuki
Junior Member
 
Join Date: Aug 2007
Posts: 6
Default i7remux -- video converter for COWON iAUDIO 7

Hello, I wrote a small tool for iAUDIO enthusiasts. I hope you like it.

from README:
i7remux -- video converter for COWON iAUDIO 7 (and other products)

***WARNING***
USE THIS SOFTWARE COMPLETELY AT YOUR OWN RISK. ALTHOUGH I MADE EVERY EFFORT
TO MAKE THIS SOFTWARE USEFUL, IT POTENTIALLY CAUSES SERIOUS DAMAGE TO YOUR
MP3 PLAYERS. THIS SOFTWARE IS PROVIDED AS IS WITHOUT ANY WARRANTIES.

1. What is i7remux?

I7remux is a video converter for COWON iAUDIO 7. While it was developed for
iAUDIO 7, it may be used for other COWON's products with video playback such
as iAUDIO U3. In fact, i7remux is greatly inspired by MaxSt's work, U3Video,
which is a similar tool for iAUDIO U3.

Note that i7remux is NOT a real video converter. Rather, i7remux is a tool to
tweak AVI files which other prevailing video converters made, and playback
them on iAUDIO 7. The current goal is to fix some subtle problems in the AVI
files created by FFmpeg and MEncoder for iAUDIO 7.


2. What are "problems" in AVI files?

Basically, iAUDIO 7 playbacks very usual AVI files (Xvid video and MP3 audio).
Although there are some restrictions on fps or bitrates, it is an easy task to
convert other video formats into such an AVI format using video converters
you can find on the Internet. However, video files they produce are usually
NOT playable on iAUDIO 7 or other COWON's products. In other words, there are
some more "restrictions" in AVI files their products can correctly playback.
I7remux tries fix or relieve such restrictions.


3. Why not jetAudio?

JetAudio is a relatively large and comprehensive audio utility provided by
COWON and has ability to produce iAUDIO 7 compatible video files. It nicely
works, however, there are some unfavorable shortcomings; (1) JetAudio has
fewer adjustable parameters in its video conversion. (2) JetAudio puts small
"COWON" logo in the beginning of its video output. (3) JetAudio creates
video files which make unpleasant random noise on playback. (4) JetAudio ex-
clusively runs in Windows. All of them are never preferable "features" to me.


4. System Requirements

I7remux is a tool for Unix-like environment. And, today's average UNIX systems
mush have sufficient tools to compile i7remux. I guess many of you want to use
it on your Windows, but unfortunately I do not have enough resources to prepare
Windows version. If you port this to Windows or even other operation systems,
please contact me. I will merge your efforts into my source code.


5. Install

I7remux is a usual free software. I hope everything works fine.

$ ./configure
$ make
$ su
# make install


6. Usage

First of all, you have to prepare a sophisticated video converter and make
AVI files which roughly satisfies iAUDIO 7. Even though, as I mentioned above,
I wrote i7remux using FFmpeg and MEncoder, i7remux should be able to treat
with any output of other converters. If you have tried, send me the results.
Your tries will uncover many hidden bugs in i7remux :-)

6.1 Step 1: Create initial AVI files

In the user's manual, you can find that iAUDIO 7 requires AVI video files to
be encoded in the following setting.

Video: Xvid 1-pass, 256-384kbps, 160x128, 15 fps
Audio: MP3 128kbps CBR

The sample configuration below will satisfy the requirements and I am actually
using them with those options.

FFmpeg:
$ ffmpeg -i <input> -f avi -g 1 -b 256k -r 12 -s 160x128 -vtag XVID \
-vcodec libxvid -ab 128k -ar 44100 -ac 2 -acodec libmp3lame <output>

MEncoder:
$ mencoder -ofps 12 -vf scale=160:128 -ovc xvid -xvidencopts \
bitrate=384:max_bframes=0:max_key_interval=1 \
-oac mp3lame -lameopts cbr,br=128 -of avi -o <output> <input>

6.2 Step 2: Remux AVI for iAUDIO 7

Once you have gotten an AVI file using video converters such as FFmpeg and
MEncoder, i7remux dose the final work for you. Note that input files to
i7remux were originally output files from the above video converters.

$ i7remux <input> <output>

There are some options available. You can list them as usual. The -x option
may be relevant to the noise problem I mentioned above. JetAudio splits
a frame of MP3 stream at arbitrary position to store them in AVI chunks.
I suspect that such discontinuous frames increase the processor load of iAUDIO
and make random noise while decoding MP3 stream. In default, i7remux saves
boundary of MP3 frames. But, the -x option simulates jetAudio if you like.

$ i7remux -h
usage: i7remux [-dhvxyV] [[-i] <input avi>] [[-o] <output avi>]
-d dry run (read input, but do not actually write output)
-v verbose (useful with -d to parse and verify input)
-x ignore MP3 frame boundary (simulate jetAudio; NOT recommended)
-y overwrite output
-h print this message
-V print version


7. Copyright

This software is provided under so-called "as is" condition. You can do
anything you like with this software as long as you follow GNU Public License
version 2. I avoided the newer version of GPL intentionally, but you are
allowed to apply version 3 (or any later version) to your products derived
from this software. See the COPYING file included in the source package.


8. Link

U3 Video Converter (simple, drag-and-drop)
http://www.iaudiophile.net/forums/sh...ad.php?t=12808

FFmpeg
http://ffmpeg.mplayerhq.hu/

MPlayer and MEncoder
http://www.mplayerhq.hu/design7/news.html
Attached Files
File Type: zip i7remux-0.1.zip (92.3 KB, 20 views)
takayuki is offline View takayuki's Photo Album   Reply With Quote
Thanks from:

Advertisement [Remove Advertisement]

Old 08-13-2007, 09:25   #2
b0ng0
Member
 
Join Date: Jul 2007
Posts: 80
Default

Interesting program. This might sound stupid, but what does it actually do - just convert videos to avi?

I was also wondering why you have the bitrate set to 256 and frame rate set to 12 (in your ffmpeg command)? On such a small screen I would have thought you would want the best quality possible and most frames. Also, is there any benefit to using Xvid in ffmpeg? Why not use mpeg4 for example? None of these are criticisms (I haven't had a chance to try it out yet), i'm just curious
b0ng0 is offline View b0ng0's Photo Album   Reply With Quote
Old 08-13-2007, 10:51   #3
takayuki
Junior Member
 
Join Date: Aug 2007
Posts: 6
Default

Quote:
Originally Posted by b0ng0 View Post
Interesting program. This might sound stupid, but what does it actually do - just convert videos to avi?
Thanks a lot. I7remux is in fact an AVI-to-AVI converter. It just rearranges the internal structure of a given AVI file and rebuilds indices.

Quote:
Originally Posted by b0ng0 View Post
I was also wondering why you have the bitrate set to 256 and frame rate set to 12 (in your ffmpeg command)?
You are right. I mistakenly copied and pasted an old trial. 384bps and 15 fps also work fine.

Quote:
Originally Posted by b0ng0 View Post
Also, is there any benefit to using Xvid in ffmpeg? Why not use mpeg4 for example?
That's just because ffmpeg was the easiest way to use Xvid in my laptop. And, to be honest, I did not know other encoders.
Is that mpeg4 an encoder with various MPEG4 video codecs?
takayuki is offline View takayuki's Photo Album   Reply With Quote
Old 08-13-2007, 11:05   #4
b0ng0
Member
 
Join Date: Jul 2007
Posts: 80
Default

Well when I have been using ffmpeg to convert videos my friend said he used -vcodec mpeg4 to convert files for his D2 and to be honest I didn't know what the code was for XVid ;-). All i used was -vcodec mpeg4 and it seemed to work.

Btw what does -vtag XVID \ do? When I was converting before I didn't use the -vtag option.

Thanks.

Edit: What does MEncoder do?
b0ng0 is offline View b0ng0's Photo Album   Reply With Quote
Old 08-13-2007, 16:30   #5
MaxSt
Very Senior Member
 
MaxSt's Avatar
 
Join Date: Jun 2006
Posts: 1,047
Default

If your OS is Windows, you can just use U3video.

It will work on i7.
MaxSt is offline View MaxSt's Photo Album   Reply With Quote
Old 08-14-2007, 00:09   #6
takayuki
Junior Member
 
Join Date: Aug 2007
Posts: 6
Default

Quote:
Originally Posted by MaxSt View Post
If your OS is Windows, you can just use U3video.

It will work on i7.
I don't use Windows in my daily life. That's why I wrote a tool for Unix environment. Besides, there were at least two reasons why I needed to write new one.

(1) While U3remux, which you posted in the above thread, was available even in my laptop running NetBSD, U3remux did not work well when it read outputs of the recent version of ffmpeg; it made silent videos. All audio chunks (01wb) were empty! I did not find the source of the problem, but I suspected that it failed to calculate the new size of audio chunk.

(2) I wanted to try different strategies upon audio stream reconstruction. JetAudio segments MP3 stream in neary equal sized chunks ignoring MP3 frame boundary. But, my iAUDIO 7 makes random noise on playing such video files. I7remux (in default) saves MP3 frame boundaries which are originally saved by ffmpeg or mencoder. For now, it solves the problem. The option -x of i7remux switchs two strategies.
takayuki is offline View takayuki's Photo Album   Reply With Quote
Old 08-15-2007, 06:44   #7
b0ng0
Member
 
Join Date: Jul 2007
Posts: 80
Default

Ok, I have tried just using the ffmpeg command to create converted files but the i7 does not seem to want to play them.. I have used the following commands when converting:

ffmpeg -i "filename" -r 15 -s 160x128 -b 384 -vcodec xvid -ab 128 -acodec mp3 "output"

I have also tried using -vcodec mpeg4 but it still does not play the file. The file I have been testing plays when converted with jetAudio and is an avi file. Can you say as to why these options might not work? What settings have you used in ffmpeg and have worked when playing on your i7?

Thanks
b0ng0 is offline View b0ng0's Photo Album   Reply With Quote
Old 08-15-2007, 09:50   #8
takayuki
Junior Member
 
Join Date: Aug 2007
Posts: 6
Default

Quote:
Originally Posted by b0ng0 View Post
Ok, I have tried just using the ffmpeg command to create converted files but the i7 does not seem to want to play them.. I have used the following commands when converting:

ffmpeg -i "filename" -r 15 -s 160x128 -b 384 -vcodec xvid -ab 128 -acodec mp3 "output"

I have also tried using -vcodec mpeg4 but it still does not play the file. The file I have been testing plays when converted with jetAudio and is an avi file. Can you say as to why these options might not work? What settings have you used in ffmpeg and have worked when playing on your i7?

Thanks
Since iAUDIO 7 does not support MPEG4 in contrast to D2, video encoded with 'mpeg4' are never accepted.

The critical options you are missing are '-g 1' and '-vtag XVID'. Because i7 requires videos made of I-frames only, '-g 1' is essential. Also, because i7 requires 'XVID' codec, not 'xvid', you need to fix it in AVI header using '-vtag XVID'. MEncoder uses 'XVID' by default.

I also recommend using a little less aggressive setting while testing the first a few samples; 12 fps, 256k bps, etc. Try first, for example,

ffmpeg -i "filename" -g 1 -r 12 -s 160x128 -b 256 -vtag XVID -vcodec xvid -ab 128 -ar 44100 -ch 2 -acodec mp3 "output"

And, dont' forget to run i7remux on the output of ffmpeg :-)

P.S. ffmpeg might have changed the forms of its options; I have to use 'libmp3lame' instead of 'mp3', and '256k' and '128k' instead of '256' and '128' in the current version.
takayuki is offline View takayuki's Photo Album   Reply With Quote
Old 08-15-2007, 11:35   #9
MaxSt
Very Senior Member
 
MaxSt's Avatar
 
Join Date: Jun 2006
Posts: 1,047
Default

Quote:
Originally Posted by takayuki View Post
Because i7 requires videos made of I-frames only, '-g 1' is essential.
Is it really? I use max_key_interval=8 in mencoder, and it plays fine on U3.

Can you try this example on i7?
MaxSt is offline View MaxSt's Photo Album   Reply With Quote
Old 08-16-2007, 05:28   #10
takayuki
Junior Member
 
Join Date: Aug 2007
Posts: 6
Default

Quote:
Originally Posted by MaxSt View Post
Is it really? I use max_key_interval=8 in mencoder, and it plays fine on U3.
You are absolutely right. I7 also plays your sample video as well.

I don't remember when I had a wrong idea, but i7 certainly accepts GOP size > 1, except that it takes a little while to refresh screen after fast-forward. In theory, however, it can be solved using flags (to indicate key frames) in idx1 as long as the decoder knows about them. Do you have any idea?

Thank you.
takayuki is offline View takayuki's Photo Album   Reply With Quote
Old 08-16-2007, 15:45   #11
MaxSt
Very Senior Member
 
MaxSt's Avatar
 
Join Date: Jun 2006
Posts: 1,047
Default

It's hard even to make fast-forward work in that case...
MaxSt is offline View MaxSt's Photo Album   Reply With Quote
Old 09-01-2007, 20:43   #12
tvphil
Junior Member
 
Join Date: Aug 2007
Location: Evanston, Illinois, USA
Posts: 10
Default

It would help me and many others, if you could copy and paste a command line you have used for the last step, involving i7 remux. That way, we would only have to change the file name to get it to work properly. I keep getting syntax errors in the terminal or I create a text file when using i7 remux. Obviously, I'm not typing something correctly in the command.
tvphil is offline View tvphil's Photo Album   Reply With Quote
Old 09-05-2007, 00:31   #13
tvphil
Junior Member
 
Join Date: Aug 2007
Location: Evanston, Illinois, USA
Posts: 10
Default

Never mind, I figured it out. It was so simple, I'm embarrassed!
tvphil is offline View tvphil's Photo Album   Reply With Quote
Old 01-08-2008, 11:22   #14
obi-nine
(i)ntegral n1nj4
 
Join Date: Jan 2008
Posts: 2
Help video noise

Thanks for this program!

After re-compiling ffmpeg with xvid support and converting a movie, and then using i7remux the movie will play but there is an incredible amount of noise (particularly on black). I remuxed it with the -x option and that didn't seem to make any difference. It plays fine (without discernable noise) on my workstation, however.

The exact commands I used were:

ffmpeg -i Movie.avi -f avi -g 1 -b 384k -r 15 -s 160x128 -vtag XVID -vcodec xvid -ab 128k -ar 44100 -ac 2 -acodec mp3 MovieI7.avi

and then:

i7remux -x MovieI7.avi Moviei7-final.avi

Can you think of anything else I can try to tweak to remove the noise?

I have an 8gb I7 with the 1.15 firmware.

thanks,

obi-nine
obi-nine is offline View obi-nine's Photo Album   Reply With Quote
Old 04-02-2008, 15:51   #15
slebourdon
Junior Member
 
Join Date: Apr 2008
Posts: 1
Default

Quote:
Originally Posted by obi-nine View Post
Thanks for this program!

Can you think of anything else I can try to tweak to remove the noise?

obi-nine
Hello,

have you try the mencoder operation on your file, you don't mention it ? or try to use a lower compression with ffmpeg ?

Tanks a lot for this tutorial and the application.

Works like a charm on ubuntu gutsy gibbon with iaudio7 16GB, after a ffmpeg compilation (xvid support need it).
https://wiki.ubuntu.com/ffmpeg

Count.zero
slebourdon is offline View slebourdon's Photo Album   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 23:31.



Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.


Copyright © 2006-2014 CrowdGather |  About iAudiophile |  Advertisers | Investors | Legal | Contact