Page 1 of 1

Re: Playing podcasts while transcoding, second time it works

Posted: Thu Jul 15, 2010 7:36 pm
by isopor
I also have this behaviour with my Samsung LN55B650.
I try to watch an Internet TV stream, but sometimes it doesn't work in the first time.
I get "unsupported format" message. Sometimes it works only in the third time.

This is really annoying. I have changed the setting: "File size for start transfer" and also "Transfer data buffer size for this device". With the changes I can make the problem worse, but not fix it at all.

Is there a way to see a debug log or something (maybe analysis of network traffic) to find out what is going wrong?

Re: Playing podcasts while transcoding, second time it works

Posted: Thu Jul 15, 2010 8:45 pm
by Eugene
isopor wrote: Is there a way to see a debug log or something (maybe analysis of network traffic) to find out what is going wrong?
Settings - Additional - Log

Re: Playing podcasts while transcoding, second time it works

Posted: Fri Jul 16, 2010 12:57 am
by isopor
Thanks Eugene.
I looked at the temporary folder to see the size of the file as the transcoding started.
The problem happens everytime the stream starts slow. That is, file growing slowly initially.
I made a copy of this file and played it in VLC. As it plays I hear the sound and see a fixed image.
This happens if I try to play the internet television only using VLC. First comes the sound, sometimes a fixed image,
and only a few moments later, the playing becomes perfect.
I was thinking if there is a setting to tell VLC to ignore this hesitating start. Maybe this could fix it.

PS: I also get these messages on the DOS window when the transcoding starts.
[00e4a29c] dummy interface: using the dummy interface module...
[00e37434] mux_ps mux: Open
[mp3 @ 00e31750]Header missing
Last message repeated 34 times
[mp3 @ 00e60010]Estimating duration from bitrate, this may be inaccurate
[mp3 @ 03dfc010]Header missing
Last message repeated 34 times
[mp3 @ 03de0050]Estimating duration from bitrate, this may be inaccurate
[00e37434] mux_ps mux: Close
[00e37434] mux_ps mux: Open
libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 0) for PID
0
libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 0) for PID
66

And just to fill in the information, this is my transcoding test window:
"C:\Arquivos de programas\VideoLAN\VLC\vlc.exe" "C:\Arquivos de programas\VideoL
AN\VLC\vlc.exe" -Idummy --language=en --sout=#transcode{vcodec=mp2v,vb=7000,fps=
25,width=1024,height=576,scale=1,aspect=16:9,acodec=mpga,ab=128,channels=2,sampl
erate=48000}:duplicate{dst=std{access=file,mux=mpeg1,dst="e:\lixo3\WmsTemp\Test_
91a6e81074d93e6c65b2abcf13bd7793.mkv"}} "http://www.cctv.ws/8/BBC1HQ"

Any light?

Thanks again

Re: Playing podcasts while transcoding, second time it works

Posted: Fri Jul 16, 2010 8:48 am
by Eugene
isopor wrote: I looked at the temporary folder to see the size of the file as the transcoding started.
The problem happens everytime the stream starts slow. That is, file growing slowly initially.
I made a copy of this file and played it in VLC. As it plays I hear the sound and see a fixed image.
This happens if I try to play the internet television only using VLC. First comes the sound, sometimes a fixed image,
and only a few moments later, the playing becomes perfect.
I was thinking if there is a setting to tell VLC to ignore this hesitating start. Maybe this could fix it.

PS: I also get these messages on the DOS window when the transcoding starts.
[00e4a29c] dummy interface: using the dummy interface module...
[00e37434] mux_ps mux: Open
[mp3 @ 00e31750]Header missing
Last message repeated 34 times
[mp3 @ 00e60010]Estimating duration from bitrate, this may be inaccurate
[mp3 @ 03dfc010]Header missing
Last message repeated 34 times
[mp3 @ 03de0050]Estimating duration from bitrate, this may be inaccurate
[00e37434] mux_ps mux: Close
[00e37434] mux_ps mux: Open
libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 0) for PID
0
libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 0) for PID
66

