Page 1 of 2
How to Transcode and Stream Avi to Flv With Seeking
Posted:
Sat Feb 06, 2010 10:36 pm
by onewalrus
Yes, it is possible to transcode an avi movie file to flv and stream with seeking.
Note: This is only tested on Firefox, using the external player "
GOM", with file sizes up to 70 MB. Your results with other external players, and file sizes, may differ. If you test this, please include complete and specific details of fail/success.
1. First, read
this excellent tutorial from Mohican. Read the entire thread, and follow all it's instructions and updates.
2. Download flvtool++ from
here and unzip it into Subsonic's "Transcode" folder.
3. Use the following parameters in Subsonic "settings/trancode":
name
- Code: Select all
avi > flv
convert from
- Code: Select all
avi
convert to
- Code: Select all
flv
step 1
- Code: Select all
ffmpeg -re -y -i -ar 44100 -sameq -deinterlace
step 2
- Code: Select all
flvtool++ -nodump -f flv
These transcoding settings will give you an output-file of the same quality/proportions as the original input-file, as indicated by "-sameq" in step-1.
FreeNas / Standalone setup?
Posted:
Sun Feb 14, 2010 11:08 pm
by Enzomatrx
does flvtool++ handle stdin/stdout properly?
I'm trying to take the step 1/step 2 you've provided and apply it to my freenas installation of subsonic but have had no luck so far.
Step 1:
- Code: Select all
ffmpeg -i %s -f flv -y -s 384x240 -ar 44100 -b 192kb -ab 32kb -ac 1 -
Step 2:
- Code: Select all
flvtool++ -nodump - -
Not binary
Posted:
Tue Feb 16, 2010 6:05 pm
by phxchiefs
This tutorial states to download flvtool++ from the link but unfortunately that link location only provides the source code and from the look of it the source code is specifically made to compile in Linux. So unless you can compile in Windows, which is not a simple exercise this tutorial will not work. Has anyone had success compiling in Linux and/or Windows? If so please provide some "guidance" to the process. Thank you.
Posted:
Tue Feb 16, 2010 8:53 pm
by Enzomatrx
I did a pkg_add -r -v flvtool++ on my FreeNAS. I can only imagine on other linux distros it's apt-get or dkpg or whatever it uses.
i tried a combo of flvtool++, flvtool2, etc. and could never get it to transcode to the flash player with seeking.
Posted:
Tue Feb 16, 2010 10:23 pm
by anitract
Since you are using GOM, I take it you did not get this to work with JW Player?
It does seems like flvtool++ does not handle std in and out....unless there is a trick to the transcoder setting that I am missing...
Posted:
Tue Feb 16, 2010 10:29 pm
by phxchiefs
I was going to put Linux on my home box to try this, but if it doesn't work, I think I'd better hold off. I tried to use the flvtool2 from the command line using the example
herebut that only made my computer beeped really loudly until I pushed the power button! The only reason I'm doing this is so that if I'm watching a movie and get disconnected that I don't have to watch it from the beginning again. I think that's a pretty important "feature"! I appreciate the info though.
Posted:
Wed Feb 17, 2010 9:11 pm
by anitract
I am still working on getting flvtool++ and ffmpeg working together to transcode on the fly in subsonic, but it appears that flvtool++ does indeed NOT handle stdin and stdout, which totally blows. Still looking into ways around this....
Posted:
Thu Feb 18, 2010 3:16 am
by phxchiefs
I found something related to what we're trying to do
here. It appears that FLVTOOL2 does support stdin/stdout piping on the Unix platform but not on the Windows platform. It also appears that the newer viral JW player does not work only the classic player. I haven't tried this myself but maybe someone else has?
Posted:
Thu Feb 18, 2010 2:11 pm
by anitract
It's funny you mention that. I found that tool right after I posted yesterday and have been working on implementing it. I can confirm that it does support stdin and stdout. It works correctly via the command line...my issue right now is getting it to work with Subsonic.
step 1: ffmpeg -re -y -i %s -ar 44100 -sameq -deinterlace -f flv -
step 2: flvtool2 -U stdin stdout
....does not work in subsonic, but...
/usr/bin/ffmpeg -re -y -i /path/to/file.avi -ar 44100 -sameq -deinterlace -f flv - | /usr/bin/flvtool2 -U stdin stdout
...works via the command line. Anyone have any ideas? I am thinking of creating a bash script using the single cmd line command noted (obviously modified)....perhaps that will work....
Posted:
Thu Feb 18, 2010 6:56 pm
by anitract
Well that works....sort of. I created a script called avi_to_flv in the transcode directory. Code:
#!/bin/bash
video=$1
/usr/bin/ffmpeg -re -y -i "$video" -ar 44100 -sameq -deinterlace -f flv - | /usr/bin/flvtool2 -U stdin stdout
.....in subsonic transcoding tab, I used:
avi_to_flv %s
What is interesting is that my system processes show both ffmpeg and flvtool2 consuming cpu cycles, meaning they are both working towards injecting the metadata...but...my file seems to take forever to start playing....I realize my ffmpeg call is not downsampling at all, but even testing with a 2mb avi file is practically unusable.
Ideas anyone? If I can't get this working, I am considering making a nightly job to convert video files to flvs with the metadata in place. An advatage to this is definitely speed and having them already encoded to my flv specifications....disadvantage is redundant (sort of) data...
Posted:
Sat Feb 20, 2010 1:56 am
by Enzomatrx
I experienced the same behavior.. both commands seem to run but it does not actually "stream" it in subsonic.
It feels within reach... but no clue how right now
Not able to skip in movie
Posted:
Tue Mar 02, 2010 6:44 pm
by cptnrsk
Posted: Tue Mar 02, 2010 2:10 am Post subject: Tutorial
--------------------------------------------------------------------------------
Hello,
I managed to muck through the process and got everything updated and running on v 3.9 but for some reason when you full screen the video (which runs perfect) you are not able to advance in the film and the progess bar shows no changes, plus on both sides of the player for length and time running, it shows 00:00 00:00
Any thoughts on how to fix this?
On windows 7
Thanks,
Rsk
Re: Not able to skip in movie
Posted:
Thu Mar 04, 2010 10:53 pm
by cptnrsk
cptnrsk wrote:Posted: Tue Mar 02, 2010 2:10 am Post subject: Tutorial
--------------------------------------------------------------------------------
Hello,
I managed to muck through the process and got everything updated and running on v 3.9 but for some reason when you full screen the video (which runs perfect) you are not able to advance in the film and the progess bar shows no changes, plus on both sides of the player for length and time running, it shows 00:00 00:00
Any thoughts on how to fix this?
On windows 7
Thanks,
Rsk
Is the reason I cant advance in a video due to not being able to complile flvtool2 on windows?
I can setup linux dist, just dont want to waste my time if I can get it working here. Win7 is okay but this homegroup shit is for the birds.
Re: Not able to skip in movie
Posted:
Fri Mar 05, 2010 6:40 pm
by cptnrsk
cptnrsk wrote:cptnrsk wrote:Posted: Tue Mar 02, 2010 2:10 am Post subject: Tutorial
--------------------------------------------------------------------------------
Hello,
I managed to muck through the process and got everything updated and running on v 3.9 but for some reason when you full screen the video (which runs perfect) you are not able to advance in the film and the progess bar shows no changes, plus on both sides of the player for length and time running, it shows 00:00 00:00
Any thoughts on how to fix this?
On windows 7
Thanks,
Rsk
Is the reason I cant advance in a video due to not being able to complile flvtool2 on windows?
I can setup linux dist, just dont want to waste my time if I can get it working here. Win7 is okay but this homegroup shit is for the birds.
If I get this fixed im going to donate :0)
What other options are available with the license that arent already available?
I love the program by the way.
Great job!
Big Project for the Time Wealthy
Posted:
Mon Apr 05, 2010 1:42 am
by onewalrus
Most of these transcoding answers may be answered by someone with a lot of time and knowledge, by looking at how open-source software like XMBC and TVersity are structured to transcode/stream. I poked around a bit with them, but don't have the time/stamina for the learning curve needed.