
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (45)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Publier sur MédiaSpip
13 juin 2013Puis-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
Sur d’autres sites (7943)
-
How to reference FfmpegInteropX library in a Unity App zu build UWP HoloLens2 App
20 avril 2023, par T777I tried to recreate your Mediaplayer class on hololens2 to use it to rende frames on an mrtk2 display.
Like done here :
Livestream playback on Hololens2


I could successfully reference SharpDX Lib and use Windows.X classes with
#if ENABLE_WINMD_SUPPORT
..#endif
. But im still struggling to reference any FfmpeggInteropX classes in my Unity Scripts.

I imported the library with NuGetForUnity Library and expected to use its referenced classes needed by the "livestream playback on hololens script"


But i was getting an error with mismatching target version (only uap10) for the library. I build my uwp app for WindowsTargetPlatform 10.0.19041, unity 2021.10.3f and .net5.0..


Can you please provide more information about a working targetVersion, unity version and buildchain version in this lib ?


-
ffmpeg split_by_silence output flac have broken metadata [duplicate]
20 mars 2023, par MartinInput flac File : https://file.io/D1EXEgJ0OtgM


I have a shell script
split_by_silence.sh
which takes an input audio file, detects split points where silence (or very low volume audio) occurs, and then splits the audio file using ffmpeg into the individual split point segments.

So if 10 split points = 11 audio files exported.


When I run it on an mp3, it produces 11 files (as expected with my input file) and each file has correct length metadata.


But when ffmpeg splits a flac file, the metadata output for 'length' is broken


I've tried following the closest question, marked as a duplicate, here :
Cutting FLAC using ffmpeg does not change timestamps accordingly


By adding a step to re-encode my flac file in ffmpeg :


ffmpeg -i full.flac -ss 0 -t 2241 fixed.flac


Which I'm not sure if is working, but outputs a fixed.flac file. Which when I run with my split command :


ffmpeg -i "inputFile.flac" -c copy -map 0 -f segment -segment_times "22,441,5567,1122,etc..." "%d_output.flac"


The output files still have broken flac 'length' metadata, like you can see in my image, even though when opened in audacity, the file does have a real length. ffmpeg just encoded the wrong value ?




This is my current ffmpeg version :


$ ffmpeg
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)



And here is my .sh file I run with


$ ./split_by_silence.sh


# -----------------------
# SPLIT BY SILENCE
# Requirements:
# ffmpeg
# $ apt-get install bc
# How To Run:
# $ ./split_by_silence.sh "full_lowq.flac" %03d_output.flac

# output title format
OUTPUTTITLE="%d_output.flac"
# input audio filepath
IN="/mnt/c/Users/marti/Documents/projects/split_by_silence2/full.flac"
# output audio filepath
OUTPUTFILEPATH="/mnt/c/Users/marti/Documents/projects/split_by_silence2"
# ffmpeg option: split input audio based on this silencedetect value
SD_PARAMS="-11dB"
MIN_FRAGMENT_DURATION=120 # split option: minimum fragment duration
export MIN_FRAGMENT_DURATION

# -----------------------
# step: ffmpeg
# goal: get comma separated list of split points (use ffmpeg to determine points where audio is at SD_PARAMS [-18db] )

echo "_______________________"
echo "Determining split points..."
SPLITS=$(
 ffmpeg -v warning -i "$IN" -af silencedetect="$SD_PARAMS",ametadata=mode=print:file=-:key=lavfi.silence_start -vn -sn -f s16le -y /dev/null \
 | grep lavfi.silence_start= \
 | cut -f 2-2 -d= \
 | perl -ne '
 our $prev;
 INIT { $prev = 0.0; }
 chomp;
 if (($_ - $prev) >= $ENV{MIN_FRAGMENT_DURATION}) {
 print "$_,";
 $prev = $_;
 }
 ' \
 | sed 's!,$!!'
)
echo "split points list= $SPLITS"

# add '5.5' to each split\
IFS=',' read -ra SPLITS_ARRAY <<< "$SPLITS"
for i in "${!SPLITS_ARRAY[@]}"; do
 SPLITS_ARRAY[i]=$(echo "${SPLITS_ARRAY[i]}+5.5" | bc)
done

SPLITS=$(IFS=','; echo "${SPLITS_ARRAY[*]}")
echo "SPLITS=$SPLITS"

# using the split points list, calculate how many output audio files will be created 
num=0
res="${SPLITS//[^,]}"
CHARCOUNT="${#res}"
num=$((CHARCOUNT + 2))
echo "_______________________"
echo "Exporting $num tracks with ffmpeg"

ffmpeg -i "$IN" -c copy -map 0 -f segment -segment_times "$SPLITS" "$OUTPUTFILEPATH/$OUTPUTTITLE"

echo "Done."

echo "------------------------------------------------"
echo "$num TRACKS EXPORTED"



I think this is an open defect ?
https://trac.ffmpeg.org/ticket/4905


