[mythtv-users] Mythweb Flash Stream has no sound on ATSC

Allen Edwards allen.edwards at oldpaloalto.com
Sat Jul 12 04:20:19 UTC 2008


Nick Rout wrote:
> On Sat, Jul 12, 2008 at 10:52 AM, Allen Edwards
> <allen.edwards at oldpaloalto.com> wrote:
>> Brad and I have been digging into this and the conclusion we have come
>> to is that there is a problem with the stream on Mythweb.  It is
>> probably something simple, if you are really good.
>>
>> Here is what we found:
>>
>> Flash player has no sound when streaming most if not all ATSC videos.
>> These same streams, when downloaded, can be played with sound by players
>> such as WinAmp and Media Player.  Unfortunately, these players will not
>> stream the files because of the redirection that mythweb uses.
>>
>> Programs that can deal with the redirection, like flash and VLC, will
>> not play the sound.  These programs will also not play the sound of a
>> downloaded version of the file so it isn't just the streaming.
> 
> I think you are confusing two things - see my comment in the other
> thread, but the stream pointed to by the .asx file is NOT the flash
> stream, it is the original file on the disk.
> 
> flash streaming is experimental, it says so on the screen where you
> activate it in mythweb, it also says you need ffmpeg compiled with mp3
> support. ffmpeg -f tells me that mp3 support is:
> 
> D A     mp3
> 
> there is no E in the block of letters and I think this means my ffmpeg
> does not suport encoding mp3, but I am unsure of that interpretation.
> 
> Further investigation reveals that the command line executed when the
> flash player starts is:
> 
> /usr/bin/ffmpeg -y -i
> /var/lib/mythtv/recordings/2035_20080709202900.mpg -s 320x240 -r 24 -f
> flv -ac 2 -ar 11025 -ab 64k -b 256k /dev/stdout
> 
> -y = overwrite output file
> -i input file
> -s size
> -r fps
> -f format
> -ac number of audio channels
> -ar audio rate
> -ab audio bitrate
> -b video bitrate
> 
> nothing there that specifies audio codec, so I guess ffmpeg must have
> a default. Wonder what it is (the man page does not illuminate). One
> assumes from the comment on the mythweb page that the idea is to
> transcode to mp3 (otherwise why would you need ffmpeg to have mp3
> support compiled in).
> 
> running in the command line, substituting an output file, gives this:
> 
> nick at media:~$ /usr/bin/ffmpeg -y -i
> /var/lib/mythtv/recordings/2035_20080709202900.mpg -s 320x240 -r 24 -f
> flv -ac 2 -ar 11025 -ab 64k -b 256k test.flv
> 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-shared --prefix=/usr
>   libavutil version: 1d.49.3.0
>   libavcodec version: 1d.51.38.0
>   libavformat version: 1d.51.10.0
>   built on Mar 12 2008 14:31:53, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu4)
> Input #0, mpegts, from '/var/lib/mythtv/recordings/2035_20080709202900.mpg':
>   Duration: 01:11:24.9, start: 8788.852367, bitrate: 5643 kb/s
>   Stream #0.0[0x203]: Video: mpeg2video, yuv420p, 720x576, 15000 kb/s,
> 25.00 fps(r)
>   Stream #0.1[0x28d]: Audio: mp2, 48000 Hz, stereo, 256 kb/s
> Output #0, flv, to 'test.flv':
>  ****** Stream #0.0: Video: flv, yuv420p, 320x240, q=2-31, 256 kb/s,
> 24.00 fps(c)
> Stream mapping:
>   Stream #0.0 -> #0.0
> Press [q] to stop encoding
> frame=  280 q=14.9 Lsize=     588kB time=11.7 bitrate= 413.0kbits/s
> video:584kB audio:0kB global headers:0kB muxing overhead 0.780876%
> nick at media:~$
> 
> Tells me two things, firstly ffmpeg is not compiled with
> --enable-mp3lame, secondly only a video stream is created in the
> output. (line marked with ********
> 
> Proposed solution? Look for a version of ffmpeg for mythbuntu with mp3
> compiled in.
> 
> PS who put together mythbuntu? This kind of incompleteness annoys me!
> 

Nick, thanks for the detailed reply.  I guess that I made the assumption 
that flash was using the .asx file because it had the same problem as 
some of the other .asx players.  We really don't want to use flash as it 
has so many problems like not being 16:9 aspect ratio.

So, my hunt so far is to find an .asx player that will play the sound, 
or get WinAmp to be able to stream the mythweb .asx file.

The .asx file points to a url that has a big number at the tail, like 
this "http://192.168.1.111:80/mythweb/pl/stream/1071/1215741600"

Now, if you download that file, you get "Show.mpg"  I take it that there 
is some kind of redirection going on.  I tried to capture what is going 
on with php but I think it took the redirection before giving me the 
output as I got binary output.  I was using fgetc().

That said, it would be nice if the flash worked so if I have time I will 
take your suggestion.  Thanks again for looking into it in such detail.

Allen



More information about the mythtv-users mailing list