Recherche avancée

Médias (0)

Mot : - Tags -/médias

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (15)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Prérequis à l’installation

    31 janvier 2010, par

    Préambule
    Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
    Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
    Il (...)

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

Sur d’autres sites (3818)

  • Cannot convert from mts (AVCHD) to mkv using ffmpeg

    10 août 2016, par waran

    I was trying to convert a .MTS file from my camcorder (Panasonic HC-V700) to a .mkv file (because my editing software does not support MTS). I used the following command :

    ffmpeg -i 00000.MTS -scodec copy -acodec copy -vcodec copy -f matroska 00000.mkv

    But instead of getting a mkv file I get this :

    ffmpeg version 2.8.6-1ubuntu2 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311
     configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
     WARNING: library configuration mismatch
     avcodec     configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mpegts, from '00000.MTS':
     Duration: 00:00:07.68, start: 2.306356, bitrate: 12032 kb/s
     Program 1
       Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
       Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    [matroska @ 0x6ce920] Codec for stream 0 does not use global headers but container format requires global headers
    [matroska @ 0x6ce920] Codec for stream 1 does not use global headers but container format requires global headers
    [matroska @ 0x6ce920] Codec for stream 2 does not use global headers but container format requires global headers
    Output #0, matroska, to '00000.mkv':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 1k tbn, 90k tbc
       Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 256 kb/s
       Stream #0:2: Subtitle: hdmv_pgs_subtitle ([255][255][255][255] / 0xFFFFFFFF), 1920x1080
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
     Stream #0:2 -> #0:2 (copy)
    Press [q] to stop, [?] for help
    [matroska @ 0x6ce920] failed to avoid negative pts -65 in stream 2.
    Try -avoid_negative_ts 1 as a possible workaround.
       Last message repeated 1 times
    [matroska @ 0x6ce920] failed to avoid negative pts -63 in stream 2.
    Try -avoid_negative_ts 1 as a possible workaround.
    [matroska @ 0x6ce920] Can't write packet with unknown timestamp
    av_interleaved_write_frame(): Invalid argument
    [matroska @ 0x6ce920] Can't write packet with unknown timestamp
    frame=   23 fps=0.0 q=-1.0 Lsize=     187kB time=00:00:00.41 bitrate=3705.7kbits/s    
    video:707kB audio:7kB subtitle:3kB other streams:0kB global headers:0kB muxing overhead: unknown
    Conversion failed!

    Any ideas why is it not working ? (I am on Kubuntu 16.04 and I have ffmpeg version 2.8.6-1ubuntu2.)

    (I’m sorry for my English.)

    Edit :

    I tried the command without the subtitle stream (ffmpeg -i 00000.MTS -c copy -sn 00000.mkv), conversion failed again :

    ffmpeg version 2.8.6-1ubuntu2 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311
     configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
     WARNING: library configuration mismatch
     avcodec     configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mpegts, from '00000.MTS':
     Duration: 00:00:07.68, start: 2.306356, bitrate: 12032 kb/s
     Program 1
       Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
       Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    [matroska @ 0x1b3a900] Codec for stream 0 does not use global headers but container format requires global headers
    [matroska @ 0x1b3a900] Codec for stream 1 does not use global headers but container format requires global headers
    Output #0, matroska, to '00000.mkv':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 1k tbn, 90k tbc
       Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 256 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [matroska @ 0x1b3a900] Can't write packet with unknown timestamp
    av_interleaved_write_frame(): Invalid argument
    [matroska @ 0x1b3a900] Can't write packet with unknown timestamp
    frame=   17 fps=0.0 q=-1.0 Lsize=     184kB time=00:00:00.28 bitrate=5386.9kbits/s    
    video:554kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Conversion failed!

    Edit : Temporary solution

    I have found out, that converting to mp4 (fmpeg -i 00000.MTS -c copy -sn 00000.mp4) works. This does not solve the issue, but I can use the mp4 format in my editing software as well.

  • Android video crop using ffmpeg

    12 août 2016, par Pramod Patel

    I am using https://github.com/WritingMinds/ffmpeg-android-java for cropping a video using this command :

    execFFmpegCommand(" -i " + in + " -filter:v " + "crop=" + 240 + ":" + 120 + ":" + 100 + ":" + 100 + " -c:a copy " + out);

    where "in" is inputfile and "out" is outputfile.

    I went through a lot of same questions and couldn’t find required solution for this. I also tried the following command which i found going through the search :

    execFFmpegCommand(" -i " + in + " -filter:v " + "crop=" + 240 + ":" + 120 + ":" + 100 + ":" + 100 + " -c:a copy " + out);

    The main error that I’m getting here is : Output file #0 does not contain any stream

    private void execFFmpegCommand(final String command) {
       try {
           ffmpeg.execute(new String[]{command}, new ExecuteBinaryResponseHandler() {
               @Override
               public void onFailure(String s) {
                   Log.d(TAG, "FAILED with output : " + s);
                   progressDialog.dismiss();

               }

               @Override
               public void onSuccess(String s) {
                   Log.d(TAG, "SUCCESS with output : " + s);
               }

               @Override
               public void onProgress(String s) {
                   Log.d(TAG, "Started command : ffmpeg " + command);
                   Log.d(TAG, "progress : " + s);
               }

               @Override
               public void onStart() {
                   Log.d(TAG, "Started command : ffmpeg " + command);
                   progressDialog.show();
               }

               @Override
               public void onFinish() {
                   Log.d(TAG, "Finished command : ffmpeg " + command);
                   progressDialog.dismiss();

               }
           });
       } catch (FFmpegCommandAlreadyRunningException e) {
           // do nothing for now
       }
    }

    The LogCat is :

    D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.209 17283-17866/com.myapp D/FFmpeg: Running publishing updates method
    08-12 11:16:03.231 17283-17283/com.myapp W/MediaRecorder: mediarecorder went away with unhandled events
    08-12 11:16:03.232 17283-17283/com.myapp W/MediaRecorder: mediarecorder went away with unhandled events
    08-12 11:16:03.355 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.355 17283-17283/com.myapp D/ffmpeg: progress : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
    08-12 11:16:03.355 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.355 17283-17283/com.myapp D/ffmpeg: progress :   built with gcc 4.8 (GCC)
    08-12 11:16:03.355 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.355 17283-17283/com.myapp D/ffmpeg: progress :   configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    08-12 11:16:03.355 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress :   libavutil      55. 17.103 / 55. 17.103
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress :   libavcodec     57. 24.102 / 57. 24.102
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress :   libavformat    57. 25.100 / 57. 25.100
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress :   libavdevice    57.  0.101 / 57.  0.101
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress :   libavfilter     6. 31.100 /  6. 31.100
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress :   libswscale      4.  0.100 /  4.  0.100
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress :   libswresample   2.  0.101 /  2.  0.101
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress :   libpostproc    54.  0.100 / 54.  0.100
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress : Output #0, mp4, to ' -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4':
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: Started command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
    08-12 11:16:03.356 17283-17283/com.myapp D/ffmpeg: progress : Output file #0 does not contain any stream
    08-12 11:16:03.357 17283-17283/com.myapp D/ffmpeg: FAILED with output : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
                                                               built with gcc 4.8 (GCC)
                                                               configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
                                                               libavutil      55. 17.103 / 55. 17.103
                                                               libavcodec     57. 24.102 / 57. 24.102
                                                               libavformat    57. 25.100 / 57. 25.100
                                                               libavdevice    57.  0.101 / 57.  0.101
                                                               libavfilter     6. 31.100 /  6. 31.100
                                                               libswscale      4.  0.100 /  4.  0.100
                                                               libswresample   2.  0.101 /  2.  0.101
                                                               libpostproc    54.  0.100 / 54.  0.100
                                                             Output #0, mp4, to ' -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4':
                                                             Output file #0 does not contain any stream
    08-12 11:16:03.370 17283-17283/com.myapp D/ffmpeg: Finished command : ffmpeg  -i /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980754658.mp4 -vf crop=240:120:100:100 -c:a copy /storage/emulated/0/Android/data/com.myapp/Files/Video/myapp1470980763106_vid.mp4
  • live video streaming not playing on dash.js player using ffmpeg, nginx-rtmp in raspberry pi

    15 août 2016, par sparks

    I am trying to stream a live video from raspberry pi & pi camera module to web browser.But the video doesn’t play.I am using Nginx-rtmp and ffmpeg to process the video. On the client side i use dash js player trying to play the video but no luck.I see the warning on the terminal

    [flv @ 0x2c3b950] Failed to update header with correct duration.
    [flv @ 0x2c3b950] Failed to update header with correct filesize.

    But i am not sure if this could be the issue. Anybody knows what might be wrong ?I don’t expect a straight answer but i am sure somebody can guide me in the right direction. Thank you in advance. Here is my set up

    Nginx.conf

    events {
     worker_connections  1024;
    }


    http     {
           include       mime.types;
           default_type  application/octet-stream;


    sendfile        on;

    keepalive_timeout  65;

    server {
       listen       80;
       server_name 192.168.1.114 localhost;
       location / {
           root   /var/www;
           index  index.html index.htm;
       }


       location /dash {
           root /var/www;
           add_header Cache-Control no-cache;
       }

        location /dash.js{
           root /var/www;
         }

        location /hls {
          types {
           application/vnd.apple.mpegurl m3u8;
           video/mp2t ts;
         }

         root /var/www;
         index index.html;
         add_header Cache-Control no-cache;
       }

       location /rtmpcontrol{
           rtmp_control all;
        }

       location /rtmpstat{
           rtmp_stat all;
        }

       #error_page  404              /404.html;


              error_page   500 502 503 504  /50x.html;
       location = /50x.html {
           root   html;
       }

          }
    rtmp {
      server {
       listen 1935;

       chunk_size 4000;

       application rtmp {
           live on;
           hls on;
           dash on;
           dash_path /var/www/dash;
           hls_path /var/www/hls;
       }
     }
    }

    baseline.html

       
       
       
       

       
       

       
       

       
       <code class="echappe-js">&lt;script src='http://stackoverflow.com/feeds/tag/dash.all.js'&gt;&lt;/script&gt;
    &lt;script&gt;<br />
           function getUrlVars() {<br />
               var vars = {};<br />
               var parts = window.location.href.replace(/[?&amp;amp;]+([^=&amp;amp;]+)=([^&amp;amp;]*)/gi, function(m,key,value) {<br />
                   vars[key] = value;<br />
               });<br />
               return vars;<br />
           }<br />
    <br />
           function startVideo() {<br />
               var vars = getUrlVars(),<br />
                   url = &quot;http://192.168.1.114:80/dash/stream.mpd&quot;,<br />
                   video,<br />
                   context,<br />
                   player;<br />
    <br />
               if (vars &amp;amp;&amp;amp; vars.hasOwnProperty(&quot;url&quot;)) {<br />
                   url = vars.url;<br />
               }<br />
    <br />
               video = document.querySelector(&quot;.dash-video-player video&quot;);<br />
               context = new Dash.di.DashContext();<br />
               player = new MediaPlayer(context);<br />
    <br />
               player.startup();<br />
    <br />
               player.attachView(video);<br />
               player.setAutoPlay(false);<br />
    <br />
               player.attachSource(url);<br />
           }<br />
       &lt;/script&gt;

    &lt;body onload=&quot;startVideo()&quot;&gt;

    How i grab and push video stream

    raspivid -w 640 -h 480 -fps 25 -t 0 -b 1800000 -o - | ffmpeg -y -f h264 -i - -vcodec libx264  -f flv -rtmp_buffer 100 -rtmp_live live rtmp://localhost:1935/rtmp/stream

    When i run the above command, i see the following on the terminal

       ffmpeg version N-81256-gd3426fb Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (Raspbian 4.9.2-10)
     configuration: --enable-gpl --enable-libx264 --enable-nonfree
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 51.100 / 57. 51.100
     libavformat    57. 44.100 / 57. 44.100
     libavdevice    57.  0.102 / 57.  0.102
     libavfilter     6. 49.100 /  6. 49.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, h264, from 'pipe:':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: h264 (High), yuv420p, 640x480, 25 fps, 25 tbr, 1200k tbn, 50 tbc
    [tcp @ 0x2c3c850] Connection to tcp://localhost:1935 failed (Connection refused), trying next address
    [libx264 @ 0x2c50d80] using cpu capabilities: ARMv6 NEON
    [libx264 @ 0x2c50d80] profile High, level 3.0
    [libx264 @ 0x2c50d80] 264 - core 148 r2705 3f5ed56 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [flv @ 0x2c3b950] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Output #0, flv, to 'rtmp://localhost:1935/rtmp/stream':
     Metadata:
       encoder         : Lavf57.44.100
       Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 640x480, q=-1--1, 25 fps, 1k tbn, 25 tbc
       Metadata:
         encoder         : Lavc57.51.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    ^Cmmal: Aborting program.0 size=     930kB time=00:00:45.44 bitrate= 167.7kbits/s speed=1.03x    

    [flv @ 0x2c3b950] Failed to update header with correct duration.
    [flv @ 0x2c3b950] Failed to update header with correct filesize.
    frame= 1197 fps= 26 q=-1.0 Lsize=     976kB time=00:00:47.76 bitrate= 167.5kbits/s speed=1.04x    
    video:953kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.484349%
    [libx264 @ 0x2c50d80] frame I:5     Avg QP:18.91  size:  3600
    [libx264 @ 0x2c50d80] frame P:299   Avg QP:21.38  size:  1486
    [libx264 @ 0x2c50d80] frame B:893   Avg QP:20.62  size:   574
    [libx264 @ 0x2c50d80] consecutive B-frames:  0.4%  0.0%  1.0% 98.6%
    [libx264 @ 0x2c50d80] mb I  I16..4: 10.1% 87.1%  2.8%
    [libx264 @ 0x2c50d80] mb P  I16..4:  3.8%  7.4%  0.0%  P16..4: 34.2%  2.1%  1.5%  0.0%  0.0%    skip:51.0%
    [libx264 @ 0x2c50d80] mb B  I16..4:  0.2%  0.3%  0.0%  B16..8: 20.1%  0.4%  0.0%  direct: 3.8%  skip:75.1%  L0:48.6% L1:50.9% BI: 0.6%
    [libx264 @ 0x2c50d80] 8x8 transform intra:68.1% inter:97.0%
    [libx264 @ 0x2c50d80] coded y,uvDC,uvAC intra: 10.1% 27.5% 1.8% inter: 2.0% 12.9% 0.1%
    [libx264 @ 0x2c50d80] i16 v,h,dc,p: 18% 20%  9% 53%
    [libx264 @ 0x2c50d80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 11% 58%  2%  2%  1%  2%  1%  1%
    [libx264 @ 0x2c50d80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 26% 30%  3%  4%  4%  6%  2%  2%
    [libx264 @ 0x2c50d80] i8c dc,h,v,p: 66% 18% 15%  1%
    [libx264 @ 0x2c50d80] Weighted P-Frames: Y:1.7% UV:1.3%
    [libx264 @ 0x2c50d80] ref P L0: 58.2%  2.2% 25.5% 14.1%  0.1%
    [libx264 @ 0x2c50d80] ref B L0: 81.7% 13.3%  5.0%
    [libx264 @ 0x2c50d80] ref B L1: 93.6%  6.4%
    [libx264 @ 0x2c50d80] kb/s:162.87
    Exiting normally, received signal 2.

    On my var/www/dash directory

    stream-0.m4a  stream-19200.m4a  stream-29200.m4a  
    stream-9600.m4a    stream-init.m4a  stream.mpd      stream-raw.m4v
    stream-0.m4v  stream-19200.m4v  stream-29200.m4v  stream-9600.m4v    stream-init.m4v  stream-raw.m4a