Difference between revisions of "Talk:Streaming to iPod touch or iPhone"
Line 8: | Line 8: | ||
# Update php files to detect/link to correct files. | # Update php files to detect/link to correct files. | ||
+ | |||
+ | When I manually execute the ffmpeg line in mythipod.sh, it fails with: | ||
+ | |||
+ | mgrusin@Bender:/usr/local/bin$ ffmpeg -i /video/1048_20071124190000.mpg -acodec libfaac -ab ${abitrate} -s ${width}x${height} | ||
+ | -vcodec mpeg4 -b ${vbitrate} -flags +aic+mv4+trell -mbd 2 -cmp | ||
+ | |||
+ | FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al. | ||
+ | configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg | ||
+ | --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid | ||
+ | --enable-x264 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr | ||
+ | libavutil version: 1d.49.3.0 | ||
+ | libavcodec version: 1d.51.38.0 | ||
+ | libavformat version: 1d.51.10.0 | ||
+ | built on Nov 17 2007 21:23:57, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) | ||
+ | Input #0, mpeg, from '/video/1048_20071124190000.mpg': | ||
+ | Duration: 01:59:38.0, start: 0.289367, bitrate: 5205 kb/s | ||
+ | Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 480x480, 6000 kb/s, 29.97 fps(r) | ||
+ | Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 384 kb/s | ||
+ | Unknown codec 'libfaac' | ||
+ | |||
+ | "ffmpeg -version" reports "--enable libfaac", and libfaac0 appears to be installed (this is on mythbuntu). What else should I check or try? | ||
+ | Thanks for any help! [[User:Mgrusin|Mgrusin]] 04:12, 27 November 2007 (UTC) | ||
Revision as of 04:12, 27 November 2007
If you're having a problem post here and I'll try and help.
When experimenting to write this page I basically followed the following steps before getting everything right:
- Perform the transcoding and see if it plays well in mplayer
- Put the file into the root of the web-server, update mime-type and see if it plays on iPod
- Put the file back into the myth directory, link from data/recordings/ under mythweb, and see if it can find it
- Update php files to detect/link to correct files.
When I manually execute the ffmpeg line in mythipod.sh, it fails with:
mgrusin@Bender:/usr/local/bin$ ffmpeg -i /video/1048_20071124190000.mpg -acodec libfaac -ab ${abitrate} -s ${width}x${height} -vcodec mpeg4 -b ${vbitrate} -flags +aic+mv4+trell -mbd 2 -cmp FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr libavutil version: 1d.49.3.0 libavcodec version: 1d.51.38.0 libavformat version: 1d.51.10.0 built on Nov 17 2007 21:23:57, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) Input #0, mpeg, from '/video/1048_20071124190000.mpg': Duration: 01:59:38.0, start: 0.289367, bitrate: 5205 kb/s Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 480x480, 6000 kb/s, 29.97 fps(r) Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 384 kb/s Unknown codec 'libfaac'
"ffmpeg -version" reports "--enable libfaac", and libfaac0 appears to be installed (this is on mythbuntu). What else should I check or try? Thanks for any help! Mgrusin 04:12, 27 November 2007 (UTC)
I'm wondering, will this work with storage groups?--Bob.os 22:03, 18 November 2007 (UTC)
Yes, but you would probably do better to put the files in a specific location. So you could set the output of the transcoding stop to a known location, then modify the PHP page (and expire script) to look in those directories specifically
In myth2ipod.sh add a directory that your webuser can see with something like
ipoddirectory=/srv/www/htdocs/ipodvideos/
and then at the end where the ffmpeg command is, change this:
"${directory}/${file}.mp4"
to this:
"${ipoddirectory}/${file}.mp4"
The expire script would be a tiny bit more complicated as you'd have to, for each file in your ipoddirectory check if there was a corresponding file in any of the directories.
You would also change your php file from this:
if(file_exists($show->filename . '.mp4')){ echo '<a href="/mythweb/data/recordings/' . $file . '.mp4" target="_blank">Watch</a> '; echo "</b>";
to something like this:
if(file_exists('/srv/www/htdocs/ipodvideos/'. $file . '.mp4')){ echo '<a href="/srv/www/htdocs/ipodvideos/'. $file . '.mp4" target="_blank">Watch</a> '; echo "</b>";