Upon researching how to watch my shows over the web I came across this link:
http://www.mythtv.org/wiki/index.php/Stream_mythtv_recordings_from_mythweb_using_flash_video
Unfortunately the site is more of a blog and contains many short enhancements without a straight forward installation. I have taken all that information, added a few more enhancements (web based encoding / better streaming) and provide all the files for download. Hopefully this page will make it much simpler for everyone out there to watch TV from the web.
Prerequisites
Install
Start by downloading all the files you need right here: mythflash.zip
Now as root…
unzip mythflash.zip
cd mythflash
mv ./* /var/www/mythweb/data or wherever your mythweb directory is located
cd /var/www/mythweb/data
mv mythflash.sh mythexpire.pl /usr/local/bin
chmod 755 /usr/local/bin/mythflash.sh /usr/local/bin/mythexpire.pl
chmod 775 ./recorded this should be a link to the mythtv recordings
Add www-data or apache to mythtv group so it can write to the mythtv data store
chown www-data:www-data * or whichever user runs apache
mv recorded.php ../modules/tv/tmpl/default/ this is for myth .20 default template
ln -s /usr/local/bin/mythexpire.pl /etc/cron.daily/
Next make sure ffmpeg is installed and has mp3lame support, you can check
with ffmpeg –help, you should see enable-mp3lame in there, if not you need to
recompile it with mp3lame support. Just google it.
Lastly is flvtool2, you should be able to apt-get –install flvtool2.
Thats it, now just login to mythweb, check your recorded programs. You can click encode to convert them to flash and once its done it should show up with stream and the magnification level. If you have any problems, post comments!
January 24, 2007 at 1:35 pm
I have gotten the encode button into mythweb. Once you click it it says it is starting to encode. But it never does….. PLus, when you click on the picture it says 1032_20070117210000.mpg does not exist in the recordings directory. Thanks for the help.
Dave.
January 24, 2007 at 2:44 pm
I have updated the streamer.php file in the download to check if the recording directory is writable by the user running apache. You have to make sure apache can write to that directory because it is calling the mythflash.sh script - if it can’t write the output, nothing will happen.
January 24, 2007 at 5:42 pm
This is pretty cool. I had attempted the previous setup via the mythtv wiki, but only succeeded in getting mythflash to work. Your setup is much simpler and the additional functionality of being able to encode on-demand is great.
On the encoding side, I seem to be having the same issue as Dave. The streamer page comes up and says encoding will be done in 30 minutes, but no recording is created (no ffmpeg process is ever started). I think this is permissions issue, as you suggest. I added the apache user to my mythtv group, but didn’t check that they had any write permissions.
I’ll try your new streamer.php file tonight and report back.
One other note - I was able to use your mythflash.sh to manually convert some shows, and they successfully show up on the mythweb UI and can be watched. Very cool!
January 24, 2007 at 6:48 pm
Just added apache to the mythtv group isn’t enough. The store directory is 755, which provides only mythtv the ability to write. You have to make the directory group writable by chmod 775.
January 24, 2007 at 9:07 pm
Hi,
I found a way to get live flash streaming without first encoding the files to flv. It assumes a Knoppmyth Install but minimal extra work would be required to get it going on other distros.
http://knoppmythwiki.org/index.php?page=MythWebFlash
BigB
January 25, 2007 at 2:41 am
Well, I put the new streamer.php file in place, and everything started working. I didn’t change anything else from my previous (broken) configuration. I then put the old streamer.php file back in place, and things were broken again (no encodings would happen when I clicked the “encode” link). Assuming there’s no real functional difference between the two files (except for the error catching that was added), the issue appears to be a permissions issue. Here are the two files (streamer.php is the working version):
-rw-r–r– 1 root root 3618 Jan 24 22:39 streamer.php
-rwxr–r– 1 apache apache 3179 Jan 22 16:28 streamer.php.broken
In my initial install, the apache user took ownership of the broken file when I ran the following:
chown apache:apache * [or whichever user runs apache]
Anyways, things are working now. Thanks alot, Chief - this is really cool!
January 25, 2007 at 11:48 am
I made one other change… I set the mythflash.sh to an absolute path of /usr/local/bin .. before it was just mythflash.sh …
January 26, 2007 at 2:41 am
Yes, the absolute path for mythflash.sh was the root cause for the initial failure. Thanks!
January 27, 2007 at 7:27 am
Great work, chief. I’ve been meaning to get streaming from MythTV working for weeks, and you’ve saved me a lot of time.
Any clues as to how to get 16:9 recordings to display correctly? Should I change the encoding size in the script mythflash.sh? Or should it be handled in the streamer.php?
January 27, 2007 at 9:56 am
Ok…I read the last post of the Wiki as it suggests
http://www.mythtv.org/wiki/index.php/Stream_mythtv_recordings_from_mythweb_using_flash_video#User_Notes_from_Foosinho:
Got my 16:9 recordings playing nicely now…
Anybody else had issues with ffmpeg core dumping with some recordings? I’m recording from DVB-T card.
January 27, 2007 at 10:39 am
Check the mythflash.sh file. Basically mplayer gets the dimensions of the recording, which should be what you set up to record in mythtv. It than cuts it in half to encode it in flv format. You can manually set it to whatever you want by editing mythflash.sh. Again the streamer.php file gets the dimensions from mplayer as well, you can edit that file as well to manually set the dimensions to whatever you wish.
January 27, 2007 at 4:11 pm
I must say this is really nice. I got the wiki version working originally, but I couldn’t resist this. I especially love the ‘encode’ option on the recorded page. Fantastic!
I have one quick question… When watching a stream, how do I lower the play bar so that the controls and such are below the visible stream? I’m finding the bar is obscuring part of the video. Thanks again!
January 27, 2007 at 6:39 pm
Hmmm, .htaccess somehow blocks mythweb from identifying wap. I am trying to set up streaming of .3gp. any ideas? Instead of getting the wap version my phone gets the full html version.
Thanks.
January 27, 2007 at 10:00 pm
Nope, not a problem with htaccess. I guess mythweb has a bug. Created a different user for my phone, and only use it with the phone. This worked.
January 28, 2007 at 2:50 pm
*******Another update********
I added a function to the flash flv player file so the controlbar will fade off the screen after a couple of seconds. Feel free to download and replace the flvplayer.swf file in your data directory with the new one in the zip.
February 1, 2007 at 11:18 am
I have to say, some clever improvements. I won’t be ripping out my hacked version (since it works well for me), but this is definitely cleaner than the hodge-podge there was before.
One caveat - if you use a PVR500 or similar to encode SD video, this solution as is looks like it will use the resolution of the original MPG to determine the resolution of the final FLV. Which works great, as long as your MPG is encoded 4:3. The default settings for my PVR500 were 480×480 (thus the code as I wrote it). It didn’t seem like there was a safe way to assume the AR of the video for SD recordings. Maybe modify mythflash.sh to force all video except 16:9 to 4:3 AR? (NB: since HD is streamed to disk at the correct AR in all cases AFAIK, this is only a SD video “problem”.)
Maybe I’m reading the code wrong, but in some cases this does appear like it could be a problem.
February 2, 2007 at 11:23 pm
I have been trying to get Myth streaming with Flash and have followed the directions the best that I can. Sometimes when I encode it works others it fails and does nothing and every once in a while it just does the first 20 sec. Don’t have any ideas that I can think of right now and have been over and over this. Any suggestions that I might try. Running Knoppmyth R5E50. Help please
February 3, 2007 at 7:26 am
For anyone experiencing random encoding failures…
I’m capturing via a DVB-T card (in UK) and some encode jobs failed to run…ffmpeg would core dump. Tracked it down to trying to encode both video and the audio directly from the transport stream.
If we dump out the audio first, then add it to the encoding of the video it seems to fix the problem. Haven’t had a failure so far using this method. It also sorts out any audio sync problems caused by errors in the transport stream.
comment out the original ffmpeg line in /usr/local/bin/mythflash.sh and replace with:
ffmpeg -y -i $directory/$file -vn -acodec copy $directory/$file.mp2
ffmpeg -y -i $directory/$file -i $directory/$file.mp2 -map 0:0 -map 1:0 -r 20 -b $bitrate -f flv -s $dimensions -deinterlace -ar 22050 -ab 32 $directory/$file.flv
rm -f $directory/$file.mp2
February 8, 2007 at 9:57 pm
I have followed the instructions. I Now see the encode? option. When I click it I get a popup saying An unknown module was specified. streamer.php exists. Where should I start?
February 16, 2007 at 8:46 am
Ok, so I got this to almost work by having myth encode in MPEG4 instead of RTjpeg, and now ffmpeg will at least try to encode it, but after a while it hits this:
Marker bit missing before time_increment_resolution=2087.9kbits/s
[mpeg4 @ 0×85368d8]time_base.den==0
[mpeg4 @ 0×85368d8]header damaged
Error while decoding stream #0.0
Floating point exception (core dumped)
I tried Jim’s suggestion of separate audio and video reencoding and it didn’t help, and I can watch the flash up to where ffmpeg failed. Any idea?
Great work, btw, this is going to be a great feature for me. Now if I could only get broadband with a decent upload speed…
February 22, 2007 at 10:24 am
I have also had similar random encoding failures using the original mythflash.sh script as per Jim’s thread, but it only seems to occur on larger files over 1 GB. Small files encode fine. I am also using DVB and based in UK. I have had success with Jim’s fix of commenting out the original ffmpeg line and adding the 3 lines in Jim’s thread and that works, bit it seems much slower for the encoding to complete and until it does finish I cannot use the flv toolbar to skip through the flash file. Is there a way to fix the original ffmpeg line so that it allows for larger file dumps.
Also if a fix is not possible is there a way to limit the number of encoding processes at any one time, otherwise the backend machine gets bogged down with several files encoding at once if clicking on several encode tabs on the mythweb recorded programs page, and it would be useful to set it so that only 1 encode can occur at a time.
Other than that this is a very cool hack for mythweb and thanks for all the tips and help from you clever chaps
February 23, 2007 at 2:56 pm
Can you add this to a User Job to encode automatically?
Josh
March 21, 2007 at 5:24 pm
(If you’re going to use an anti-spam check that uses JavaScript and cookies, you should announce that they both need to be enabled. Now I have to retype my reply. Grr.)
I got Flash streaming up and running pretty quickly with this, but the video quality left something to be desired. Since the encoding is done by a shell script, it’s easy enough to fix it.
Someone else mentioned problems transcoding from PVR-x50 recordings (I usually encode at 480×480). I also capture video from a FireWire cable box at anywhere from 352×480 to 1920×1088. It’d be better to detect the aspect ratio of the source file and set the encoding resolution from that.
I’ve put a revised encoding script here:
http://alfter.us/files/mythflash.sh
4:3 content is scaled to 320×240 and encoded at 352 kbps. 16:9 content is scaled to 432×240, letterboxed at 432×320 to make the result 4:3-compatible, and encoded at 480 kbps. Audio is downmixed to 22.05 kHz mono and encoded at 32 kbps. The input framerate is left alone, but it is detected if you want to do something with it (like encode at a rational fraction of the input framerate).
Encoding is done with mencoder (1.0rc1) instead of ffmpeg, since I’m more familiar with how to get the best out of mencoder. There may still be room for improvement, but I’m getting pretty good results already.
March 22, 2007 at 7:10 pm
An unknown module was specified
This is the error i get when i click encode.
Would you please help me with this?
I am new on linux and enjoying using it.
I am using mythdora 3.2 with pvr150
Thanks for you rhelp in advance!
April 5, 2007 at 10:16 pm
I suspect I am running into a permission problem, but can’t find anything wrong.
Ubuntu Edgy, if I su - www-data and run the mythflash.sh script the .flv file is created.
In mythweb, I see the 1x, 2x and so on. When I click on those I see the following in my apache access.log:
GET /mythweb/data/streamer.php?scale=1&file=recordings/1047_20070330230600.mpg.flv
I hit play and I only ever get the busy signal. It is only a 10 minute video I was trying to test with.
apache error.log doesn’t show any problems. I have chowned the file to mythtv:mythtv which owns all my recordings. Same issue again.
-rw-r–r– 1 mythtv mythtv 290463748 2007-03-31 20:33 1047_20070330230600.mpg
-rw-r–r– 1 mythtv mythtv 45259196 2007-04-05 22:57 1047_20070330230600.mpg.flv
Any suggestions?
April 6, 2007 at 6:25 am
Burak: I got the same error when I upgraded mythweb and mythtv to the latest version, .21
Mythweb works somewhat differently in that version and also the default assumptions are different.
I’m in the process of re-writing the above for my own installation, once that is done if you want I can package the changes and repost them(can I post them here or should I place them on my website and provide a link here?)
I’m also expanding it a bit as I found the default Flash conversion settings gave really bad quality. For my purposes(wireless LAN to Wii player attached to PC) I’d rather have better quality. I’m thinking of making a second tweak that gives 3 encoding options, high quality, medium quality, and low quality to handle my 3 needs(local network, internet, and cell phone)
April 7, 2007 at 2:17 am
Thanks a bunch. I’ve been working on this for days and couldn’t quite get it going until you straight forward setup.
I look forward to using it,
Doc
April 16, 2007 at 3:58 pm
Abobo: Have you solve your problem yet? I’m using Edgy also and stuck on the same problem. Any idea?
April 22, 2007 at 3:41 pm
Gary, thanks for your respond. I would be great if you would provide a link to your website or post it here, whichever is easy for you. Hope to hear from you soon:) Thanks again!
April 28, 2007 at 9:04 am
You might add how to install flvtools2. I had to
sudo apt-get install rubygems
sudo gem install flvtools2
on Ubuntu 7.04
May 4, 2007 at 10:27 am
Scott, I used your script and the video streaming is pretty nice but the sound got real bad! Is there anything i need to configure on my ubuntu box? thanks.
May 5, 2007 at 11:22 am
Matt, thanks for the Ubuntu help but it’s flvtool2, not flvtools2:
sudo apt-get install rubygems
sudo gem install flvtool2
May 10, 2007 at 1:55 am
Any update on adding mythtv svn support? Anyone had any success with mythtv snv and streaming flash?
May 17, 2007 at 7:53 am
To get mp3 support for ffmpeg in Ubuntu Feisty I used the following:
http://po-ru.com/diary/bleeding-edge-ffmpeg-on-ubuntu-feisty/
Worked like a charm. I also tried the altered mythflash.sh which used mencoder but got garbled sound.
May 25, 2007 at 2:50 pm
Great writeup! Very easy to follow and get working. I do have one problem now tho and its permissions related. If I chown so that I can use mythflash (as in the tutorial above) then I can no longer record anything and I can not transcode anything. If I change my permissions back so that i can record and transcode then I cannot use mythflash.
Like I said I know its a permissions problem but I don’t know how to resolve it.
Seems to be the recordings dir that is causing my problem. Any ideas??
May 29, 2007 at 12:18 pm
Ok - permission fixed. I’ve tried both ffmpeg and mencoder and prefer the video result of mencoder but the audio is about .5 seconds ahead of the video. Same with ffmpeg. Do I need to add/reove an option in the command string?
June 24, 2007 at 10:44 pm
Worked great… also, I added the following as a user job so that I can automate the flash conversion for a particular job (show):
/bin/bash /usr/local/bin/mythflash.sh /var/www/html/mythweb/data/recordings “%FILE%”
June 28, 2007 at 9:38 pm
Has anybody with the “unknown module” error got a fix?
June 28, 2007 at 9:54 pm
I found that if I use mythweb.domain.com I get the “unknown module” but if I use domain.com/mythweb I do not.
The rewrite base in htaccess must need to be changes to work at mythweb.domain.com.
June 29, 2007 at 6:13 pm
when i follow the above install everything appears ok
but when i click encode i get a new browser window with
http://mybutt/mythweb/data/streamer.php?file=recordings/11070_20070629190000.mpg&convert=true as the url and
An unknown module was specified
in the browser window
can anyone help or please put me on the road to figure out where to start to look
July 4, 2007 at 1:35 pm
I too have just installed all this and am getting the dreaded
“An unknown module was specified” as well when I click the “encode” link.
-dirtbag
July 22, 2007 at 8:47 pm
I am experiencing a couple of problems. when clicking the link to encode, a ffmpeg process is never created. i can encode using mythflash.sh /recordings filename though. Second problem is that, when i manually create the flv file, i do see the encode link change to a 1x 2x 3x link and after clicking that, it just hangs and never loads the video. When I try accessing the flv file directly (i.e. http://domain/mythweb/data/recordings/2011_20070722180000.mpg.flv), it says this file cannot be found. However, if i navigate to this same folder through ssh, the file does exist.
August 23, 2007 at 6:31 pm
First of all, Great job Chief and thanks for that wonderful add on tool with mythweb. Everything is working fine except that ffmpeg crash after a few second of encoding process (I tried that mythflash.sh script from Scott with same result). It makes only about a minute of flv movie from the mpeg mythtv record and it stop and I don’t know why. Stranly, it works perfectly when I run mythflash.sh directly from a root shell. It only when I run it when I clic to “Encode?” from the streamer.php script that it fail. Any clue ?
-wayne
August 26, 2007 at 12:21 pm
Hi,
My problem is solved and was related to my apache setup. httpd was restarting every 30 second because of a misconfigured openssl setup. Thanks again for that wonderful MythWeb add-on.
-wayne
August 29, 2007 at 9:36 am
Does anyone knows if there is a port of mythflash for the mythvideo on mythweb ? (I mean the possibility of encoding and streaming all the video files on the mythvideo database) ?
-wayne
August 29, 2007 at 10:40 pm
Wayne,
The latest version of MythTV SVN includes a flash player in MythWeb as well as an asx streaming link for recorded programs. I can’t get either to work now.
I can get about 5-15 seconds worth of a stream using the flash player before ffmpeg chokes on the .nuv file with this:
[mpeg4 @ 0×84a9bc8]header damaged
Error while decoding stream #0.0
Floating point exception
If anyone can get past this I’d appreciate hearing how you did it.
Thanks,
Patrick.
September 28, 2007 at 9:30 am
How do I increase the video quality?
September 29, 2007 at 9:49 pm
Hi,
i tested the mythweb+mythflash integration and it worked fine. But i don not want flash encoded files on my harddisk. that is why i tried a few things and here is my solution for my problem.
i use ffserver to serve the flash video instead of putting them to disk.
my ffserver configuration:
Port 8090
BindAddress 0.0.0.0
MaxClients 1000
MaxBandwidth 1000
CustomLog -
NoDaemon
File /tmp/feed1.ffm
FileMaxSize 10M
ACL allow 127.0.0.1
Feed feed1.ffm
Format flv
VideoCodec flv
VideoFrameRate 12
VideoBufferSize 80000
VideoBitRate 500
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 1
VideoQMax 31
VideoSize 320×240
PreRoll 0
AudioBitRate 32
AudioChannels 1
AudioSampleRate 11025
Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
#FaviconURL http://mythtv.local.net/favicon.ico
URL http://mythtv.local.net/mythweb/
first start ffserver:
ffserver -f /path/to/config/ffserver.conf
second start ffmpeg:
nice -n 19 ffmpeg -i rec/some.mpg http://localhost:8090/feed1.ffm
third start the flash video player:
http://mythtv.local.net/~mythtv/flvplayer.swf?file=http://mythtv.local.net:8090/mythtv.flv
ffserver does not need to be niced, because all the work is done by ffmpeg.
what now may be needed is a script watching the ffserver status page to kill ffmpeg after the flash client has been disconnected. its also possible to kill ffmpeg after the user chooses the next recording out of the recorded page to watch. but watching the status page would save some resources. it would be also possible to skip some scenes with some little work on the encoding scripts. i do not know how much can be changed in the flash player source, but if the player could send commands like skip one minute to a cgi/php script this would be an easy job
so it may be also possible to stream live tv to the flash player by sending some commands to mythtv-backend(right way) or sending some keys to mythfrontend(hacky way) in order to get a recording to disc started, in order to be served with ffmpeg and ffserver
i hopefully provide these scripts and patches for the mythweb patch soon
bye MUH!
October 4, 2007 at 7:17 am
I was getting some ruby errors… and a zero byte flv file.
I stepped through the sh script, and found ffmpeg doesn’t understand my codec… nuplevideo.
I rebuilt it… per instructions.
Here’s output:
Command is ffmpeg -y -i /myth/tv/4000_20071003200000.nuv -ar 22050 -r 20 -b 2000 -f flv -s 240×240 -deinterlace /myth/tv/4000_20071003200000.nuv.flv
FFmpeg version SVN-r8998, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: –enable-gpl –enable-pp –enable-libvorbis –enable-libogg –enable-liba52 –enable-libdts –enable-dc1394 –enable-libgsm –disable-debug –enable-libmp3lame –enable-libfaad –enable-libfaac –enable-xvid –enable-pthreads –enable-x264
libavutil version: 49.4.0
libavcodec version: 51.40.4
libavformat version: 51.12.1
built on Oct 3 2007 07:45:38, gcc: 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
Input #0, nuv, from ‘/myth/tv/4000_20071003200000.nuv’:
Duration: 09:01:43.2, start: 0.000000, bitrate: 1411 kb/s
Stream #0.0: Video: RJPG / 0×47504A52, 480×480, 29.97 fps(r)
Stream #0.1: Audio: mp3, 48000 Hz, stereo, 1411 kb/s
PIX_FMT_YUV420P will be used as an intermediate format for rescaling
Output #0, flv, to ‘/myth/tv/4000_20071003200000.nuv.flv’:
Stream #0.0: Video: flv, yuv420p, 240×240, q=2-31, 2 kb/s, 20.00 fps(c)
Stream #0.1: Audio: mp3, 22050 Hz, stereo, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Unsupported codec (id=0) for input stream #0.0
Ideas? is there a switch to enable nuv for the ffmpeg rebuilt?
October 4, 2007 at 7:10 pm
hmm… so I started poking around various sites and figured out I have to get the video to something other than the myth-version of nupple video.
I got the nuvexport thing going manually. It took 4000_20071003200000.nuv and made it “Bionic Woman - Paradise Lost.mpg”. So I moved it back to “4000_20071003200000.mpg”, and ran the mythflash.sh on it, and it successfully started making 4000_20071003200000.mpg.flv! woohoo. I linked that to 4000_20071003200000.nuv.flv and was able to stream it.
I set up an auto transcode on a show this morning but it didn’t make a mpg anything. Grr.
I guess I need to hack the mythflash to call the nuvexport-dvd instead of mencoder/ffmpeg, or at least call the same routines.
Why me? Why didn’t other people have this issue?
October 23, 2007 at 6:52 am
Awesome guide and utilities. I’ve made some modifications to recorded.php and streamer.php to provide encoding for standard and wide screen aspects and for opening player in seperate window. Also added a function that will resize window to video extents in streamer.php.
settings i use are -sameq and res is 192×144 and 256×144 streams good from a 1024 kb/s connection and since uses -sameq quality is perfect except detail suffers.
Now if i could just get back to studying.
October 24, 2007 at 1:21 am
I’ve borrowed heavily from your work to create an iPod Touch/iPhone mechanism from mythweb. I hope the posted code snippets aren’t in violation of your copyright, (I don’t think they are) but if you want to have a look it’s at:
http://www.mythtv.org/wiki/index.php/Streaming_to_iPod_touch_or_iPhone
You can remove any offending material that you wish.
October 30, 2007 at 8:58 am
UNKNOWM MODULE
I have been back and forth several times, but I still can’t beat the “unknown module was specified” when I click on the encode link.
Is Mythexpire.pl the only file that needs the recording path set ?
I am using Mythdora 3.2 (Mythtv 0.20 / FC6). This has Mythweb in /var/www/html/mythweb - do I have to define that anywhere (it all appears to be relative paths).
Apache user is apache and has been added to the mythtv group.
flvtool2 and ruby were installed and work on the original wiki version of the flash stuff.
Any tips on what to test / where to narrow this down gratefully recieved.
Cheers
Ian
October 31, 2007 at 7:01 am
After some digging with different builds of Myth I have found that some builds have the URL different to others.
Do this test…
http://hostname/mythweb/data/flvplayer.swf and see if the player loads. If it does load - you don’t have the same problem I did - sorry, but the below won’t fix it for you !
Didn’t load ? Okay try http://hostname/data/flvplayer.swf instead.
If that works then modify recorded.php lines to remove the redundant “/mythweb” from the lines like:
echo ‘1X ‘;
There are four lines (one for each size) and then just below another one for the “Encode” link. The first line was line 322 in my copy of the recorded.php file. For me the file was in /var/www/html/mythweb/modules/tv/tmpl/default
Now to sort out some aspect ratios.
Ian
November 8, 2007 at 2:37 am
Everything works great unless I try to encode a big file (3 or 4gb) . I’ve tried the original and the three line replacement to double pass in the mythflash.sh and it fails to. I end up with a 0 byte flash file in those cases. Any ideas?
November 8, 2007 at 10:09 am
Update. If I try to encode a large file (this one is 3.99gb) from command line using the ffmpeg script command, ffmpeg reports time increasing, but frame, fps, etc all stay at 0.. I am going to let it run and see how long it runs unless thats indefinitely.
November 9, 2007 at 5:00 pm
‘Nother Update:
Not encoding big files was my fault. I somehow had it set to 480×480 which is not supported by ffmpeg!
So now my only problem is trying to achieve the highest possible streaming quality. It looks ok, but I’ve seen better. I think I need to mess with the bitrates, qfactor and picture size…any help is appreciated.
December 22, 2007 at 1:40 pm
nice feature… trying it with mythbuntu
having problems with flvtool2
jim@jim-mythbuntu:/usr/local/bin$ sudo ./mythflash.sh /var/www/mythweb/data/recordings 1086_20071222124800.nuv
/usr/bin/mplayer
/usr/bin/flvtool2
ERROR: undefined method `timestamp’ for nil:NilClass
ERROR: /usr/local/lib/site_ruby/1.8/flv/stream.rb:285:in `lasttimestamp’
ERROR: /usr/local/lib/site_ruby/1.8/flv/stream.rb:274:in `duration’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:181:in `add_meta_data_tag’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:137:in `update’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:47:in `send’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:47:in `execute!’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:46:in `each’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:46:in `execute!’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:239:in `process_files’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:225:in `each’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:225:in `process_files’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2/base.rb:44:in `execute!’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2.rb:168:in `execute!’
ERROR: /usr/local/lib/site_ruby/1.8/flvtool2.rb:228
ERROR: /usr/bin/flvtool2:2:in `require’
ERROR: /usr/bin/flvtool2:2
any ideas ?
tnx jim
December 28, 2007 at 7:14 am
Jim, I encountered the same problems with repository-pulled versions of ffmpeg. They are several versions behind the latest versions of ffmpeg.
The errors you encountered above is because ffmpeg failed, not the ruby program. Do this to grab the latest version and install it into /usr/local:
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
Then update the mythflash script to use the compiled version until your linux distribution updates its ffmpeg package in the future.
December 28, 2007 at 7:36 am
The current MythWeb solution tries to launch FFmpeg on the server (from within handler.pl) to transcode the video to a format that can be played back by the Flex 2 based GPL flash video player. If you stop the video, the FFmpeg job continues on, etc..
For Mac OS X, Linux and Windows based boxes, what’s really needed is an option in MythWeb to launch VLC (in streaming mode) on the back-end and then launch either VLC, mplayer or WindowsMedia on the front-end to playback the stream. (The advantage of using VLC on the client side too is that you can forward-fast/rewind the stream.) Longer term, the flash video player could be hacked to simply display the RTP-over-HTTP stream from the VLC server and to control it using the VLC server’s built-in mini-webserver.
April 8, 2008 at 4:40 pm
So if you delete the original recording will the flash version be deleted as well?
May 9, 2008 at 6:04 pm
Ys3Zg7 sd9fj41dkg0ckahr82y4
August 8, 2008 at 1:44 am
I’m really struggling with this, I’m running Mandriva 2008.1 and the recorded.php file is nothing like the ones mentioned. Replacing it with the modified one supplied results in a corrupt reocrdings page in mythweb, but looking at the code in recorded.php it isn’t the same as tose mentioned here, so I can’t work out the format or where to put code to enable the flash encode / stream links.
Using the supplied recorded.php does allow me to encode the flash file though, so the underlying mechanisms are lla working (the flv fiels are created OK etc.
So near yet so far - anyone have any ideas?
Andy.
August 12, 2008 at 5:44 pm
netstat problem
fabric problem silk velvet
dell gx1 problems
November 22, 2008 at 4:36 pm
I tried this and it all seemed to work first time:
-The ‘encode’ button is there in mythweb
-When I press it, .fvl files are created in my recordings directory
However, when I click ‘1X’ (or any of the other buttons) to view the stream, the flash players comes up, but never gets past the ’spinning wheel’.
Any tips would be much appreciated.
Thanks.
Wessel