Recherche avancée

Médias (91)

Autres articles (74)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (4596)

  • Processing of multipart/form-data request failed. Unexpected EOF read on the socket

    23 mai 2017, par Rares

    I am trying to upload a video file to the server(Spring Boot) from android.

    A video filmed with the phone has >50 MB if you film at least 2 minutes so I have to compress the file before uploading.
    Before compressing I tried to upload uncompressed files and it worked fine(10-30MB videos). Now I want to compress files because I want to send bigger videos to the server.
    I use multipart/form-data in android to send the file to the server.

    EDIT :

    protected void onActivityResult(int requestCode, int resultCode, final Intent data) {
           super.onActivityResult(requestCode, resultCode, data);
           if (requestCode == REQUEST_PICK_VIDEO && resultCode == RESULT_OK && data != null) {
               progressDialog = new ProgressDialog(MainActivity.this);
               progressDialog.setTitle("Uploading");
               progressDialog.setMessage("Please wait...");
               progressDialog.show();
               Thread thread = new Thread(new Runnable() {
                   @Override
                   public void run() {
                       String filePath = getRealPathFromURI(getApplicationContext(), data.getData());

                       ///get the name of file without extension
                       StringBuilder stringBuilder = new StringBuilder(filePath);
                       int start = filePath.lastIndexOf('.');
                       stringBuilder.delete(start, filePath.length());
                       //--------------
                       //get file extension(e.g mp4)
                       File file = new File(filePath);
                       String contentType = getFileType(file.getAbsolutePath());
                       //--------------
                       //create compressed file path=initial file path+ _compressed+(random nr.)+ extension .mp4
                       Random random = new Random();
                       int fileNr = random.nextInt(999);
                       String compressedFilePath = stringBuilder.toString() + "_compressed" + fileNr +"."+ contentType;

                       //compress file from gallery and save it with the above name
                       String[] command = {"-y", "-i", filePath, "-s", "640x480", "-r", "25", "-vcodec",
                               "mpeg4", "-b:v", "150k", "-b:a", "48000", "-ac", "2", "-ar", "22050", compressedFilePath};
                       executeFFmpegBinary(command);

                       File file2 = new File(compressedFilePath);

                       if (file2.exists()) {
                           OkHttpClient httpClient = new OkHttpClient();
                           RequestBody fileBody = RequestBody.create(MediaType.parse(contentType), file2);
                           RequestBody requestBody = new MultipartBody.Builder()
                                   .setType(MultipartBody.FORM)
                                   .addFormDataPart("type", contentType)
                                   .addFormDataPart("uploaded_file", file2.getName(), fileBody)
                                   .build();
                           Request request = new Request.Builder()
                                   .url(SERVER_ADDRESS_UPLOAD)
                                   .post(requestBody)
                                   .build();
                           try {
                               final Response response = httpClient.newCall(request).execute();
                               if (!response.isSuccessful()) {
                                   printFromThread(response.toString());
                                   throw new IOException("Error: " + response);
                               } else {
                                   printFromThread(response.body().string());
                               }
                               progressDialog.dismiss();
                           } catch (IOException e) {
                               e.printStackTrace();
                           }
                       }

                   }

               });
               thread.start();
           }

       }

    When I use FFmpeg compression and I send the compressed file to the server I receive the following error in the server :Processing of multipart/form-data request failed. Unexpected EOF read on the socket

    Server bean :

     @RequestMapping(value = "/upload-image", method = RequestMethod.POST)
      @ResponseBody
      public String handleUploadImageRequest(@RequestParam("uploaded_file")
      MultipartFile file) throws IOException {
    File fileReceived = new File(VIDEOS_DIR+"/"+file.getOriginalFilename());
    fileReceived.createNewFile();
    FileOutputStream fileOutputStream = new FileOutputStream(fileReceived);
    fileOutputStream.write(file.getBytes());
    fileOutputStream.close();

    prelucrareVideo(fileReceived);
    return "....";

    }

    Here is the exception :

    2017-05-22 23:36:24.122 DEBUG 5032 --- [nio-8080-exec-1] .m.m.a.ExceptionHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Unexpected EOF read on the socket
    2017-05-22 23:36:24.122 DEBUG 5032 --- [nio-8080-exec-1] .w.s.m.a.ResponseStatusExceptionResolver : Resolving exception from handler [null]: org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Unexpected EOF read on the socket
    2017-05-22 23:36:24.123 DEBUG 5032 --- [nio-8080-exec-1] .w.s.m.s.DefaultHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Unexpected EOF read on the socket
    2017-05-22 23:36:24.123 DEBUG 5032 --- [nio-8080-exec-1] o.s.w.s.DispatcherServlet                : Could not complete request

    org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Unexpected EOF read on the socket
       at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.parseRequest(StandardMultipartHttpServletRequest.java:111) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.<init>(StandardMultipartHttpServletRequest.java:85) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.multipart.support.StandardServletMultipartResolver.resolveMultipart(StandardServletMultipartResolver.java:79) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.servlet.DispatcherServlet.checkMultipart(DispatcherServlet.java:1100) ~[spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:932) ~[spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
    Caused by: java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Unexpected EOF read on the socket
       at org.apache.catalina.connector.Request.parseParts(Request.java:2874) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.parseParameters(Request.java:3177) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.getParameter(Request.java:1110) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:381) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:75) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       ... 23 more
    Caused by: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Unexpected EOF read on the socket
       at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:297) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.parseParts(Request.java:2801) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.parseParameters(Request.java:3177) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.getParameter(Request.java:1110) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:381) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:75) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       ... 23 more
    Caused by: java.io.EOFException: Unexpected EOF read on the socket
       at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:717) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.Http11InputBuffer.access$300(Http11InputBuffer.java:40) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1061) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:139) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:256) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.Request.doRead(Request.java:540) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:319) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:627) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:342) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:183) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.io.FilterInputStream.read(FilterInputStream.java:133) ~[?:1.8.0_121]
       at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:132) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:977) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:881) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.io.FilterInputStream.read(FilterInputStream.java:133) ~[?:1.8.0_121]
       at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:132) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.io.FilterInputStream.read(FilterInputStream.java:107) ~[?:1.8.0_121]
       at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:98) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:68) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:293) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.parseParts(Request.java:2801) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.parseParameters(Request.java:3177) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.getParameter(Request.java:1110) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:381) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:75) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       ... 23 more

    2017-05-22 23:36:24.130 ERROR 5032 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[.[dispatcherServlet]      : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Unexpected EOF read on the socket] with root cause

    java.io.EOFException: Unexpected EOF read on the socket
       at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:717) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.Http11InputBuffer.access$300(Http11InputBuffer.java:40) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1061) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:139) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:256) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.Request.doRead(Request.java:540) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:319) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:627) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:342) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:183) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.io.FilterInputStream.read(FilterInputStream.java:133) ~[?:1.8.0_121]
       at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:132) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:977) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:881) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.io.FilterInputStream.read(FilterInputStream.java:133) ~[?:1.8.0_121]
       at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:132) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.io.FilterInputStream.read(FilterInputStream.java:107) ~[?:1.8.0_121]
       at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:98) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:68) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:293) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.parseParts(Request.java:2801) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.parseParameters(Request.java:3177) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.Request.getParameter(Request.java:1110) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:381) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:75) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.11.jar:8.5.11]
       at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
    </init>

    What is the solution ? Thanks in advance.

  • Compiling ffmpeg for chromium on Windows

    7 janvier 2019, par ykhandel

    I am following the instructions here to generate the gn files for Chromium. I have installed the cygwin base package along with diffutils, nasm, make and python.

    Also, I have copied chromium/scripts/cygwin-wrapper to /usr/local/bin

    1. Started C :\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat

    2. Started C :\cygwin\cygwin.bat

    3. cd to third_party\chromium\scripts

    4. python build_ffmpeg win ia32

    I am getting some warnings plus this :

    Could not create temporary library.
    make : *** [/cygdrive/d/src/chromium/src/third_party/ffmpeg/ffbuild/library.mak:102 : libavutil/avutil-56.dll] Error 1

    make : *** Waiting for unfinished jobs....

    Could not create temporary library.

    Could not create temporary library.

    make : *** [/cygdrive/d/src/chromium/src/third_party/ffmpeg/ffbuild/library.mak:102 : libavcodec/avcodec-58.dll] Error 1

    make : *** [/cygdrive/d/src/chromium/src/third_party/ffmpeg/ffbuild/library.mak:102 : libavformat/avformat-58.dll] Error 1

    Traceback (most recent call last) :

    File "build_ffmpeg.py", line 900, in

    sys.exit(main(sys.argv[1 :]))

    File "build_ffmpeg.py", line 502, in main

    options=options)

    File "build_ffmpeg.py", line 876, in ConfigureAndBuild

    configure_args)

    File "build_ffmpeg.py", line 870, in do_build_ffmpeg

    options.config_only, branding, configure_flags)

    File "build_ffmpeg.py", line 408, in BuildFFmpeg

    [’make’, ’-j%d’ % parallel_jobs] + libraries, cwd=config_dir)

    File "build_ffmpeg.py", line 106, in PrintAndCheckCall

    subprocess.check_call(argv, *args, **kwargs)

    File "/usr/lib/python2.7/subprocess.py", line 186, in check_call

    raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError : Command ’[’make’, ’-j8’, ’libavcodec/avcodec-
    58.dll’, ’libavformat/avformat-58.dll’, ’libavutil/avutil-56.dll’]’ returned non-zero exit status 2

  • Wrong Bitrate after ffmpeg WAV to MP3 Conversion

    27 février 2015, par Nick Weisser

    I converted a WAV file to MP3. ffmpeg’s output states that it’s being converted into 128k bitrate, but it ends up with only 32k bitrate.

    # ffmpeg -i 3.28.09.WAV -acodec libmp3lame -ab 128k 3.28.09.mp3
    ffmpeg version 0.8.6-6:0.8.6-1, Copyright (c) 2000-2013 the Libav developers
     built on Mar 24 2013 07:20:17 with gcc 4.7.2
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    [wav @ 0x954f800] max_analyze_duration reached
    Input #0, wav, from '3.28.09.WAV':
     Duration: 00:27:07.47, bitrate: 2304 kb/s
       Stream #0.0: Audio: pcm_s24le, 48000 Hz, 2 channels, s32, 2304 kb/s
    Incompatible sample format 's32' for codec 'libmp3lame', auto-selecting format 's16'
    Output #0, mp3, to '3.28.09.mp3':
     Metadata:
       TSSE            : Lavf53.21.1
       Stream #0.0: Audio: libmp3lame, 48000 Hz, 2 channels, s16, 128 kb/s
    Stream mapping:
     Stream #0.0 -> #0.0
    Press ctrl-c to stop encoding
    size=   25430kB time=1627.51 bitrate= 128.0kbits/s    
    video:0kB audio:25430kB global headers:0kB muxing overhead 0.000495%

    The original WAV file is RIFF (little-endian) data, WAVE audio, Microsoft PCM, 24 bit, stereo 48000 Hz.

    The output MP3 file is an audio file with ID3 version 2.4.0, contains : MPEG ADTS, layer III, v1, 32 kbps, 48 kHz, Stereo when inspected with the file utility. My PHP library getID3 also state.

    # ffmpeg -i 3.28.09.mp3
    ffmpeg version 0.8.6-6:0.8.6-1, Copyright (c) 2000-2013 the Libav developers
     built on Mar 24 2013 07:20:17 with gcc 4.7.2
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    [mp3 @ 0x8f56800] max_analyze_duration reached
    Input #0, mp3, from '3.28.09.mp3':
     Metadata:
       encoder         : Lavf53.21.1
     Duration: 00:27:07.51, start: 0.000000, bitrate: 128 kb/s
       Stream #0.0: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
    At least one output file must be specified

    Any ideas what I might be missing here ?