Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 10-27-2012, 09:57 AM
sunBathin sunBathin is offline
Junior Member
 
Join Date: Oct 2012
Posts: 4
sunBathin is on a distinguished road
Question

Player for .mpg on webpage


Hello everyone,

I'm not sure where to post this question, so please advice if there's a better location.

I'm successfully running ffmpeg to get a .mpg output video.

I want to play this video on a website.
Which player would you suggest?

I don't have experience in this, and from what I've researched:
flowplayer.org is an option
html5 video is another option

Any thoughts on this?

Thank you for your feedback... very much appreciated
Reply With Quote
  #2  
Old 10-27-2012, 05:59 PM
svnpenn svnpenn is offline
Banned
 
Join Date: Apr 2011
Location: Dallas
Posts: 757
svnpenn is on a distinguished road
Default

Re: Player for .mpg on webpage


I use JwPlayer, pretty basic

longtailvideo.com/players

Sample

svnpenn.github.com/2012/embed-flash-video

Also, FFS dont use MPG. Get with 21st century

wikipedia.org/wiki/HTML5_video#Browser_support
Reply With Quote
  #3  
Old 10-27-2012, 07:38 PM
sunBathin sunBathin is offline
Junior Member
 
Join Date: Oct 2012
Posts: 4
sunBathin is on a distinguished road
Question

Re: Player for .mpg on webpage


Thank you very much for your help!
I like the JW Player.

I'm going to attach (at the end of this post) the output of when I run the ffmpeg script on my Debian box.

What options do I have to change to have it encode html5 video, or h264?
Something JW Player will work with?

===
In addition, the quality is "blocky".
First 2 seconds look spectacular, and immediately they go down.

Here are the commands inside the script that run ffmpeg.
Any thoughts?
Code:
ffmpeg  -i $videourl -vcodec copy -sameq -an -t $segmentLength $partsfolder/$segmentFilename$count$segmentExtension
Reference:
$videourl = is the IP of an 'ip camera" being used

Very much appreciated your help!

Code:
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep 28 2012 10:45:48 with gcc 4.6 (Debian 4.6.3-10)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -DPIC' --extra-ldflags='-Wl,-z,relro' --cc='ccache distcc cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --disable-decoder=libdirac --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/arm-linux-gnueabi --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libdc1394 --disable-altivec --disable-armv5t  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 59.100 / 54. 59.100
  libavformat    54. 29.104 / 54. 29.104
  libavdevice    54.  2.101 / 54.  2.101
  libavfilter     3. 17.100 /  3. 17.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.  0
[rtsp @ 0x4ef40] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://root:PASSWORD@192.168.0.64:554/mpeg4/media.amp':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.166067, bitrate: N/A
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 24.08 tbr, 90k tbn, 1k tbc
[mpeg @ 0x82510] VBV buffer size not set, muxing may fail
Output #0, mpeg, to '/home/ipcam/parts//part0.mpeg':
  Metadata:
    title           : Media Presentation
    encoder         : Lavf54.29.104
    Stream #0:0: Video: mpeg4, yuv420p, 800x600 [SAR 1:1 DAR 4:3], q=2-31, 90k tbn, 1k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=   27 fps=0.0 q=-1.0 size=     236kB time=00:00:04.15 bitrate= 465.5kbits/s    
