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 (9)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • 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 (...)

Sur d’autres sites (5229)

  • Transcoding/ Converting mpeg to h264 using ffmpeg h264_nvenc

    15 septembre 2024, par Mustafa

    I'm trying to transcode a video rendered by Davinci Resolve, using ffmpeg from mpeg4 to h264, on Ubuntu, using the following command.

    


    ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mov -c:a copy -c:v h264_nvenc -b:v 8M -preset 7 output-h264_nvenc-p7.mp4 -v verbose


    


    And my Nvidia card is NVIDIA GeForce GTX 1650.

    


    I'm gettting the following error :

    


    [mpeg4 @ 0x55a893ed3200] Video width 3840 not within range from 48 to 2032
[mpeg4 @ 0x55a893ed3200] Failed setup for format cuda: hwaccel initialisation returned error.


    


    And here's the complete output. The command produces an output but its quality is significantly less than the original.

    


      built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
  configuration: --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared --enable-gpl --enable-libx264
  libavutil      59. 36.100 / 59. 36.100
  libavcodec     61. 13.100 / 61. 13.100
  libavformat    61.  5.101 / 61.  5.101
  libavdevice    61.  2.101 / 61.  2.101
  libavfilter    10.  2.102 / 10.  2.102
  libswscale      8.  2.100 /  8.  2.100
  libswresample   5.  2.100 /  5.  2.100
  libpostproc    58.  2.100 / 58.  2.100
-vsync is deprecated. Use -fps_mode
Passing a number to -vsync is deprecated, use a string argument as described in the manual.
Selecting decoder 'mpeg4' because of requested hwaccel method cuda
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    creation_time   : 2024-09-15T04:25:29.000000Z
    encoder         : Blackmagic Design DaVinci Resolve
  Duration: 00:20:34.87, start: 0.000000, bitrate: 347243 kb/s
  Stream #0:0[0x1]: Video: mpeg4 (Simple Profile), 1 reference frame (mp4v / 0x7634706D), yuv420p(bt709/bt709/unknown, left), 3840x2160 [SAR 1:1 DAR 16:9], 345703 kb/s, 60 fps, 60 tbr, 15360 tbn (default)
      Metadata:
        creation_time   : 2024-09-15T04:25:29.000000Z
        handler_name    : VideoHandler
        vendor_id       :     
        encoder         : MPEG4 Video
        timecode        : 01:00:00:00
  Stream #0:1[0x2]: Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default)
      Metadata:
        creation_time   : 2024-09-15T04:25:29.000000Z
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74) (default)
      Metadata:
        creation_time   : 2024-09-15T04:25:29.000000Z
        handler_name    : TimeCodeHandler
        timecode        : 01:00:00:00
