Streaming MPEG-2 TS [m2ts | mts]

Need help? Post your questions here.

Moderator: moderators

Streaming MPEG-2 TS [m2ts | mts]

Postby speakersPushAir » Thu Mar 24, 2011 2:54 am

Hey guys!

Anyone have any luck transcoding m2ts containers?

Here is an example file:
Code: Select all
D:\video\Movies>c:\subsonic\transcode\ffmpeg.exe -i video.m2ts
FFmpeg version SVN-r21231-Sherpya, Copyright (c) 2000-2010 Fabrice Bellard, et al.
  built on Jan 16 2010 05:42:31 with gcc 4.2.5 20080919 (prerelease) [Sherpya]
  libavutil     50. 7. 0 / 50. 7. 0
  libavcodec    52.47. 0 / 52.47. 0
  libavformat   52.47. 0 / 52.47. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.15. 0 /  1.15. 0
  libswscale     0. 8. 0 /  0. 8. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[mpegts @ 012dbde0]max_analyze_duration reached

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (48000/
1001) -> 23.98 (24000/1001)
Input #0, mpegts, from 'video.m2ts':
  Duration: 02:28:07.25, start: 599.958311, bitrate: 4867 kb/s
  Program 1
    Stream #0.0[0x1011](eng): Video: h264, yuv420p, 1920x800 [PAR 1:1 DAR 12:5],
23.97 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0.1[0x1100](eng): Audio: aac, 48000 Hz, 2 channels, s16, 84 kb/s
    Stream #0.2[0x1101](eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
At least one output file must be specified


Running ffmpeg manually I have been able to create a stream which I can load up with VLC and watch just fine. However, when I use the transcode settings:
Code: Select all
ffmpeg -v 0 -ss %o -async 1 -i %s -b %bk -s %wx%h -acodec copy -f flv -

I end up with the dreaded: "Video not found or access denied" error in the flv player.

The log doesn't seem to indicate any errors:
Code: Select all
[3/23/11 7:51:31 PM PDT]    INFO   PlaylistInputStream   admin listening to "video.m2ts"
[3/23/11 7:51:31 PM PDT]    DEBUG   TranscodeInputStream   Starting transcoder: [c:\subsonic\transcode\ffmpeg] [-v] [0] [-ss] [0] [-async] [1] [-i] [D:\Video\video.m2ts] [-b] [1000k] [-s] [480x360] [-acodec] [copy] [-f] [flv] [-]


I'm looking forward to hearing your guy's ideas. Thanks!
speakersPushAir
 
Posts: 2
Joined: Thu Mar 24, 2011 2:44 am

Postby bebopblues » Sat Apr 09, 2011 8:18 pm

Please update if you found a way to get Subsonic to stream TS files. Thanks.
bebopblues
 
Posts: 9
Joined: Sat Apr 09, 2011 8:16 pm

Postby tom_22 » Sat Apr 09, 2011 11:21 pm

Hi,

I am using this trascode settings for TS:
Code: Select all
ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -


Hope this helps...
tom_22
 
Posts: 19
Joined: Sun Jun 21, 2009 10:58 pm
Location: UK

Postby alphawave7 » Sun Apr 10, 2011 1:42 am

No werkie for me. Fails with the last line in log:

'libpostproc 52.2.0/52.2.0
Invalid duration specification for ss: %o'
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Postby GJ51 » Sun Apr 10, 2011 12:48 pm

Even if you get the transcoding to work, you'll still have issues getting it to play smoothly as it will take a lot of cpu power. You're much better off reformatting into mp4 for SS playback. mp4 will play directly in JW if you turn off the mp4>flv setting under transcoding. Internally, on gigabit lan, I can play blue ray quality mp4 with no glitches.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby bebopblues » Sun Apr 10, 2011 10:22 pm

I always get the "video not found or access denied" error.

About FFMPEG transcoding, it seems to struggle or stutter with 720P or 1080P MPEG2 files, but fine with H264. It's not a CPU problem since I never seen the CPU (2.4Ghz quad-core) at more than 50%. I've used other softwares where they use FFMPEG to transcode also, but there's never a stutter problem. So I don't think it's a CPU horsepower problem.
bebopblues
 
Posts: 9
Joined: Sat Apr 09, 2011 8:16 pm

Postby GJ51 » Sun Apr 10, 2011 10:42 pm

The problem is that ffmpeg as set up in SS only uses one core per video stream. So even if you're only using %50, the core tasked with the transcoding is maxed out. I've seen posts that suggested there is a setting that can be used to enable utilization of multiple cores for the transcoding, but I never followed up on that as I found that streaming without the transcoding works so much better, especially if the server has to provide multilp video streams simultaneously, or even at the same time. :wink:
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby speakersPushAir » Mon Apr 11, 2011 12:17 am

Hey Guys, these settings ended up working for me:

Code: Select all
ffmpeg -v 0 -ss %o -async 1 -i %s -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -


I have not had any trouble with processing power bottle-necking the stream. I have an AMD x6 1075T @ 3GHz

Love subsonic! Thanks!!!!
speakersPushAir
 
Posts: 2
Joined: Thu Mar 24, 2011 2:44 am

Postby GJ51 » Mon Apr 11, 2011 1:51 am

speakersPushAir wrote:Hey Guys, these settings ended up working for me:

Code: Select all
ffmpeg -v 0 -ss %o -async 1 -i %s -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -


I have not had any trouble with processing power bottle-necking the stream. I have an AMD x6 1075T @ 3GHz

Love subsonic! Thanks!!!!


That's probably enough powert to do it! Unfortunately, many of us who leave our servers up 24/7 don't want to be burning that much power. My quad core 2.83Ghz Xeon idles around 60w and seldom goes over 80 under load. My son has a AMD 1055T workstation that pulls 325W at idle. Granted, we can cut the heat to his room in the winter and he still stays warm, but it's a bit steep for server consumption. Screams at doing the video conversions though. :lol:
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby bebopblues » Mon Apr 11, 2011 10:04 pm

Just made some progress. I didn't know you have to go into each Player settings and enable "ts > flv" transcoding. I stopped getting "video not found or access denied" errors, rookie mistake.

Anyway, TS video is streaming, but it stops after a few seconds. But when it does play, there's no stuttering of any kind. It almost seems like it stops buffering after the initial start, and thats when it stops. Also, there's no drop list for the minutes to jump to.

All I did was add the ts > flv transcoding settings and enable it under the player settings. Is there something else I'm not doing right?

Edit: After the video stopped, I let it sit there for a while, then click on "Play", and it now streams no problem, weird. So I guess it needs to buffer all the way through before I can play it. But still no minute jump to list though.
bebopblues
 
Posts: 9
Joined: Sat Apr 09, 2011 8:16 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 32 guests