And just to fill in the information, this is my transcoding test window:
"C:\Arquivos de programas\VideoLAN\VLC\vlc.exe" "C:\Arquivos de programas\VideoL
AN\VLC\vlc.exe" -Idummy --language=en --sout=#transcode{vcodec=mp2v,vb=7000,fps=
25,width=1024,height=576,scale=1,aspect=16:9,acodec=mpga,ab=128,channels=2,sampl
erate=48000}:duplicate{dst=std{access=file,mux=mpeg1,dst="e:\lixo3\WmsTemp\Test_
91a6e81074d93e6c65b2abcf13bd7793.mkv"}} "http://www.cctv.ws/8/BBC1HQ"

Any light?
I think there is a problem with MIME-type of the transmitted stream: Test_91a6e81074d93e6c65b2abcf13bd7793.mkv -
what a mime-type used for Internet television?
You can try http://www.wildmediaserver.com/forum/vi ... 2588#p2588

Re: Playing podcasts while transcoding, second time it works

Posted: Fri Jul 16, 2010 2:10 pm
by isopor
Eugene wrote: I think there is a problem with MIME-type of the transmitted stream: Test_91a6e81074d93e6c65b2abcf13bd7793.mkv -
what a mime-type used for Internet television?
You can try http://www.wildmediaserver.com/forum/vi ... 2588#p2588
I was using mkv as mime=type. I tried several options, including mpeg and avi. I also change the option "mux" in command line to "ts", "ps", "avi". I tried several combinations, but the problem persists. I also created the profile "Movies - FLC - ffmpeg" but it didn't help.
It seems the Samsung TV is very sensitive. It gives me a lot of "unsupported formats" in the first try. And when I copy this temporary file and play it in VLC I see that the start is a frozen frame and just the sound. And when I play it on the TV from a pendrive, I also get the "unsupported format" message.

I will keep on trying.

Re: Playing podcasts while transcoding, second time it works

Posted: Sun Jul 18, 2010 8:04 pm
by isopor
I found out what is causing the error on the tv. It is related to VLC. The h264 stream starts with sound only, and then VLC adds the video stream. The Samsung TV doesn't like this at all. I tried many VLC options but couldn't avoid this. I chose different containers too.

I don't understand much of video streams, but from what I read, the problem is that it takes a while before comes the pps/sps information.
I wish there was a way to start encoding only after the iframe that contains this information.

Meanwhile, as a workaround I added to the transcoding parameters a small TS file to be encoded first. It seems it did the trick.

Re: Playing podcasts while transcoding, second time it works

Posted: Tue Jul 20, 2010 9:02 am
by libero
Please can you elaborate how to do this ?

Thanks

Re: Playing podcasts while transcoding, second time it works

Posted: Tue Jul 20, 2010 12:03 pm
by isopor
libero wrote:Please can you elaborate how to do this ?

Thanks
Sure. I don't understand much of it, but I created a new transcoding profile (to get there you go to settings, transcoder, profiles).
This new profile has VLC as transcoder and TS/MPEG as mime type. The parameters are:
-Idummy -vvv "c:\1.ts" "<INPUT FILE>" --sout-file-append --sout=#transcode{venc=ffmpeg,vcodec=mp2v,vb=10000,fps=50,width=1024,height=576,scale=1,aspect=16:9,acodec=mpga,ab=128,channels=2,samplerate=48000}:duplicate{dst=std{access=file,mux=ts,dst="<OUTPUT FILE>"}}

The file "c:\1.ts" must exist. It is just a working segment of the stream. I attached one, but I don't like it. And sometimes it makes the sound goes off sync.

Then apply the profile to the "channel". In my case: http://www.cctv.ws/8/BBC1HQ.
Besides that I've got a transfer buffer size of 256 or 512 kb. My TV is a Samsung B650.
If everything works, you'll see one second of the 1.ts and then the real time stream.