-
Not able to merge init.mp4 and seg-*.m4s with ffmpeg and python due to its file format difference
1er février 2023, par XiBBaLI'm developing video downloader (only for free videos) for korean anime streaming site https://laftel.net/


I guess laftel.net uses mpeg-dash for their streaming.
I found "init.mp4" file and "segments-number.m4s" files in chrome developer tools.


Code below downloads seg-1.m4s (name of the first segment) to seg-239.m4s (name of the last segment) file and init.mp4 file and it works.



(Skip the beginning becasue there is a code that collects "Request-URL" for each .m4s files in network stream)


#variable "found" is part of the "Request-URL"

def curl_m4s():
 for i in range(1,240): #number of the .m4s segment file is constant at 239
 vid_url = f"https://mediacloud.laftel.net/{found}/video/avc1/2/seg-{i}.m4s"
 aud_url = f"https://mediacloud.laftel.net/{found}/audio/mp4a/eng/seg-{i}.m4s"
 
 if i < 10: #for single digit num
 os.system(f"curl {vid_url} > {location}/vids/vid00{i}.m4s")
 os.system(f"curl {aud_url} > {location}/auds/aud00{i}.m4s")
 sleep(random.randint(1,3))
 
 elif i < 100: #for double digit num
 os.system(f"curl {vid_url} > {location}/vids/vid0{i}.m4s")
 os.system(f"curl {aud_url} > {location}/auds/aud0{i}.m4s")
 sleep(random.randint(1,3))
 
 else: #for three digit num
 os.system(f"curl {vid_url} > {location}/vids/vid{i}.m4s")
 os.system(f"curl {aud_url} > {location}/auds/aud{i}.m4s")
 sleep(random.randint(1,3))

location = os.getcwd()

os.system(f"curl https://mediacloud.laftel.net/{found}/video/avc1/2/init.mp4 > {location}/vids/vid_init.mp4")
os.system(f"curl https://mediacloud.laftel.net/{found}/audio/mp4a/eng/init.mp4 > {location}/auds/aud_init.mp4")
os.system(f"curl https://mediacloud.laftel.net/{found}/stream.mpd > {location}/stream.mpd")

curl_m4s()
#use curl in cmd and downloads each of the .m4s (001 ~ 239)

 



So in the vids folder i have "init.mp4" for video and "seg-1.m4s seg-239.m4s" for video
and in the auds folder i have "init.mp4" for audio and "seg-1.m4s seg-239.m4s" for audio


Problem is, I cannot merge init file and segment files.
I have no idea about combining .mp4 and .m4s together.
There are a lot of example codes for merging init.m4s + seg-.m4s but I couldn't find init.mp4 + seg-.mp4 codes.


I tried to merge segments together first, like this and it works.


location = os.getcwd()

os.system(f"cd {location}")
os.system("copy /b vid*.m4s vid_full.m4s")



and now, i want to merge init.mp4 becasue it has very much information about whole video files.
But how ??


I tried these and none of them worked (looks like Successfull merge but it do not contain any watchable video)


# vid_full is merged segment files (seg-1.m4s + ... + seg-239.m4s)
 
1. 
os.system("copy /b init.mp4 + vid*.m4s video_full.m4s")
os.system("ffmpeg -i video_full.m4s -c:a copy video_full.mp4")


2. 
os.system("type vid_init.mp4 index.txt > Filename.mp4")


3. 
import os 

os.system("ffmpeg -i vid_full.m4s -c:a copy vid_full.mp4")
os.system("copy /b vid_init.mp4 + vid_full.mp4 VIDEO.mp4")



All problem occurs the format of the init file is .mp4. If it was .m4s I guess I could merge it.


and I guess i must merge init file and segments files together both in .m4s format. Is it right ?
Via ffmpeg, i couldn't encode init.mp4 to init.m4s so this is the problme also.


So, Please help me merge init.mp4 and segments.m4s


All methods are wellcome at least it is based on python.


- 

- I tried to merge init.mp4 + merged_segment.m4s but it failed
- I tried to convert init.mp4 to init.m4s via ffmpeg but it failed
- I tried to convert all the segments to .mp4 files and merge into init.mp4 but it failed








I want to merge init file and segment files and make playable video.
Pleas Teach me how to do this.


Links below are what I used for my test :


[Laftel.net URL]
https://laftel.net/player/40269/46123


[Request URL for init.mp4 (video)]
https://mediacloud.laftel.net/2021/04/46773/v15/video/dash/video/avc1/2/init.mp4


[Request URL for init.mp4 (audio)]
https://mediacloud.laftel.net/2021/04/46773/v15/video/dash/audio/mp4a/eng/init.mp4


[Request URL for seg-1.m4s (video)]
https://mediacloud.laftel.net/2021/04/46773/v15/video/dash/video/avc1/2/seg-1.m4s


[Request URL for seg-1.m4s (audio)]
https://mediacloud.laftel.net/2021/04/46773/v15/video/dash/audio/mp4a/eng/seg-1.m4s