Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

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

Autres articles (58)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (15459)

  • Getting ffmpeg error ‘Ignoring unsupported var reason rtmp :// : I/O error’

    6 septembre 2022, par Lectos Lacious

    Same setting worked normally for months, suddenly start to receive ffmpeg errors about ‘unsupported var’ related to rtmp and streaming stop working. Is this error about unavailable server or bad url ? Can someone enlighten me about meaning of unsupported var ?

    


    NOTE : replaced actual url with ‘someurl’

    


    LOG :
Input #0, rtsp, from 'rtsp ://192.168.40.44:554/1' :
    
Metadata :
    
title : 10
    
Duration : N/A, start : 0.000000, bitrate : N/A
    
Stream #0:0 : Video : h264, yuvj420p(pc, bt709), 1280x720, 15 tbr, 90k tbn, 180k tbc
    
Stream #0:1 : Audio : aac, 48000 Hz, stereo, fltp
    
[rtmp @ 0x7f9fdd58c5e0] Ignoring unsupported var reason
    
rtmp ://someurl : I/O error
    
Exiting normally, received signal 2.
    
Input #0, rtsp, from 'rtsp ://192.168.40.44:554/1' :
    
Metadata :
    
title : 10
    
Duration : N/A, start : 0.000000, bitrate : N/A
    
Stream #0:0 : Video : h264, yuvj420p(pc, bt709), 1280x720, 15 fps, 15 tbr, 90k tbn, 180k tbc
    
Stream #0:1 : Audio : aac, 48000 Hz, stereo, fltp
    
[rtmp @ 0x7f62a5869b20] Ignoring unsupported var reason
    
rtmp ://someurl : I/O error
    
Exiting normally, received signal 2.
    
[rtsp @ 0x7f0b4add32a0] max delay reached. need to consume packet
    
[rtsp @ 0x7f0b4add32a0] RTP : missed 2 packets
    
Input #0, rtsp, from 'rtsp ://192.168.40.44:554/1' :
    
Metadata :
    
title : 10
    
Duration : N/A, start : 0.000000, bitrate : N/A
    
Stream #0:0 : Video : h264, yuvj420p(pc, bt709), 1280x720, 15 fps, 15 tbr, 90k tbn, 180k tbc
    
Stream #0:1 : Audio : aac, 48000 Hz, stereo, fltp
    
[rtmp @ 0x7f0b4af13840] Ignoring unsupported var reason
    
rtmp ://someurl : I/O error
    
Exiting normally, received signal 2.
    
Input #0, rtsp, from 'rtsp ://192.168.40.44:554/1' :
    
Metadata :
    
title : 10
    
Duration : N/A, start : 0.000000, bitrate : N/A
    
Stream #0:0 : Video : h264, yuvj420p(pc, bt709), 1280x720, 15 fps, 15 tbr, 90k tbn, 180k tbc
    
Stream #0:1 : Audio : aac, 48000 Hz, stereo, fltp
    
[rtmp @ 0x7fc61ef8b880] Ignoring unsupported var reason

    


  • ffmpeg concat work in one order but not the other

    11 octobre 2023, par user3083171

    So I took a video and cut it two ways, one with reencoding and one without reencoding, call them R and C (cut). Im trying to do concatenation without reencoding, and I'm able to concat the video in all orders , , , , but the sound disappears for and I have no idea why.

    


    I know I can concatenate with reencoding, but my question is specifically if someone knows why the sound drops in and maybe how to fix it. Here is some code in python

    


    import os
import json
import subprocess

video_file = 'yourpath/vid.mp4'
# get the time between frames

ffprobe_command = f"ffprobe -v error -select_streams v:0 -show_entries stream=width,height,r_frame_rate,duration,nb_frames,codec_name -of json {video_file}"
result = subprocess.run(ffprobe_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)

# Parse the JSON output from ffprobe
json_data = json.loads(result.stdout)

# Extract video information from the JSON data
video_info = {
    'length': int(json_data['streams'][0]['nb_frames']),
    'frames': int(json_data['streams'][0]['nb_frames']),
    'duration_seconds': float(json_data['streams'][0]['duration']),
    'fps': eval(json_data['streams'][0]['r_frame_rate']),
    'codec': json_data['streams'][0]['codec_name'],
    'time_between_frames': 1 / eval(json_data['streams'][0]['r_frame_rate'])
}
# get the time between frames
delta = video_info['time_between_frames']

directory, filename_with_extension = os.path.split(video_file)
filename, extension = os.path.splitext(filename_with_extension)
tag = "_reencode"
new_filename = f"{filename}{tag}{extension}"
reencode_file = directory + "/" + new_filename

tag = "_justcut"
new_filename = f"{filename}{tag}{extension}"
justcut_file = directory + "/" + new_filename

tag = "_concat"
new_filename = f"{filename}{tag}{extension}"
concat_file = directory + "/" + new_filename

start_time = 0.0 + 108 * delta
end_time = start_time + 180 * delta
end_frame = round(end_time / delta)
start_frame = round(start_time / delta)

