Recherche avancée

Médias (91)

Autres articles (64)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (11565)

  • iOS Radio App : Need to extract and stream audio-only from HLS streams with video content

    20 décembre 2024, par Bader Alghamdi

    I'm developing an iOS radio app that plays various HLS streams. The challenge is that some stations broadcast HLS streams containing both audio and video (example : https://svs.itworkscdn.net/smcwatarlive/smcwatar/chunks.m3u8), but I want to :

    


    Extract and play only the audio track
Support AirPlay for audio-only streaming
Minimize data usage by not downloading video content
Technical Details :

    


    iOS 17+
Swift 6
Using AVFoundation for playback
Current implementation uses AVPlayer with AVPlayerItem
Current Code Structure :

    


    class StreamPlayer: ObservableObject { @Published var isPlaying = false private var player: AVPlayer? private var playerItem: AVPlayerItem?

func playStream(url: URL) {
    let asset = AVURLAsset(url: url)
    playerItem = AVPlayerItem(asset: asset)
    player = AVPlayer(playerItem: playerItem)
    player?.play()
}



    


    Stream Analysis : When analyzing the video stream using FFmpeg :

    


    CopyInput #0, hls, from 'https://svs.itworkscdn.net/smcwatarlive/smcwatar/chunks.m3u8':
  Stream #0:0: Video: h264, yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps
  Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp



    


    Attempted Solutions :

    


    Using MobileFFmpeg :

    


    let command = [
    "-i", streamUrl,
    "-vn",
    "-acodec", "aac",
    "-ac", "2",
    "-ar", "44100",
    "-b:a", "128k",
    "-f", "mpegts",
    "udp://127.0.0.1:12345"
].joined(separator: " ")

ffmpegProcess = MobileFFmpeg.execute(command)

I


    


    ssue : While FFmpeg successfully extracts audio, playback through AVPlayer doesn't work reliably.

    


    Tried using HLS output :

    


    let command = [
    "-i", streamUrl,
    "-vn",
    "-acodec", "aac",
    "-ac", "2",
    "-ar", "44100",
    "-b:a", "128k",
    "-f", "hls",
    "-hls_time", "2",
    "-hls_list_size", "3",
    outputUrl.path
]



    


    Issue : Creates temporary files but faces synchronization issues with live streams.

    



    


    Testing URLs :

    


    Audio+Video : https://svs.itworkscdn.net/smcwatarlive/smcwatar/chunks.m3u8
Audio Only : https://mbcfm-radio.mbc.net/mbcfm-radio.m3u8

    



    


    Requirements :

    


      

    • Real-time audio extraction from HLS stream
    • 


    • Maintain live streaming capabilities
    • 


    • Full AirPlay support
    • 


    • Minimal data usage (avoid downloading video content)
    • 


    • Handle network interruptions gracefully
    • 


    


    Questions :

    


      

    • What's the most efficient way to extract only audio from an HLS stream in real-time ?
    • 


    • Is there a way to tell AVPlayer to ignore video tracks completely ?
    • 


    • Are there better alternatives to FFmpeg for this specific use case ?
    • 


    • What's the recommended approach for handling AirPlay with modified streams ?
    • 


    


    Any guidance or alternative approaches would be greatly appreciated. Thank you !

    


    What I Tried :

    


      

    1. Direct AVPlayer Implementation :
    2. 


    


      

    • Used standard AVPlayer to play HLS stream
    • 


    • Expected it to allow selecting audio-only tracks
    • 


    • Result : Always downloads both video and audio, consuming unnecessary bandwidth
    • 


    



    

      

    1. FFmpeg Audio Extraction :
    2. 


    


    let command = [
    "-i", "https://svs.itworkscdn.net/smcwatarlive/smcwatar/chunks.m3u8",
    "-vn",                    // Remove video
    "-acodec", "aac",        // Audio codec
    "-ac", "2",              // 2 channels
    "-ar", "44100",          // Sample rate
    "-b:a", "128k",          // Bitrate
    "-f", "mpegts",          // Output format
    "udp://127.0.0.1:12345"  // Local stream
]
ffmpegProcess = MobileFFmpeg.execute(command)



    


    Expected : Clean audio stream that AVPlayer could play
Result : FFmpeg extracts audio but AVPlayer can't play the UDP stream

    



    

      

    1. HLS Segmented Approach :
    2. 


    


    swiftCopylet command = [
    "-i", streamUrl,
    "-vn",
    "-acodec", "aac",
    "-f", "hls",
    "-hls_time", "2",
    "-hls_list_size", "3",
    outputUrl.path
]



    


    Expected : Create local HLS playlist with audio-only segments
Result : Creates files but faces sync issues with live stream

    



    


    Expected Behavior :

    


      

    • Stream plays audio only
    • 


    • Minimal data usage (no video download)
    • 


    • Working AirPlay support
    • 


    • Real-time playback without delays
    • 


    


    Actual Results :

    


      

    • Either downloads full video stream (wasteful)
    • 


    • Or fails to play extracted audio
    • 


    • AirPlay issues with modified streams
    • 


    • Sync problems with live content
    • 


    


  • FFMPEG : How to keep only upper half of image ?

    4 août 2020, par Vic

    I would like to keep only upper half of the image in a video. How to do that ? The original video is 2048x2048 pixels. I would like a 2048x1024 resolution video with the upper half of the original.
If I enter the following :

    


    ffmpeg -y -i in.avi -vf v360=fisheye:equirect:ih_fov=180:iv_fov=180,transpose=1,crop=in_w:in_h/2:0:0 -c:a copy out.avi


    


    then I get a 2048x2048 video where the upper half is black and the bottom is correct (it is the upper half of the original)...
The original video is from a 180 degree camera. If I omit the crop part from the video filter, then I get the desired perspective, but bottom half of the image is not needed...

    


    Log :

    


    Input #0, avi, from 'in.avi':   Metadata:
    encoder         : Lavf55.48.100   Duration: 00:00:11.00, start: 0.000000, bitrate: 3821 kb/s
    Stream #0:0: Video: h264 (Main) (H264 / 0x34363248), yuvj420p(pc, bt709, progressive), 2048x2048, 3828 kb/s, 20 fps, 20 tbr, 20 tbn, 40 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s Stream mapping:   Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))   Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [swscaler @ 0000027b3e1d5a40] deprecated pixel format used, make sure you did set range correctly Output #0, avi, to 'out.avi':   Metadata:
    ISFT            : Lavf58.49.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 2048x2048, q=2-31, 200 kb/s, 20 fps, 20 tbn, 20 tbc
    Metadata:
      encoder         : Lavc58.99.100 mpeg4
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s frame=  220 fps= 32 q=31.0 Lsize=    2368kB time=00:00:11.00 bitrate=1763.8kbits/s speed= 1.6x video:2353kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.634127%


    


  • Revision f1581b3b2e : Add ARF validation for compound inter mode check This commit enforces ARF valid

    15 septembre 2014, par Jingning Han

    Changed Paths :
     Modify /vp9/encoder/vp9_rdopt.c



    Add ARF validation for compound inter mode check

    This commit enforces ARF validation check for compound inter modes.
    It avoids potential access to ARF in the encoding process if it
    is not allowed.

    Change-Id : I055fec946b5d19d97937dc9001e1e564923e2439