Recherche avancée

Médias (91)

Autres articles (65)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (9293)

  • FFMPEG merge continous input stream with intermittent input stream without waiting

    18 mai 2024, par gian848396

    My goal is to take two audio inputs and merge them. The below works for this, however, I want a continuous output stream even when only one of the two inputs are being streamed into FFmpeg. The below only produces an output when the stdin pipe input is receiving audio.

    


    Here I have an FFmpeg child process where one input is a stream from the device's microphone, the other comes from wav audio buffers sent to the server in clips by a client.

    


    @Injectable()
export class AppService {
  ffmpegProcess: ChildProcessWithoutNullStreams;

  constructor() {
    this.start();
  }

  start() {
    this.ffmpegProcess = spawn(ffmpegPath, [
      '-f', 'avfoundation', // mac os media devices
      '-i', ':1', // mac os microphone input
      '-f', 'wav',
      '-i', 'pipe:', // stdin input source
      '-codec:a', 'aac',
      '-b:a', '128k',
      // '-ab', '32k',
      '-f', 'hls',
      '-hls_time', '4', // Segment duration (in seconds)
      '-hls_list_size', '3', // Number of HLS segments to keep in playlist
      '-hls_flags', 'delete_segments', // Automatically delete old segments
      '-filter_complex', 'amerge=inputs=2',
      'public/output.m3u8' // HLS playlist file name
    ]);
  }
}



    


    Here I'm piping wav audio buffers posted to the server and streamed as the stdin source to the FFMepg process, to be merged into the output.

    


    @Controller()
export class AppController {
  constructor(
    private readonly appService: AppService,
  ) { }

  @Post('broadcast')
  @UseInterceptors(FileInterceptor('audio_data'))
  uploadFile(@UploadedFile() file: Express.Multer.File) {
    console.log(file);
    Readable.from(file.buffer).pipe(this.appService.ffmpegProcess.stdin);
  }
}


    


    I've considered trying to pass in a null stream for the stdin when no submitted wav audio is present though I'm spinning my wheels. How can I produce a continuous output while only one of the two inputs are streaming, and while both are streaming ?

    


  • Merge (concat) all video file present in '43. DP (Part1)' and put it into '43. DP (Part1)' and give name merged (concat) file to folder name

    29 mars 2024, par Anu Mau

    I have parent folder alpha part 3 which contain child folder 43. DP (Part1), 44. DP (Part2), 45. DP (Part3).

    


    I want to merge (concat) all video file present in 43. DP (Part1) and put it into 43. DP (Part1) and give name merged (concat) file to folder name.

    


    And as it is do for all.

    


    alpha part 3
├── 43. DP (Part1)
│   ├── _43.1_Introduction to DP.mp4
│   ├── _43.2_What is DP_ (Definition).mp4
│   ├── _43.3_Ways of DP.mp4
│   ├── _43.4_7 Important Concepts.mp4
│   ├── _43.5_Climbing Stairs (Recursion).mp4
│   ├── _43.6_Climbing Stairs (Memoization DP).mp4
│   ├── _43.7_Climbing Stairs Variation.mp4
│   └── _43.8_Climbing Stairs (Tabulation DP).mp4
├── 44. DP (Part2)
│   ├── _44.1_Types of Knapsack problems.mp4
│   ├── _44.2_0-1 Knapsack (Recursion).mp4
│   ├── _44.3_0-1 Knapsack (Memoization).mp4
│   ├── _44.4_0-1 Knapsack (Tabulation).mp4
│   ├── _44.5_Target Sum Subset (Tabulation).mp4
│   ├── _44.6_Target Sum Subset (Code).mp4
│   └── _44.7_Unbounded Knapsack (Tabulation).mp4
├── 45. DP (Part3)
│   ├── _45.1_Coin Change (Live Class).mp4
│   ├── _45.2_Rod Cutting.mp4
│   ├── _45.3_Longest Common Subsequence (Recursion).mp4
│   ├── _45.4_LCS (Memoization).mp4
│   └── _45.5_LCS (Tabulation).mp4



    


    Right or is any way to go this at once. Write Python code with FFmpeg.

    


    My Python code is as follows ; what do I need to adjust ?

    


    import os
import subprocess

# Function to merge videos in a folder
def merge_videos_in_folder(folder_path):
    print(f"Merging videos in folder: {folder_path}")

    # Use FFmpeg to concatenate all video files within the folder
    cmd = [
        "ffmpeg",
        "-f", "concat",
        "-safe", "0",
        "-i", "<(find '{}' -type f -name '*.mp4' -exec echo 'file {{}}' \;)".format(folder_path),
        "-c", "copy",
        os.path.join(folder_path, "merged_video.mp4")
    ]
    subprocess.run(cmd, capture_output=True, text=True)

    print(f"Videos merged for folder: {folder_path}")

# Specify the directory containing folders with video files
parent_dir = "/path/to/parent_directory"

# Loop through each folder in the input directory
for folder in os.listdir(parent_dir):
    folder_path = os.path.join(parent_dir, folder)
    if os.path.isdir(folder_path):
        # Merge videos in the current folder
        merge_videos_in_folder(folder_path)

print("All videos merged successfully!")


    


  • Issue with Quick Sync Video (QSV) Hardware Acceleration in FFmpeg

    6 mars 2024, par Linganiveth S.G

    It appears that FFmpeg is unable to create the necessary QSV device for decoding the H.264 video stream.

    


    I am writing to report an issue I encountered while attempting to use No device available for decoder error. hardware acceleration with FFmpeg on my system.

    


    When I run the following command to test QSV hardware acceleration :

    


    ./ffmpeg -hwaccel qsv -i input.mp4 output.ts

    


    I encounter the following error :

    


    [AVHWDeviceContext @ 0x558c6886a5c0] Error setting child device handle: -17
Device creation failed: -1313558101.
No device available for decoder: device type qsv needed for codec h264_qsv.


    


    It appears that FFmpeg is unable to create the necessary QSV device for decoding the H.264 video stream.

    


    Here are some additional details about my system :

    


    **- Operating System : Ubuntu 22.04.4 LTS

    


      

    • FFmpeg Version : 6.0
    • 


    • Processor : 12th Gen Intel(R) Core(TM) i5-12400
    • 


    • Graphics Card : Mesa Intel® UHD Graphics 730 (ADL-S GT1)**
    • 


    


    I have ensured that my system meets the requirements for QSV hardware acceleration, but I am still encountering this issue.

    


    Could anyone please assist me in resolving this issue ? Any guidance or suggestions provided would be greatly appreciated.