[out#0/mp4 @ 0x55a8929e8d80] No explicit maps, mapping streams automatically...
[vost#0:0/h264_nvenc @ 0x55a8929f5880] Created video stream from input stream 0:0
[aost#0:1/copy @ 0x55a893867080] Created audio stream from input stream 0:1
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (copy)
[vost#0:0/h264_nvenc @ 0x55a8929f5880] Starting thread...
[vf#0:0 @ 0x55a8929f17c0] Starting thread...
[vist#0:0/mpeg4 @ 0x55a89293a100] [dec:mpeg4 @ 0x55a8929f4440] Starting thread...
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x55a8929e0600] Starting thread...
Press [q] to stop, [?] for help
[mpeg4 @ 0x55a893ed3200] NVDEC capabilities:
[mpeg4 @ 0x55a893ed3200] format supported: yes, max_mb_count: 8192
[mpeg4 @ 0x55a893ed3200] min_width: 48, max_width: 2032
[mpeg4 @ 0x55a893ed3200] min_height: 16, max_height: 2032
[mpeg4 @ 0x55a893ed3200] Video width 3840 not within range from 48 to 2032
[mpeg4 @ 0x55a893ed3200] Failed setup for format cuda: hwaccel initialisation returned error.
[graph -1 input from stream 0:0 @ 0x75c970002e40] w:3840 h:2160 pixfmt:yuv420p tb:1/15360 fr:60/1 sar:1/1 csp:bt709 range:unknown
[graph -1 input from stream 0:0 @ 0x75c970002e40] video frame properties congruent with link at pts_time: 0
[h264_nvenc @ 0x55a8929e62c0] Using device cuda0 (type cuda) with h264_nvenc encoder.
[h264_nvenc @ 0x55a8929e62c0] Loaded Nvenc version 12.2
[h264_nvenc @ 0x55a8929e62c0] Nvenc initialized successfully
[h264_nvenc @ 0x55a8929e62c0] The selected preset is deprecated. Use p1 to p7 + -tune or fast/medium/slow.
Output #0, mp4, to 'output-h264_nvenc-p7.mp4':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf61.5.101
  Stream #0:0: Video: h264 (Main), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/unknown, progressive, left), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 8000 kb/s, 60 fps, 15360 tbn (default)
      Metadata:
        creation_time   : 2024-09-15T04:25:29.000000Z
        handler_name    : VideoHandler
        vendor_id       :     
        timecode        : 01:00:00:00
        encoder         : Lavc61.13.100 h264_nvenc
      Side data:
        cpb: bitrate max/min/avg: 0/0/8000000 buffer size: 16000000 vbv_delay: N/A
  Stream #0:1: Audio: pcm_s16le (ipcm / 0x6D637069), 48000 Hz, stereo, s16, 1536 kb/s (default)
      Metadata:
        creation_time   : 2024-09-15T04:25:29.000000Z
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]


    


    How can I find the cause of the error and resolve it ?

    


    Also is there a way to improve the quality of the output video as it's much lower than the original ? I tried doing the same conversion using libxh264 (using the CPU) and that produced a far better video.

    


  • how to not remove transparency using negate option on png files ffmpeg

    27 mars 2024, par Reilbas

    I'm new to FFMPEG.
To make it simple, I've created a program that applies a negative filter to small images in png format. For some of the images, everything is fine and the transparency is maintained... But for others, FFMPEG converted the transparency to either black or white pixels.

    


    I'm just using the command :
ffmpeg -y -i input.png -vf negate output.png

    


    I downloaded the latest binaries for windows from https://www.gyan.dev/ffmpeg/builds/ (2024/03/25)

    


  • Different container duration between ffmpeg versions which causes audio gaps

    4 septembre 2024, par blits

    I'm trying to make a looped RTMP stream from a single video (in this
example - YouTube), but starting with version 6.0 it introduces a gap in-between loops in the audio which is quite audible. Version before 6.0 (I
tried 5.1.6 and 4.4.2) work as expected and don't introduce any gaps.

    


    The difference I spotted is that the master version (7.0.2) and the 5.1.6, for
example, report a different duration time. Is there any reason why that might happen ?

    


    v5.1.6 :

    


     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'demo-video.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     creation_time   : 2024-09-03T15:30:51.000000Z
     encoder         : Blackmagic Design DaVinci Resolve Studio
   Duration: 00:00:05.00, start: 0.000000, bitrate: 35440 kb/s


    


    v7.0.2 :

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'demo-video.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2024-09-03T15:30:51.000000Z
    encoder         : Blackmagic Design DaVinci Resolve Studio
  Duration: 00:00:05.01, start: 0.000000, bitrate: 35346 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 2560x1440 [SAR 1:1 DAR 16:9], 35240 kb/s, 24 fps, 24 tbr, 12288 tbn (default)
      Metadata:
        creation_time   : 2024-09-03T15:30:51.000000Z
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : H.264 NVIDIA
        timecode        : 01:00:00:00


    


    As you can see, v5.1.6 report duration of 00:00:05.00 (which is correct) and v7.0.2 is 00:00:05.01 (1ms longer), which is what I think is causing the issue (but I'm not so sure about that). The original file is 5 seconds long which is what can be checked by ffprobe as well, but some streams report a 00:05.01 duration time.

    


    I tried to remedy this issue in many different ways by trimming the video/audio, using different flags, like -shortest, but that didn't help in any way - there's still a gap in the audio which is noticeable when looping the video. And like I said versions such as v5.1.6 work fine and there's no such gap.

    


    I guess what changed between versions is how ffmpeg interprets these streams but in the end I spent 2 days trying to avoid gaps in audio when streaming and nothing helped.

    


    How to reproduce :

    


    You can just stream the video in any RTMP destination of your liking, like YouTube and observe that there would be gaps (audio break-ups) in between every 5 seconds (once video ends). Video is accessible through the link from the curl command

    


    curl -o stream-audio-gap-issue.mp4 https://r2v.streamloop.app/obj_01j6y0pk83fy8vp06a9mmkkqah.mp4
ffmpeg -re -stream_loop -1 -i stream-audio-gap-issue.mp4 -c copy -f flv rtmp://a.rtmp.youtube.com/live2/[your-key]


    


    Expected : there are no gaps every 5 seconds, like in old versions of ffmpeg

    


    Instead : there are tiny audio gaps which are quite noticable

    


    ffprobe outputs is available on gist : https://gist.github.com/blitss/1e221b4fa8885b1df8ac2096746239cf

    


    I'm looking for literally any workarounds that will help avoid audio gaps whilst still preserving the latest version of ffmpeg.