View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 18 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Feb 21, 2006 6:52 pm 
Offline
Joined: Wed Feb 02, 2005 4:07 pm
Posts: 141
Any updates on a fix to get the videos working on the V1.1 iPod software? I have read that certain other encoders work fine with this version and was wondering if anyone found the correct tweaks for ffmpeg to get its output to work.

Rob


Top
 Profile  
 
PostPosted: Sat Feb 25, 2006 10:09 pm 
Offline
Joined: Sun Feb 19, 2006 4:08 pm
Posts: 5
Location: WashingtonDC
I just spent the past couple of days trying to get my myth videos correctly transcoded for the 1.1 ipod firmware. I'm happy to say that I finally achieved success today.

Basically, look to the Windows version of Videora iPod Converter to see what you need to have a working myth2ipod on your linux box. If you enable the Debug Console in the Setup section of videora and transcode a file, it will show you all the configure and encode parameters you need for ffmpeg. The CVS version of ffmpeg was worthless for me, I had to grab the gpac source and compiled the ffmpeg that it came with. That's easier said than done as I had to download and compile a whole bunch of other packages just to get ffmpeg to compile with the following configure parameters:
--enable-mp3lame --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --disable-ffplay --enable-small --enable-memalign-hack --enable-gpl --enable-xvid --enable-dts --enable-a52 --disable-vhook --enable-pthread --enable-x264

Once I finally got ffmpeg to compile(had to hack a few source files to point to the correct locations of headers and comment out redundant definitions of LRINTF) I then had to compile and install MP4Box and modify the myth2ipod script to use the following encode options:
"-y -bitexact -vol 256 -vcodec xvid -s 320x240 -b 768 -acodec aac -ac
2 -ab 64" and change the output video to mp4 instead of mov. The last step was to add the MP4Box processing in the myth2ipod script, which I just added to the DoPassTwo subroutine.

This was the biggest pain to get working but it was so worth it.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 26, 2006 12:45 am 
Offline
Joined: Mon Aug 29, 2005 4:04 pm
Posts: 729
Location: Philadelphia, PA US
Quote:
I'm happy to say that I finally achieved success today.

That is awesome!!

Quote:
hack a few source files to point to the correct locations ...

had to compile and install MP4Box...

add the MP4Box processing in the myth2ipod script, which I just added to the DoPassTwo subroutine.


Can you eloborate a litte more on the above hacks, parameters, and steps you used to get working?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 26, 2006 9:16 am 
Offline
Joined: Sun Feb 19, 2006 4:08 pm
Posts: 5
Location: WashingtonDC
Now that I definitely know that it works, I'll try to do it again from the beginning and jot down exactly what I did to get to the final working script. I should point out that my mythbox is running Fedora Core 4 on a P2 350Mhz with a PVR350 and setup via Jarod's howto. The P2 350Mhz spec is the reason that compilation was such a painstaking process.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 27, 2006 12:36 pm 
Offline
Joined: Wed Feb 02, 2005 4:07 pm
Posts: 141
jaybat wrote:
Now that I definitely know that it works, I'll try to do it again from the beginning and jot down exactly what I did to get to the final working script. I should point out that my mythbox is running Fedora Core 4 on a P2 350Mhz with a PVR350 and setup via Jarod's howto. The P2 350Mhz spec is the reason that compilation was such a painstaking process.


I am confused, did you recompile ffmpeg because you are running Fedore Core? Does that mean that if I have ffmpeg running on my system I don't need to recompile it?

Also, more details on the MP4box would be appreciated? Why did you need it? Where you get it, does it have to be compiled? Just the basics :D

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 27, 2006 4:40 pm 
Offline
Joined: Sun Feb 19, 2006 4:08 pm
Posts: 5
Location: WashingtonDC
So here's the current status:
I just got it recompiled again but this time it was a lot smoother because all the prerequisite libraries had already been installed and, unfortunately, I can't remember them all. I'm affraid posting my exact procedures from the second time won't be as helpful for when you may come up across the various compilation and linking errors I got the first time around. If someone would like to take a stab at it and take good notes along the way here is what you need to know:

some prerequisites that I remember:
x264 - ftp://ftp.videolan.org/pub/videolan/x26 ... 45.tar.bz2
libdts - http://debian.unnet.nl/pub/videolan/lib ... 0.2.tar.gz
lame-3.97 - http://internap.dl.sourceforge.net/sour ... 7b2.tar.gz

sources for ffmpeg compilation
gpac - http://internap.dl.sourceforge.net/sour ... rc2.tar.gz
gpac extra libs - http://internap.dl.sourceforge.net/sour ... 4.0.tar.gz
amrwb_float - http://www.3gpp.org/ftp/Specs/archive/2 ... 04-510.zip
amr_float - http://www.3gpp.org/ftp/Specs/latest/Re ... 04-540.zip


