Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • Batch statement to convert mp3 to aac

    20 décembre 2011, par Soham Dasgupta

    My question is straight forward. I have tow commands to convert a single mp3 file to aac in tow pass. Here are the commands -

    ffmpeg -i input.mp3 -f wav - | neroAacEnc -ignorelength -q 0.5 -if - -of output.m4a
    
    ffmpeg -i output.m4a -y -vn -acodec libvo_aacenc -ab 128k -ar 48000 -ac 2 final.aac
    

    Please guide me to some script where I'll be able to convert a folder full to mp3 files in one shot. Suppose if its a VBScript then would it ask for the folders where mp3 are kept.

    Also a question about libvo_aacenc codec, is it the best codec to convert to aac if not then what codec should I use for the second pass for converting m4a to aac with highest compression but good quality. The above settings does not produce too good compression. Please help. Am very new to audio encoding.

  • Live stream playing

    20 décembre 2011, par John Smith

    well, 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 Nick

    I 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 Monti

    I'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 moose

    I'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 :-(