Recherche avancée

Médias (0)

Mot : - Tags -/serveur

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

Autres articles (36)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (6946)

  • Video moves sideways when captured raw from camera and piped into ffplay

    21 septembre 2018, par peetonn

    I’m trying to capture video from the camera using ffmpeg (macOS 10.12) and pipe it for preview into ffplay using rawvideo and -v copy options :

    ffmpeg -f avfoundation -pixel_format 0rgb -framerate 25 -video_size 1280x720 -i "0" -map 0:v -c copy -f rawvideo - | ffplay -f rawvideo -video_size 1280x720 -pixel_format 0rgb -i -

    Video captures just fine, however, it constantly moves sideways (see screenshot attached). What might the issue here ?

    enter image description here

    UPDATE Full ffmpeg log output :

    $ ffmpeg -f avfoundation -pixel_format 0rgb -framerate 25 -video_size 1280x720 -i "0" -map 0:v -c copy -f rawvideo - | ffplay -f rawvideo -video_size 1280x720 -pixel_format 0rgb -i -
    ffmpeg version 4.0.2ffplay version 4.0.2 Copyright © 2003-2018 the FFmpeg developers Copyright © 2000-2018 the FFmpeg developers

     built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
     built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
     libavutil      56. 14.100 / 56. 14.100
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavcodec     58. 18.100 / 58. 18.100
     libavdevice    58.  3.100 / 58.  3.100
     libavformat    58. 12.100 / 58. 12.100
     libavfilter     7. 16.100 /  7. 16.100
     libavdevice    58.  3.100 / 58.  3.100
     libavresample   4.  0.  0 /  4.  0.  0
     libavfilter     7. 16.100 /  7. 16.100
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libavresample   4.  0.  0 /  4.  0.  0
     libpostproc    55.  1.100 / 55.  1.100
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    2018-09-20 09:33:28.013 ffmpeg[45781:16452887] Error loading /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn:  dlopen(/Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn, 262): no suitable image found.  Did find:
       /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn: mach-o, but wrong architecture
       /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn: mach-o, but wrong architecture
    2018-09-20 09:33:28.013 ffmpeg[45781:16452887] Cannot find function pointer New_SHP_PlugIn for factory 834FC054-C1CC-11D6-BD01-00039315CD46 in CFBundle/CFPlugIn 0x7fe63b506d00 Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin> (bundle, not loaded)
    2018-09-20 09:33:28.069 ffplay[45782:16452888] Error loading /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn:  dlopen(/Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn, 262): no suitable image found.  Did find:
       /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn: mach-o, but wrong architecture
       /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn: mach-o, but wrong architecture
    2018-09-20 09:33:28.069 ffplay[45782:16452888] Cannot find function pointer New_SHP_PlugIn for factory 834FC054-C1CC-11D6-BD01-00039315CD46 in CFBundle/CFPlugIn 0x7f93f3c13020 Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin> (bundle, not loaded)
    [avfoundation @ 0x7fe63c000000] Stream #0: not enough frames to estimate rate; consider increasing probesize
    Input #0, avfoundation, from '0':
     Duration: N/A, start: 1054.178167, bitrate: N/A
       Stream #0:0: Video: rawvideo ([0]RGB / 0x42475200), 0rgb, 1280x720, 1000k tbr, 1000k tbn, 1000k tbc
    Output #0, rawvideo, to 'pipe:':   0KB vq=    0KB sq=    0B f=0/0  
     Metadata:
       encoder         : Lavf58.12.100
       Stream #0:0: Video: rawvideo ([0]RGB / 0x42475200), 0rgb, 1280x720, q=2-31, 1000k tbr, 1000k tbn, 1000k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 ©
    Press [q] to stop, [?] for help
    Input #0, rawvideo, from 'pipe:':
     Duration: N/A, start: 0.000000, bitrate: 737280 kb/s
       Stream #0:0: Video: rawvideo ([0]RGB / 0x42475200), 0rgb, 1280x720, 737280 kb/s, 25 tbr, 25 tbn, 25 tbc
    frame=   16 fps=0.0 q=-1.0 size=   57600kB time=00:00:00.60 bitrate=786437.5kbits/s speed=1.frame=   29 fps= 28 q=-1.0 size=  104401kB time=00:00:01.12 bitrate=763617.4kbits/s speed=1.frame=   42 fps= 27 q=-1.0 size=  151201kB time=00:00:01.64 bitrate=755268.5kbits/s speed=1.frame=   55 fps= 26 q=-1.0 size=  198002kB time=00:00:02.16 bitrate=750939.5kbits/s speed=1.frame=   68 fps= 26 q=-1.0 size=  244802kB time=00:00:02.68 bitrate=748290.4kbits/s speed=1.av_interleaved_write_frame(): Broken pipe=    0KB sq=    0B f=0/0  
    Error writing trailer of pipe:: Broken pipe
    frame=   69 fps= 26 q=-1.0 Lsize=  247650kB time=00:00:02.72 bitrate=745863.6kbits/s speed=1.01x    
    video:248402kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Exiting normally, received signal 2.
  • FFmpeg in Python File already exists error

    24 septembre 2018, par Abdul Rehman

    I’m working on a project using python(3.6) and Django(2.0) in which i’m converting a video to mp4 if it’s in any other formate.

    Here’s my code :

    from views.py :

    def generate_thumbnail(filename, thumb_name):
       print('func called')
       print(filename)
       video_input_path = os.path.join(filename)
       img_output_path = os.path.join(thumb_name)
       subprocess.call(['ffmpeg', '-i', video_input_path, '-ss', '00:00:00.000', 'vframes', '1', img_output_path])


    def convert_to_mp4(video_name, only_name):
       os.popen(
           "ffmpeg -i '{input}' -ac 2 -b:v 2000k -c:a aac -c:v libx264 -b:a 160k -vprofile high -bf 0 -strict experimental -f mp4 '{output}.mp4'".format(
               input=video_name, output=only_name))
       return True


    def perform_upload(video, thumbnail):
       print('vdieo name is: {}'.format(video))
       servise = discovery.build('storage', 'v1', credentials=credentials)
       bucket_name = 'test_bucket004'
       print('Uploading the video...')
       media = MediaFileUpload(video, chunksize=4149304, mimetype='video/mp4',
                               resumable=True)
       req = servise.objects().insert(
           bucket=bucket_name,
           name=str(video),
           media_body=media,
           body={"cacheControl": "public,max-age=31536000"},
           predefinedAcl='publicRead'
       )
       resp = None
       while resp is None:
           status, resp = req.next_chunk()
       print(resp)
       video_url = 'http://storage.googleapis.com/' + bucket_name + '/' + str(video)

       print('Uploading your thumbnail...')
       media = MediaFileUpload(thumbnail, chunksize=4149304, mimetype='image/jpeg',
                               resumable=True)
       req = servise.objects().insert(
           bucket=bucket_name,
           name=str(thumbnail),
           media_body=media,
           body={"cacheControl": "public,max-age=31536000"},
           predefinedAcl='publicRead'
       )
       resp = None
       while resp is None:
           status, resp = req.next_chunk()
       print(resp)
       thumb_url = 'https://storage.googleapis.com/' + bucket_name + '/' + str(thumbnail)

       return video_url, thumb_url


    class VideoConverter(generics.ListCreateAPIView):
       def get(self, request, *args, **kwargs):
           return HttpResponse('Get request', status=200)

       def post(self, request, *args, **kwargs):
           serializer = VideoConverterSerializer(data=self.request.data)
           validation = serializer.is_valid()
           print(serializer.errors)
           if validation is True:
               url = request.POST.get('video_url')
               filename = url.split('/')
               filename = filename[-1]
               print(filename)
               ext = filename.split('.')
               print(ext[-1])
               only_name = ext[0]
               urllib.request.urlretrieve(url, filename)
               generate_thumbnail(filename, only_name + '_thumbnail.jpg')
               if ext == 'mp4':
                   videourl, thumb_url = perform_upload(filename, only_name + '_thumbnail.jpg')
               else:
                   conversion = convert_to_mp4(filename, only_name)
                   if conversion is True:
                       videourl, thumb_url = perform_upload(only_name + '.mp4', only_name + '_thumbnail.jpg')

               return HttpResponse('Video url is: {}\n \nThumbnail url is: {}'.format(videourl, thumb_url))
           else:
               return HttpResponse('Not a valid request')

    But when I pass it a video of Mp4 format it returns an error in the IDE console like this :

    ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
    built with Apple LLVM version 10.0.0 (clang-1000.10.43.1)
    configuration : —prefix=/usr/local/Cellar/ffmpeg/4.0.2 —enable-shared —enable-pthreads —enable-version3 —enable-hardcoded-tables —enable-avresample —cc=clang —host-cflags= —host-ldflags= —enable-gpl —enable-libmp3lame —enable-libx264 —enable-libxvid —enable-opencl —enable-videotoolbox —disable-lzma
    libavutil 56. 14.100 / 56. 14.100
    libavcodec 58. 18.100 / 58. 18.100
    libavformat 58. 12.100 / 58. 12.100
    libavdevice 58. 3.100 / 58. 3.100
    libavfilter 7. 16.100 / 7. 16.100
    libavresample 4. 0. 0 / 4. 0. 0
    libswscale 5. 1.100 / 5. 1.100
    libswresample 3. 1.100 / 3. 1.100
    libpostproc 55. 1.100 / 55. 1.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’PHP_GCS.mp4’ :
    Metadata :
    major_brand : mp42
    minor_version : 1
    compatible_brands : mp41mp42isom
    creation_time : 2018-08-03T13:08:04.000000Z
    Duration : 00:01:21.40, start : 0.000000, bitrate : 1584 kb/s
    Stream #0:0(und) : Video : h264 (Main) (avc1 / 0x31637661), yuv420p, 1918x1078 [SAR 1:1 DAR 137:77], 1581 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)
    Metadata :
    creation_time : 2018-08-03T13:08:04.000000Z
    handler_name : Core Media Video

    File ’PHP_GCS.mp4’ already exists. Overwrite ? [y/N]

    and stop the execution here until I press the enter button.I’m really confused why this is happining because when the video is already mp4 i’m not using ffmpeg but only for thumbnail generaton.

    What can be wrong here ?

    Thanks in advance !

  • Fade Video-Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    27 octobre 2018, par varmashrivastava

    I am using below command to add Fade In Fade Out effect to my video

    {"-y", "-ss", "" + startMs / 1000, "-t", "" + (endMs - startMs) / 1000, "-i", inputPath, "-acodec", "copy", "-vf", "fade=t=in:st=0:d=5,fade=t=out:st=" + String.valueOf((endMs - startMs) / 1000 - 5) + ":d=5", outputPath};

    I received below error-

    "Failure3.3 5 .3gpffmpeg version n3.0.1 Copyright (c) 2000-2016 the
    FFmpeg developers\n built with gcc 4.8 (GCC)\n 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=\n libavutil 55. 17.103 / 55. 17.103\n libavcodec 57. 24.102 / 57. 24.102\n libavformat 57. 25.100 /
    57. 25.100\n libavdevice 57. 0.101 / 57. 0.101\n libavfilter 6. 31.100 / 6. 31.100\n libswscale 4. 0.100 / 4. 0.100\n libswresample 2. 0.101 / 2. 0.101\n libpostproc 54. 0.100 /
    54. 0.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DCIM/Camera/VID_20180825_071734915.3gp’ :\n
    Metadata :\n major_brand : 3gp4\n minor_version : 0\n
    compatible_brands : isom3gp4\n creation_time : 2018-08-25
    01:47:47\n com.android.version : 8.0.0\n Duration : 00:00:10.83,
    start : 0.000000, bitrate : 17217 kb/s\n Stream #0:0(eng) : Video :
    h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown),
    1920x1080, 16756 kb/s, SAR 1:1 DAR 16:9, 29.49 fps, 29.58 tbr, 90k
    tbn, 180k tbc (default)\n Metadata :\n rotate : 90\n
    creation_time : 2018-08-25 01:47:47\n handler_name :
    VideoHandle\n Side data :\n displaymatrix : rotation of -90.00
    degrees\n Stream #0:1(eng) : Audio : aac (LC) (mp4a / 0x6134706D),
    48000 Hz, mono, fltp, 128 kb/s (default)\n Metadata :\n
    creation_time : 2018-08-25 01:47:47\n handler_name :
    SoundHandle\n[h263 @ 0xf49ff400] H.263 does not support resolutions
    above 2048x1152\nOutput #0, 3gp, to
    ’/storage/emulated/0/Movies/fade_video.3gp’ :\n Metadata :\n
    major_brand : 3gp4\n minor_version : 0\n
    compatible_brands : isom3gp4\n com.android.version : 8.0.0\n
    Stream #0:0(eng) : Video : h263, none, q=2-31, 128 kb/s, SAR 1:1 DAR
    0:0, 29.58 fps (default)\n Metadata :\n handler_name :
    VideoHandle\n creation_time : 2018-08-25 01:47:47\n
    encoder : Lavc57.24.102 h263\n Stream #0:1(eng) : Audio : aac
    (LC) (mp4a / 0x6134706D), 48000 Hz, mono, 128 kb/s (default)\n
    Metadata :\n creation_time : 2018-08-25 01:47:47\n
    handler_name : SoundHandle\nStream mapping :\n Stream #0:0 -> #0:0
    (h264 (native) -> h263 (native))\n Stream #0:1 -> #0:1 (copy)\nError
    while opening encoder for output stream #0:0 - maybe incorrect
    parameters such as bit_rate, rate, width or height\n"

    Why is causing this error in above command ?Any help will be welcome.