frame=   31 fps= 23 q=-1.0 size=     276kB time=00:00:04.81 bitrate= 469.4kbits/s    
frame=   35 fps= 18 q=-1.0 size=     308kB time=00:00:05.48 bitrate= 460.3kbits/s    
========KEEPS ON GOING UNTIL BELOW=============
========KEEPS ON GOING UNTIL BELOW=============
frame=  360 fps=6.4 q=-1.0 size=    3064kB time=00:00:59.95 bitrate= 418.7kbits/s    
frame=  363 fps=6.4 q=-1.0 size=    3098kB time=00:01:00.45 bitrate= 419.8kbits/s    
frame=  366 fps=6.4 q=-1.0 size=    3122kB time=-577014:-32:-22.-77 bitrate=  -0.0kbits/s    
frame=  366 fps=6.3 q=-1.0 Lsize=    3124kB time=00:01:00.95 bitrate= 419.9kbits/s    
video:3107kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.562450%
rm: cannot remove `/home/ipcam/output/stream.mpg': No such file or directory
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep 28 2012 10:45:48 with gcc 4.6 (Debian 4.6.3-10)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -DPIC' --extra-ldflags='-Wl,-z,relro' --cc='ccache distcc cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --disable-decoder=libdirac --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/arm-linux-gnueabi --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libdc1394 --disable-altivec --disable-armv5t  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 59.100 / 54. 59.100
  libavformat    54. 29.104 / 54. 29.104
  libavdevice    54.  2.101 / 54.  2.101
  libavfilter     3. 17.100 /  3. 17.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.  0
Input #0, mpeg, from '/home/ipcam/output/assemble.mpeg':
  Duration: 00:01:00.94, start: 1.000000, bitrate: 419 kb/s
    Stream #0:0[0x1e0]: Video: mpeg4 (Advanced Simple Profile), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 24.08 tbr, 90k tbn, 1k tbc
[mpeg @ 0x3ece0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to '/home/ipcam/output/stream.mpg':
  Metadata:
    encoder         : Lavf54.29.104
    Stream #0:0: Video: mpeg1video, yuv420p, 800x600 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> mpeg1video)
Press [q] to stop, [?] for help
frame=   11 fps=0.0 q=5.6 size=      80kB time=00:00:00.30 bitrate=2182.4kbits/s dup=7 drop=0    
frame=   21 fps= 12 q=8.3 size=     124kB time=00:00:00.63 bitrate=1602.3kbits/s dup=15 drop=0    
frame=   31 fps= 11 q=10.2 size=     148kB time=00:00:00.96 bitrate=1253.0kbits/s dup=23 drop=0    
========KEEPS ON GOING UNTIL BELOW=============
========KEEPS ON GOING UNTIL BELOW=============
frame= 1828 fps= 11 q=29.0 size=    1896kB time=00:01:00.92 bitrate= 254.9kbits/s dup=1462 drop=0    
frame= 1828 fps= 11 q=30.7 Lsize=    1898kB time=00:01:00.96 bitrate= 255.1kbits/s dup=1462 drop=0    
video:1883kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.794040%
./ipstreamconv.sh: line 98: : No such file or directory
Reply With Quote
  #4  
Old 10-27-2012, 07:57 PM
svnpenn svnpenn is offline
Banned
 
Join Date: Apr 2011
Location: Dallas
Posts: 757
svnpenn is on a distinguished road
Default

Re: Player for .mpg on webpage


Quote:
Originally Posted by sunBathin
Input #0, rtsp, from 'rtsp://rootbvious@10.0.0.64:554/mpeg4/media.amp':
FFmpeg is pretty smart about defaults you should be able to do something like

Code:
ffmpeg -i rtsp://root:obvious@10.0.0.64:554/mpeg4/media.amp out.mp4
This will set

- MP4 container
- h.264 codec
- CRF 23 quality

You cannot do "-vcodec copy" because that will simply copy the source mpeg4 video stream, without encoding. As a side note modern FFmpeg uses "-c:v copy" idiom for copying video stream. Please update your scripts.
Reply With Quote
  #5  
Old 10-27-2012, 07:59 PM
sunBathin sunBathin is offline
Junior Member
 
Join Date: Oct 2012
Posts: 4
sunBathin is on a distinguished road
Default

Re: Player for .mpg on webpage


Making those changes now... will update on how it goes in a couple of minutes.
Although I'll have to wait until tomorrow's daylight to see how the quality goes.
The camera is outdoors, and everything is almost pitch-black right now.

Will update in a few.
Thank you!
Reply With Quote
  #6  
Old 10-27-2012, 08:59 PM
sunBathin sunBathin is offline
Junior Member
 
Join Date: Oct 2012
Posts: 4
sunBathin is on a distinguished road
Default

Re: Player for .mpg on webpage


Hello,
I tried
Code:
ffmpeg -i rtsp://root:obvious@10.0.0.64:554/mpeg4/media.amp out.mp4
And it came back
"Illegal instruction"

Code:
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep 28 2012 10:45:48 with gcc 4.6 (Debian 4.6.3-10)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -DPIC' --extra-ldflags='-Wl,-z,relro' --cc='ccache distcc cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --disable-decoder=libdirac --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/arm-linux-gnueabi --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libdc1394 --disable-altivec --disable-armv5t  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 59.100 / 54. 59.100
  libavformat    54. 29.104 / 54. 29.104
  libavdevice    54.  2.101 / 54.  2.101
  libavfilter     3. 17.100 /  3. 17.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.  0
[rtsp @ 0x4ef40] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://root:obvious@10.0.0.64:554/mpeg4/media.amp':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.166078, bitrate: N/A
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 24.08 tbr, 90k tbn, 1k tbc
Illegal instruction
Any thoughts on what might be going on?

Also, I require no idea from the video, so could I run:
Code:
ffmpeg -i -an rtsp://root:obvious@10.0.0.64:554/mpeg4/media.amp out.mp4
??

Thanks for the help!
Reply With Quote
Reply Post New Thread
Tags:



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 11:05 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons