Recherche avancée

Médias (91)

Autres articles (33)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (4068)

  • FFMPEG, want to encode 720x480 and automatically scale to 640x480 or 854x480 as necessary depending on the ratio

    2 décembre 2023, par boxylogan

    EDIT : See appended notes at the bottom of the post.

    


    Note : all MKVs are sourced from my original Farscape Starburst DVDs, MPEG2.
I've been slowly re-encoding my old TV shows into a crisper format and I have for some shows, mainly extras (but also full episodes) MKVs that are a mix of 4:3 and 16:9. Usually I open the files up in Mediainfo and find out which ones are 4:3, stick them in one folder to encode in 640x480, then the same with 16:9. It's worked fine for the umpteen amount of times I've had to encode my shows.
I would like to try to expedite the process with a single FFMPEG command that can automatically detect if the files are 4:3 or 16:9 and encode them properly to 640x480 or 854x480.

    


    My main FFMPEG commands have been these two, depending on which aspect ratio I'm using :

    


    854x480p

    


    `for i in *.mkv; do ffmpeg -i "$i" -c:v libx264 -profile:v main -level:v 4.0 -crf 20 -c:a copy -map 0 -vf scale=854:480,setdar=16/9 encoded/"${i%.mkv}.mkv"; done


    


    640x480p

    


    `for i in *.mkv; do ffmpeg -i "$i" -c:v libx264 -profile:v main -level:v 4.0 -crf 20 -c:a copy -map 0 -vf scale=640:480,setdar=4/3 encoded/"${i%.mkv}.mkv"; done


    


    These two have worked fine lately since I got away from the extraneous -x264-params nonsense I picked up years ago. Again, I'm trying to streamline. I found this command a day ago and it SEEMED to look PERFECT :

    


    `for i in *.mkv; do ffmpeg -i "$i" -c:v libx264 -profile:v main -level:v 4.0 -crf 20 -c:a copy -map 0 -vf scale=w='if(gt(dar,854/480),min(854,iw*sar),2*trunc(iw*sar*oh/ih/2))':h='if(gt(dar,854/480),2*trunc(ih*ow/iw/sar/2),min(480,ih))' encoded/"${i%.mkv}.mkv"; done


    


    Looks perfect and works great for 640x480. The only problem is that it returns 852x480, every time. I even tried a modification I found where you set the setsar=1 AFTER the scale filter, and it does nothing.

    


    These are the first warnings I get when I try to run the command, with a 16:9 video, but it still completes :

    


    `[Parsed_scale_0 @ 0x56299c22fcc0] Circular references detected for width 'if(gt(dar, 854/480), min(854,iw*sar), 2*trunc(iw*sar*oh/ih/2))' and height 'if(gt(dar, 854/480), 2*trunc(ih*ow/iw/sar/2), min(480,ih))' - possibly invalid.
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[Parsed_scale_0 @ 0x56299c20e5c0] Circular references detected for width 'if(gt(dar, 854/480), min(854,iw*sar), 2*trunc(iw*sar*oh/ih/2))' and height 'if(gt(dar, 854/480), 2*trunc(ih*ow/iw/sar/2), min(480,ih))' - possibly invalid.


    


    It encodes and I can see the resolution it outputs to :

    


    `Stream #0:0(eng): Video: h264 (H264 / 0x34363248), yuv420p(tv, top coded first (swapped)), 852x480 [SAR 1:1 DAR 71:40], q=2-31, 29.97 fps, 1k tbn


    


    The next video is a 4:3 video and gives these warnings, however the video still completes, this time the video encodes properly to 640x480 :your text

    


    `[Parsed_scale_0 @ 0x5623084d4140] Circular references detected for width 'if(gt(dar, 854/480), min(854,iw*sar), 2*trunc(iw*sar*oh/ih/2))' and height 'if(gt(dar, 854/480), 2*trunc(ih*ow/iw/sar/2), min(480,ih))' - possibly invalid.
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)`your text`
Press [q] to stop, [?] for help
[Parsed_scale_0 @ 0x5623084d7080] Circular references detected for width 'if(gt(dar, 854/480), min(854,iw*sar), 2*trunc(iw*sar*oh/ih/2))' and height 'if(gt(dar, 854/480), 2*trunc(ih*ow/iw/sar/2), min(480,ih))' - possibly invalid.


    


    The output details :

    


    `Stream #0:0(eng): Video: h264 (H264 / 0x34363248), yuv420p(tv, top coded first (swapped)), 640x48 [SAR 1:1 `your text`DAR 4:3], q=2-31, 29.97 fps, 1k tbn


    


    TL ;DR

    


    EDIT : The actual problem is that the command is encoding the 16:9 aspect ratio files to 852x480 instead of 854x480. 854x480 is actually what I would like. 640x480 for the 4:3 is fine. Apologies, for the lack of clarification.

    


    Videos encode (from original Farscape Starburst DVDs MPEG2) properly to libx264 640x480 for 4:3 but not to 854x480 for 16:9. 16:9 instead encodes to 852x480, despite what command is telling it to do.

    


    Advice ? Thanks in advance ! Anything to make my re-encoding a little bit less tedious. I've been googling for hours and searching, but nothing seems to make it click. Thank you again !

    


  • FFMPEG, want to encode 720x480 and automatically scale to 640x480 or 854x480 as necessary depending on the ratio

    2 décembre 2023, par boxylogan

    EDIT : See appended notes at the bottom of the post.

    


    Note : all MKVs are sourced from my original Farscape Starburst DVDs, MPEG2.
I've been slowly re-encoding my old TV shows into a crisper format and I have for some shows, mainly extras (but also full episodes) MKVs that are a mix of 4:3 and 16:9. Usually I open the files up in Mediainfo and find out which ones are 4:3, stick them in one folder to encode in 640x480, then the same with 16:9. It's worked fine for the umpteen amount of times I've had to encode my shows.
I would like to try to expedite the process with a single FFMPEG command that can automatically detect if the files are 4:3 or 16:9 and encode them properly to 640x480 or 854x480.

    


    My main FFMPEG commands have been these two, depending on which aspect ratio I'm using :

    


    854x480p

    


    `for i in *.mkv; do ffmpeg -i "$i" -c:v libx264 -profile:v main -level:v 4.0 -crf 20 -c:a copy -map 0 -vf scale=854:480,setdar=16/9 encoded/"${i%.mkv}.mkv"; done


    


    640x480p

    


    `for i in *.mkv; do ffmpeg -i "$i" -c:v libx264 -profile:v main -level:v 4.0 -crf 20 -c:a copy -map 0 -vf scale=640:480,setdar=4/3 encoded/"${i%.mkv}.mkv"; done


    


    These two have worked fine lately since I got away from the extraneous -x264-params nonsense I picked up years ago. Again, I'm trying to streamline. I found this command a day ago and it SEEMED to look PERFECT :

    


    `for i in *.mkv; do ffmpeg -i "$i" -c:v libx264 -profile:v main -level:v 4.0 -crf 20 -c:a copy -map 0 -vf scale=w='if(gt(dar,854/480),min(854,iw*sar),2*trunc(iw*sar*oh/ih/2))':h='if(gt(dar,854/480),2*trunc(ih*ow/iw/sar/2),min(480,ih))' encoded/"${i%.mkv}.mkv"; done


    


    Looks perfect and works great for 640x480. The only problem is that it returns 852x480, every time. I even tried a modification I found where you set the setsar=1 AFTER the scale filter, and it does nothing.

    


    These are the first warnings I get when I try to run the command, with a 16:9 video, but it still completes :

    


    `[Parsed_scale_0 @ 0x56299c22fcc0] Circular references detected for width 'if(gt(dar, 854/480), min(854,iw*sar), 2*trunc(iw*sar*oh/ih/2))' and height 'if(gt(dar, 854/480), 2*trunc(ih*ow/iw/sar/2), min(480,ih))' - possibly invalid.
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[Parsed_scale_0 @ 0x56299c20e5c0] Circular references detected for width 'if(gt(dar, 854/480), min(854,iw*sar), 2*trunc(iw*sar*oh/ih/2))' and height 'if(gt(dar, 854/480), 2*trunc(ih*ow/iw/sar/2), min(480,ih))' - possibly invalid.


    


    It encodes and I can see the resolution it outputs to :

    


    `Stream #0:0(eng): Video: h264 (H264 / 0x34363248), yuv420p(tv, top coded first (swapped)), 852x480 [SAR 1:1 DAR 71:40], q=2-31, 29.97 fps, 1k tbn


    


    The next video is a 4:3 video and gives these warnings, however the video still completes, this time the video encodes properly to 640x480 :your text

    


    `[Parsed_scale_0 @ 0x5623084d4140] Circular references detected for width 'if(gt(dar, 854/480), min(854,iw*sar), 2*trunc(iw*sar*oh/ih/2))' and height 'if(gt(dar, 854/480), 2*trunc(ih*ow/iw/sar/2), min(480,ih))' - possibly invalid.
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)`your text`
Press [q] to stop, [?] for help
[Parsed_scale_0 @ 0x5623084d7080] Circular references detected for width 'if(gt(dar, 854/480), min(854,iw*sar), 2*trunc(iw*sar*oh/ih/2))' and height 'if(gt(dar, 854/480), 2*trunc(ih*ow/iw/sar/2), min(480,ih))' - possibly invalid.


    


    The output details :

    


    `Stream #0:0(eng): Video: h264 (H264 / 0x34363248), yuv420p(tv, top coded first (swapped)), 640x48 [SAR 1:1 `your text`DAR 4:3], q=2-31, 29.97 fps, 1k tbn


    


    TL ;DR

    


    EDIT : The actual problem is that the command is encoding the 16:9 aspect ratio files to 852x480 instead of 854x480. 854x480 is actually what I would like. 640x480 for the 4:3 is fine. Apologies, for the lack of clarification.

    


    Videos encode (from original Farscape Starburst DVDs MPEG2) properly to libx264 640x480 for 4:3 but not to 854x480 for 16:9. 16:9 instead encodes to 852x480, despite what command is telling it to do.

    


    Advice ? Thanks in advance ! Anything to make my re-encoding a little bit less tedious. I've been googling for hours and searching, but nothing seems to make it click. Thank you again !

    


  • FFMPEG - converting interlaced 720x480 MPEG2 to scaled up progressive 1440x1080 HEVC (Nvidia available)

    6 février 2024, par PCSO SAR COMM

    I am trying to improve the video of a ripped DVD. The current file is encoded in MPEG2 interlaced and 720:480. I am trying see if it is possible, with a bit of conversion, for it to look better... possibly upscaling to near-HD if it is possible. My computer does have an Nvida (1050 Ti) card, so I was thinking that may help.

    


    I used

    


    ffmpeg -hwaccel cuda -i "input.mkv" -c:v hevc_nvenc -preset p7 -profile:v 1 -level 0 -tier 1 -tune 1 -vf yadif -vf "scale=1440x1080:flags=lanczos" -c:a aac -c:s srt output.mkv



    


    The "-vf yadif" portion in that was intended to de-interlace, after looking at ideas on de-interlacing but the output still ends up being interlaced. The interlace artifact is quite annoying when viewed on my computer.