Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Live stream playing
20 décembre 2011, par John Smithwell, I can capture the incoming stream. Its produced by FFMpeg. The php code Im doing it with:
$address = '127.0.0.1'; $port = 1234; $outfile = "output.flv"; $ofp = fopen($outfile, 'w'); if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) { echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) . "\n"; sleep (5); die; } if (socket_bind($sock, $address, $port) === false) { echo "socket_bind() failed: reason: " . socket_strerror(socket_last_error($sock)) . "\n"; sleep (5); die; } if (socket_listen($sock, 5) === false) { echo "socket_listen() failed: reason: " . socket_strerror(socket_last_error($sock)) . "\n"; sleep (5); die; } if (($msgsock = socket_accept($sock)) === false) { echo "socket_accept() failed: reason: " . socket_strerror(socket_last_error($sock)) . "\n"; sleep (5); break; } do { $a = ''; socket_recv ($msgsock, $a, 65536, MSG_WAITALL); fwrite ($ofp, $a); echo strlen($a); } while (true);
so it produces good file, if I replay this it looks good. But I want to stream it on a site, if I just put a link to the .flv, it would play it from the beginning. How to make it real live? Thanx in advance.
-
Converting uploaded audio files to mp3 using PHP/ffmpeg
20 décembre 2011, par NickI have limited experience of using PHP, but having done some searching around it would seem that it is possible to convert audio files that are uploaded through a web page to mp3 using ffmpeg. The audio files would be uploaded using the Uploadify script to subfolders that are named according to the user's login.
I would need the PHP script to be able to process all audio files that are either not in MP3 format, or are in MP3 format but greater than 192kbps, deleting the original file after the conversion. Am I right in thinking that this could be achieved using PHP, and if so, can anyone get me started with some code, or a link to a webpage with some code?
Also, I am currently using Hostpapa for hosting my website, and I understand that they don't include ffmpeg, and also don't allow ssh. I read on one website that I could still install a compiled version of ffmpeg on a shared server, but I am not sure if this means that it would work on Hostpapa, or whether I would need to change my host to get ffmpeg working.
Any advice on any of this would be welcome!
Thanks,
Nick
-
Using FFMPEG for online video hosting
20 décembre 2011, par Kyle MontiI've been looking around for using FFMPEG and PHP. I've noticed you can use FFMPEG with HTML5. I've read the documentation of the FFMPEG's website and it's far beyond my knowledge. I have an open source document of a 'premade' .php file that stores the information to the database and tells it to execute to the ffmpeg function. However, they use mp4box and FLVtool2.
The array's of video size, frame rates, etc. are quite easy to understand. When designing this from scratch I really have not idea where to start.
I've defined the variables that will be recorded once the file is uploaded, thereafter, checking to see if the file exists and recording it the database.
The real question is using mp4box and flvtool2 to convert all videos right to .flv so you can use flowplayer or jwplayer then telling to convert.
EDIT: Sorry to edit, I've seen many posts about the same question but they all relate to old versions of the software, will the php carry over to newer versions (probably could find out on their website if they had a more in depth HOWTO for website streaming)
-
undefined reference to `__stack_chk_guard'
20 décembre 2011, par mooseI'm trying to debug the ffmpeg (0.8.7) on x86 Windows OS.
When I run configure with the -fstack-protector-all and -fstack-check I get this in config.log:gcc -mms-bitfields -fstack-protector-all -fstack-check -I/home/moose/x264 -c -o /tmp/ffconf.AZMYgppf.o /tmp/ffconf.NLPWVejs.c gcc -Wl,--add-stdcall-alias -L/c/installs/x264/x264-snapshot-20111206-2245 -o /tmp/ffconf.ZgseLpWd.exe /tmp/ffconf.AZMYgppf.o /c/installs/x264/x264-snapshot-20111206-2245/libx264.a C:/DOCUME~1/moose/LOCALS~1/Temp/ffconf.AZMYgppf.o:ffconf.NLPWVejs.c:(.text+0x2f): undefined reference to
__stack_chk_guard' C:/DOCUME~1/moose/LOCALS~1/Temp/ffconf.AZMYgppf.o:ffconf.NLPWVejs.c:(.text+0x44): undefined reference to
__stack_chk_guard' C:/DOCUME~1/moose/LOCALS~1/Temp/ffconf.AZMYgppf.o:ffconf.NLPWVejs.c:(.text+0x4b): undefined reference to `__stack_chk_fail' collect2: ld returned 1 exit status C compiler test failed.
Where did I fail?EDIT: I can't answer my own question, so I'll add the comment here:
Solved.. I had to link it against the libssp.a However, there is no change with these two swiches (-fstack-protector-all and -fstack-check ) at all :-( -
Extracting frames from MP4/FLV ?
19 décembre 2011, par blezI know it's possible with FFMPEG, but what to do if I have a partial file (like without the beginning and the end). Is is possible to extract some frames from it?