# Reencode
cmd = [
    "ffmpeg",
    "-i", video_file,
    "-ss", str(start_time),
    "-to", str(end_time),
    # "-c:a", "copy",
    "-c:v", "libx264",
    "-bf", str(0), # no B frames
    "-crf", str(18),  # new
    "-preset", "slow",  # new
    # "-g", str(60), #forces key_frames
    # "-force_key_frames expr:gte(t, n_forced * GOP_LEN_IN_SECONDS)"
    # "-c:v", "mpeg4", #"copy", #"mpeg4"
    # "-q:v", "2",
    "-c:a", "copy",
    # "video_track_timescale", str(90)+"K",
    reencode_file
]
subprocess.run(cmd, check=True)

# Just Cut
cmd = [
    'ffmpeg',
    '-i', video_file,
    '-c', 'copy',
    '-ss', str(start_time),
    '-to', str(end_time),
    justcut_file
]
subprocess.run(cmd, check=True)

# Concat without reencoding
def concatenate_videos_without_reencoding(video1, video2, output_file):
    try:
        # Create a text file listing the videos to concatenate
        with open('input.txt', 'w') as f:
            f.write(f"file '{video1}'\n")
            f.write(f"file '{video2}'\n")

        # Run ffmpeg command to concatenate videos without re-encoding
        # subprocess.run(['ffmpeg', '-f', 'concat', '-safe', '0', '-i', 'input.txt', '-c', 'copy', output_file])

        subprocess.run(
            ['ffmpeg', '-f', 'concat', '-safe', '0', '-i', 'input.txt', '-vcodec', 'copy',
             '-acodec', 'copy', "-strict", "experimental", output_file])

        print(f"Videos concatenated successfully without re-encoding. Output saved to {output_file}")
    except Exception as e:
        print(f"An error occurred: {e}")
    finally:
        # Remove the temporary input file
        if os.path.exists('input.txt'):
            os.remove('input.txt')
# Has sound
concatenate_videos_without_reencoding(justcut_file, justcut_file, concat_file)
os.remove(concat_file)
# Has sound
concatenate_videos_without_reencoding(reencode_file, reencode_file, concat_file)
os.remove(concat_file)
# Has sound
concatenate_videos_without_reencoding(justcut_file, reencode_file, concat_file)
os.remove(concat_file)
# Has NO sound
concatenate_videos_without_reencoding(reencode_file, justcut_file, concat_file)
os.remove(concat_file)


    


    As you can see I tried a bunch of stuff but I have no clue why the audio is not working. I've tried to force the two input videos to be as similar as possible in term of specs and keyframes and fps etc. Nothing seems to work, kinda frustrating.

    


    I've also tried this with both mpeg4 and h264 and different framerates, but still get this behavior.

    


  • FFmpeg delay and mix audio streams while keeping overall volume constant

    5 octobre 2020, par unstuck

    I have about 100 audio streams, all with the same intro music/sound, and in some of them the intro is delayed by a few seconds. I want to align and mix all the audio streams such that all the intros play at the same time and the output remains pretty much the same volume throughout. I know in advance how much each stream needs to be delayed by.

    


    Like this in Audacity. Each audio stream is aligned to the intro, and the duration before the intro is arbitrary. (This doesn't solve the volume problem though.)

    


    What I have so far uses adelay and amix. It looks something like this but with more audio streams.

    


    ffmpeg -i 00.oga \
       -i 01.oga \
       -i 02.oga \
       -i 03.oga -filter_complex \
"[0]adelay=delays=     123S:all=1[a0]; \
 [1]adelay=delays=    2718S:all=1[a1]; \
 [2]adelay=delays= 6283185S:all=1[a2]; \
 [3]adelay=delays=11235813S:all=1[a3]; \
 [a0][a1][a2][a3]amix=inputs=4" output.oga


    


    In this example the first stream is delayed by 123 samples, the second by 2 718, the third by 6 283 185, and the by fourth 11 235 813.

    


    This works, except at the beginning of the output it's very quiet. When fed n streams, amix makes each stream 1/nth its original volume, which is a good thing in principle. In this case it's not an entirely good thing, because at the beginning of the output 3 of the 4 audio streams are silent (adelay fills delayed streams with silence), meaning the only audible stream is 1/4 = 25% of its original volume. When the second stream becomes audible, the overall volume is 2/4, with three audible streams 3/4, and with all four streams audible it's 4/4 = 100%.

    


    Instead, I want the the first stream to be at 100% volume when it's the only audible one, 50% volume each when there are two audible streams, etc.

    


    Is there a way to make it so when there are n audio streams but m non-silent audio streams, the volume for each of the audio streams is 1/m not 1/n ? amix does this when streams end ; if one stream ends it changes the volume of the others from 1/n to 1/n-1 over a period of time (dropout_transition : https://ffmpeg.org/ffmpeg-filters.html#amix).

    


    I found a similar question where someone wanted to do something like this but only with 2 audio streams. The answer was to split, trim, and change the volume manually. This would be incredibly complicated with 100 audio streams or more, like in my situation.

    


    Is there any easy way to achieve this, even without FFmpeg ?