copy the contents of gpac_extra_libs into the gpac/extra_lib directory
in the gpac/extra_lib/ffmpeg directory, then do:
./configure --enable-mp3lame --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --disable-ffplay --enable-small --enable-memalign-hack --enable-gpl --enable-xvid --enable-dts --enable-a52 --disable-vhook --enable-pthreads --enable-x264 --disable-ffserver
and try to get it to compile. if you get success, go to the gpac/applications directory and remove references to osmozilla
in the gpac directory, "chmod +x configure", "./configure", "make apps" (to build MP4Box), "make install"

if you get to this point and have a working ffmpeg and MP4Box, change the encode options in myth2ipod to be just like Videora:
-y -bitexact -vol 256 -vcodec xvid -s 320x240 -b 768 -acodec aac -ac 2 -ab 64

and change the file type to mp4 instead of mov
The the last step is to process the file with MP4Box. I just had this done after the second pass of ffmpeg.

----
rteichman wrote:
I am confused, did you recompile ffmpeg because you are running Fedore Core? Does that mean that if I have ffmpeg running on my system I don't need to recompile it?

Also, more details on the MP4box would be appreciated? Why did you need it? Where you get it, does it have to be compiled? Just the basics :D

Thanks


I recompiled ffmpeg because the version I had, and the version in CVS didn't have the goodies in it to transcode with the same options that Videora's version(for Windows) was using. Since Videora's transcodes worked for firmware 1.1, I figured building ffmpeg in linux with the same configuration would give me the same results on my myth box.

If your version of ffmpeg can transcode a nuv file with the options:
-y -bitexact -vol 256 -vcodec xvid -s 320x240 -b 768 -acodec aac -ac 2 -ab 64
and produce an mp4 file, then you don't have to recompile ffmpeg.

From what I've gathered from http://gpac.sourceforge.net/auth_mp4box.php, MP4Box simply makes sure that the mpeg file(both video and audio stream) is IsoMedia compliant.

Again, I gathered all of this from viewing the debug console on Videora Ipod Converter. I just wished they had provided a version for linux so I didn't have to do all this crap. And if someone shows me a link showing they already do, I'm going to punch myself in the face.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 27, 2006 4:59 pm 
Offline
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location: Ontario, CA
It looks like for Knoppmyth this may be a little easier. I was playing with it last night, and will update with knoppmyth instructions when I can get a clean working install. Thanks posting this.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 28, 2006 1:04 am 
Offline
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location: Ontario, CA
I did some more fooling around and have a solution that works 1/2 the time. What I mean is, it produces an mp4 file for the 1.1 firmware that plays perfectly. However, it does not work on all my recorded programs. Odd. Here is what I did: (for debian and knoppmyth users)

Code:
check current ffmpeg version:
ffmpeg --version

ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice Bellard
  built on Oct 18 2005 17:26:48, gcc: 3.3.5 (Debian 1:3.3.5-12)

nano /etc/apt/sources.list

uncomment

#deb-src http://ftp.us.debian.org/debian stable main contrib non-free
apt-get update

now get the newer version and anything it needs:
apt-get install ffmpeg

check version again: (note, no xvid)
ffmpeg --version

ffmpeg version CVS, build 3276800, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --build i486-linux-gnu --enable-gpl --enable-pp --enable-zlib --enable-vorbis --enable-libogg --enable-theora --enable-a52 --enable-dts --enable-dc1394 --enable-libgsm --disable-debug --prefix=/usr
  built on Jan 21 2006 18:16:11, gcc: 4.0.3 20060115 (prerelease) (Debian 4.0.2-7)

cd /tmp
apt-get source ffmpeg

cd ffmpeg-0.cvs20050313
./configure --build i686-linux-gnu --enable-gpl --enable-pp --enable-zlib --enable-mp3lame --enable-vorbis --enable-libogg --enable-theora --enable-a52 --enable-dts --enable-libgsm --enable-xvid --enable-faac --disable-debug --prefix=/usr
make
make install

check version again, and xvid should now be there.
ffmpeg --version

ffmpeg version 0.4.9-pre1, build 4747, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --build i686-linux-gnu --enable-gpl --enable-pp --enable-zlib --enable-vorbis --enable-libogg --enable-theora --enable-a52 --enable-dts --enable-libgsm --enable-xvid --enable-faac --disable-debug --prefix=/usr
  built on Feb 27 2006 21:39:40, gcc: 3.3.5 (Debian 1:3.3.5-12)

all done.

now something like this should create a firmware 1.1 compatible file assuming ffmpeg can read the input file.

ffmpeg -i /myth/tv/1004_20060226141604.mpg -y -bitexact -vcodec xvid -s 320x240 -b 768 -acodec aac -ac 2 -ab 64 -f mp4 ~/test.mp4

Mine are .19 recorded files, and only some of them work. My cards are PVR 250's and 150. It works with some recording but not others. Some 150's and some 250's all with the same recording profile. Some livetv some full recording. If someone can figure out why it is not working with everything, then we should be on to something.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 28, 2006 3:30 am 
Offline
Joined: Sun Feb 19, 2006 4:08 pm
Posts: 5
Location: WashingtonDC
I just upgraded to .19 last night and I don't believe I have any new recordings to transcode yet so I'll have to wait a little bit to see if it's still working for me. Did you by any chance run MP4Box on those suckers?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 28, 2006 8:11 am 
Offline
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location: Ontario, CA
according to you post you ran MP4Box after the final step in transcodding. This was no needed in my tests. The files that did successfully encode, worked fine. There was also far fewer dependences. Anything newer than build 4747 was giving me greif. The ffmpeg in gpac would not compile to do missing doc's or something, and the CVS just won't compile with XVID. Though I think that is the key though. Getting a newer version to compile with xvid and faac, and lame is pretty much all you need to encode a working file. I did try changing my source list to testing, and used apt to get a january ffmpeg. It was configured with everything and then some, but also would not read all the recorded programs. I am pretty sure all my recordings profiles are the same, but I will look at that this evening to see if maybe that is the cause. If so, then knoppmyth/debian users should just have to change a line in sources.list and apt the newer version from testing, and the new encoding lines should work.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 02, 2006 3:05 am 
Offline
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location: Ontario, CA
Finally got it. Though using nuvexport, but it works, and is very easy to do. This may work from R5A22 on, but I know it will work with the next Knoppmyth release based on MythTV .19.

First make sure you are up and running with Knoppmyth. Then:
Code:
nano /etc/apt/sources.list
and un-comment:
Code:
deb-src http://ftp.us.debian.org/debian stable main contrib non-free
Save it, and update:
Code:
ctrl-o
ctrl-x
apt-get update
now get the newer ffmpeg and everything it needs:
Code:
apt-get -v install ffmpeg
make sure your version is something like "version 0.4.9-pre1, build 4747" then get the source and build dependencies:
Code:
cd /tmp
apt-get build-dep ffmpeg
apt-get source ffmpeg
cd ffmpeg-0.cvs20050313
Then configure, make, and install:
Code:
./configure --build i486-linux-gnu --enable-gpl --enable-pp --enable-zlib --enable-vorbis --enable-libogg --enable-theora --enable-a52 --enable-dts --enable-libgsm --disable-debug --enable-xvid --enable-faac --prefix=/usr
make
make install
When done, check your version:
Code:
ffmpeg --version
Xvid and FAAC should be there.
Now you need to modify the iPod.pm file for nuvexport to use the right settings. I only changed a couple of items to get it to work for me.
Code:
nano /usr/local/share/nuvexport/export/ffmpeg/iPod.pm
First comment out these 3 lines:
Code:
if (!$self->can_encode('mov')) {
push @{$self->{'errors'}}, "Your ffmpeg installation doesn't support encoding to mov file formats.";
}
Then change all occurrences of mov to mp4:
Code:
Line 146: ." -f mov -title $safe_title";
Line 175: ." -f mov -title $safe_title";
Line 178: $self->SUPER::export($episode, '.mov');

Save it, and run nuvexport. Select Export to iPod #10. When it asks to use variable video bitrate, I said no and then left is at the default 384. Everything else I just hit enter to accept the defaults other than the path to save the file. This has worked on PVRx50 recordings that ffmpeg alone fails to handle. I still don't know why, but it works. What I need now is another patch to the myth2ipod script to use nuvexport. This method is not as fast at encoding as straight ffmpeg, but it has its advantages, as it actually works, and with little effort to get it running.

UPDATE: Looking more at nuvexport, and its --debug switch, I was able to see how it does what it does. I will experiment with this, but it looks like it's ffmpeg output lines can be substituted into the myth2ipod script. Whoohooo, 1.1 is staying on my iPod...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 02, 2006 6:21 am 
Offline
Joined: Sun Feb 19, 2006 4:08 pm
Posts: 5
Location: WashingtonDC
Well, my recordings from .19 still appear to work on my iPod 1.1, however, it's been taking so long to transcode the files that I think that it's really interfering with my commercial flagging jobs. My poor mythbox with its p2 350 can't handle all the work.

My solution: move the actual transcoding process to my much faster windows box. Don't worry, wifi, I'm still appreciating your myth2ipod script as it's still the brains of the whole operation while the windows box does all the grunt work of transcoding.

In case anyone was interested, what I did was modify the myth2ipod script so that it no longer does the actual transcoding but instead performs the following:
1. Copy nuv file from myth box to windows via smbfs mount
2. Create a unique dos batch file with transcode instructions for the recording
3. Create the xml file on mounted windows directory (but with an xm extension)

The created batch file does the following:
1. transcode the nuv file using the videora distribution of ffmpeg
2. once transcoding is complete, renames the xm file to an xml so that the feed file can recognize see it when the transcoding is complete and make it immediately available to the podcast
3. delete itself, so that it doesn't run anymore

The last component is another batch file that looks for and runs all batch files(to transcode the recordings). This file repeatedly calls itself every 30 seconds to see if there are any new batch files created by the modified myth2ipod.

I now realize there are several ways I could have gone about this, including possibly porting it all to cygwin or asking the wife to let me buy a speedy new computer to replace "the bedroom tivo" on but this was the first thing that came to mind and it makes it so that I don't have to worry about ever recompiling ffmpeg again(the guys at videora can take care of it). That and not having to ask the wife to let me buy a new computer. I've already seen a quadrupling of available transcoded files since implementing this last night.

I'm with wififun, 1.1 is staying.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 02, 2006 1:29 pm 
Offline
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location: Ontario, CA
One more update: it looks like MP4box is still needed. Damn, but it is easy to deal with, thanks to jaybat's help and instructions above. This applies to Knoppmyth, and should follow my ffmpeg instructions above. On my clean Knoppmyth box, I worked through those steps to get ffmpeg running, then do the following to setup MP4box:
Code:
cd tmp
wget http://internap.dl.sourceforge.net/sourceforge/gpac/gpac-0.4.0-rc2.tar.gz
wget http://internap.dl.sourceforge.net/sourceforge/gpac/gpac_extra_libs-0.4.0.tar.gz
tar -zxf gpac-0.4.0-rc2.tar.gz
tar -zxf  gpac_extra_libs-0.4.0.tar.gz
cd gpac_extra_libs
cp -r * ../gpac/extra_libs
cd /tmp/gpac
chmod +x configure
make lib
make apps
make install
check to make sure it is there:
Code:
/usr/local/bin/MP4Box
Now take one of the output files from nuvexport and do a little MP4Box magic on it:
Code:
/usr/local/bin/MP4Box -add inputfile.mp4 outputfile.mp4
That should do it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 8:50 am 
Offline
Joined: Wed Feb 02, 2005 4:07 pm
Posts: 141
wififun,
I sent you a private message about a couple suggestions. However I want to again thank you for all the work you did. I watch several episodes of "The Daily Show" during my train ride in today. All recorded with your latest script and played back on my V1.1 iPod. THANKS! :D


Top
 Profile  
 
PostPosted: Sun Apr 02, 2006 9:19 pm 
Offline
Joined: Mon Oct 10, 2005 2:00 pm
Posts: 29
I am having trouble getting the latest myth2ipod (downloaded last night) to transcode with audio. I ran myth2ipod manually passing it the directory and file as arguments. Everything looked good during the transcode. No errors reported.

I tried to play the resulting mp4 file with MPlayer on my Debian box. Video came up, played a bit, stuttered around then froze on a frame after a few seconds. No audio. The console window I started MPlayer from was displaying a massive amount of errors from FAAD.

I moved the mp4 file over to a Windows box and started up iTunes. It was able to play the video of the file perfectly - no stuttering or stopping - but no audio. I only tried playing about the first five minutes worth, and then canceled. I did not try downloading the file to and iPod.

On the plus side, compression was pretty impressive! From a 2.5Gb original MythTV mpg file (created by a PVR-150) down to a 200+Mb mp4 file.

Here are the specific versions of things installed on my system. Is there something obviously wrong that anyone can see? Thanks in advance for any suggestions on how to procede.
Code:
ffmpeg.cvs20060220
gpac-0.4.0-rc2
gpac_extra_libs-0.4.0
iPod_from_myth2ipod_1.0b2.pm
ivtv-0.4.4
lame-3.96.1
MPlayer-1.0pre7try2
myth2ipod_1.0b2.txt
mythplugins-0.19
mythtv-0.19
nuvexport-0.3
pvr_1.18.21.22254_inf.zip
pvr_2.0.24.23035.zip
x264-snapshot-20060221-2245
xvidcore-1.1.0

Code:
$ ffmpeg --version
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-mp3lame --enable-libogg --enable-vorbis --enable-faac --enable-xvid --enable-gpl --enable-x264
  libavutil version: 49.0.0
  libavcodec version: 51.7.0
  libavformat version: 50.3.0
  built on Feb 21 2006 16:51:44, gcc: 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu