
Recherche avancée
Autres articles (4)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)
Sur d’autres sites (1677)
-
Hacking the Popcorn Hour C-200
Update : A new firmware version has been released since the publication of this article. I do not know if the procedure described below will work with the new version.
The Popcorn Hour C-200 is a Linux-based media player with impressive specifications. At its heart is a Sigma Designs SMP8643 system on chip with a 667MHz MIPS 74Kf as main CPU, several co-processors, and 512MB of DRAM attached. Gigabit Ethernet, SATA, and USB provide connectivity with the world around it. With a modest $299 on the price tag, the temptation to repurpose the unit as a low-power server or cheap development board is hard to resist. This article shows how such a conversion can be achieved.
Kernel
The PCH runs a patched Linux 2.6.22.19 kernel. A source tarball is available from the manufacturer. This contains the sources with Sigma support patches, Con Kolivas’ patch set (scheduler tweaks), and assorted unrelated changes. Properly split patches are unfortunately not available. I have created a reduced patch against vanilla 2.6.22.19 with only Sigma-specific changes, available here.
The installed kernel has a number of features disabled, notably PTY support and oprofile. We will use kexec to load a more friendly one.
As might be expected, the PCH kernel does not have kexec support enabled. It does however, by virtue of using closed-source components, support module loading. This lets us turn kexec into a module and load it. A patch for this is available here. To build the module, apply the patch to the PCH sources and build using this configuration. This will produce two modules, kexec.ko and mips_kexec.ko. No other products of this build will be needed.
The replacement kernel can be built from the PCH sources or, if one prefers, from vanilla 2.6.22.19 with the Sigma-only patch. For the latter case, this config provides a minimal starting point suitable for NFS-root.
When configuring the kernel, make sure CONFIG_TANGOX_IGNORE_CMDLINE is enabled. Otherwise the command line will be overridden by a useless one stored in flash. A good command line can be set with CONFIG_CMDLINE (under “Kernel hacking” in menuconfig) or passed from kexec.
Taking control
In order to load our kexec module, we must first gain root privileges on the PCH, and here a few features of the system are working to our advantage :
- The PCH allows mounting any NFS export to access media files stored there.
- There is an HTTP server running. As root.
- This HTTP server can be readily instructed to fetch files from an NFS mount.
- Files with a name ending in .cgi are executed. As root.
All we need do to profit from this is place the kexec modules, the kexec userspace tools, and a simple script on an NFS export. Once this is done, and the mount point configured on the PCH, a simple HTTP request will send the old kernel screaming to /dev/null, our shiny new kernel taking its place.
The rootfs
A kernel is mostly useless without a root filesystem containing tools and applications. A number of tools for cross-compiling a full system exist, each with its strengths and weaknesses. The only thing to look out for is the version of kernel headers used (usually a linux-headers package). As we will be running an old kernel, chances are the default version is too recent. Other than this, everything should be by the book.
Assembling the parts
Having gathered all the pieces, it is now time to assemble the hack. The following steps are suitable for an NFS-root system. Adaptation to a disk-based system is left as an exercise.
- Build a rootfs for MIPS 74Kf little endian. Make sure kernel headers used are no more recent than 2.6.22.x. Include a recent version of the kexec userspace tools.
- Fetch and unpack the PCH kernel sources.
- Apply the modular kexec patch.
- Using this config, build the modules and install them as usual to the rootfs. The version string must be 2.6.22.19-19-4.
- From either the same kernel sources or plain 2.6.22.19 with Sigma patches, build a vmlinux and (optionally) modules using this config. Modify the compiled-in command line to point to the correct rootfs. Set the version string to something other than in the previous step.
- Copy vmlinux to any directory in the rootfs.
- Copy kexec.sh and kexec.cgi to the same directory as vmlinux.
- Export the rootfs over NFS with full read/write permissions for the PCH.
- Power on the PCH, and update to latest firmware.
- Configure an NFS mount of the rootfs.
- Navigate to the rootfs in the PCH UI. A directory listing of bin, dev, etc. should be displayed.
- On the host system, run the kexec.sh script with the target hostname or IP address as argument.
- If all goes well, the new kernel will boot and mount the rootfs.
Serial console
A serial console is indispensable for solving boot problems. The PCH board has two UART connectors. We will use the one labeled UART0. The pinout is as follows (not standard PC pinout).
+-----------+ 2| * * * * * |10 1| * * * * * |9 -----------+ J7 UART0 /---------------------/ board edge
Pin Function 1 +5V 5 Rx 6 Tx 10 GND The signals are 3.3V so a converter, e.g. MAX202, is required for connecting this to a PC serial port. The default port settings are 115200 bps 8n1.
-
How to concatenate multiple init segments and chunks from the DASH video stream ?
17 novembre 2022, par UmakantI'have written a dash player in python that receives chunks from the DASH server using adaptive bitrate algorithm. Once entire video streaming is over, I need to concatenate all following received segments into one single mp4 file.


root@cap31:~/don# ls
chunk0-00001.m4s chunk2-00015.m4s chunk2-00035.m4s chunk2-00055.m4s chunk2-00075.m4s chunk3-00010.m4s chunk3-00030.m4s chunk3-00050.m4s chunk3-00070.m4s
chunk0-index.m4s chunk2-00017.m4s chunk2-00037.m4s chunk2-00057.m4s chunk2-00077.m4s chunk3-00012.m4s chunk3-00032.m4s chunk3-00052.m4s chunk3-00072.m4s
chunk1-00002.m4s chunk2-00019.m4s chunk2-00039.m4s chunk2-00059.m4s chunk2-00079.m4s chunk3-00014.m4s chunk3-00034.m4s chunk3-00054.m4s chunk3-00074.m4s
chunk1-index.m4s chunk2-00021.m4s chunk2-00041.m4s chunk2-00061.m4s chunk2-00081.m4s chunk3-00016.m4s chunk3-00036.m4s chunk3-00056.m4s chunk3-00076.m4s
chunk2-00003.m4s chunk2-00023.m4s chunk2-00043.m4s chunk2-00063.m4s chunk2-00083.m4s chunk3-00018.m4s chunk3-00038.m4s chunk3-00058.m4s chunk3-00078.m4s
chunk2-00005.m4s chunk2-00025.m4s chunk2-00045.m4s chunk2-00065.m4s chunk2-00085.m4s chunk3-00020.m4s chunk3-00040.m4s chunk3-00060.m4s chunk3-00080.m4s
chunk2-00007.m4s chunk2-00027.m4s chunk2-00047.m4s chunk2-00067.m4s chunk2-index.m4s chunk3-00022.m4s chunk3-00042.m4s chunk3-00062.m4s chunk3-00082.m4s
chunk2-00009.m4s chunk2-00029.m4s chunk2-00049.m4s chunk2-00069.m4s chunk3-00004.m4s chunk3-00024.m4s chunk3-00044.m4s chunk3-00064.m4s chunk3-00084.m4s
chunk2-00011.m4s chunk2-00031.m4s chunk2-00051.m4s chunk2-00071.m4s chunk3-00006.m4s chunk3-00026.m4s chunk3-00046.m4s chunk3-00066.m4s chunk3-index.m4s
chunk2-00013.m4s chunk2-00033.m4s chunk2-00053.m4s chunk2-00073.m4s chunk3-00008.m4s chunk3-00028.m4s chunk3-00048.m4s chunk3-00068.m4s



I tried all the solutions mentioned on following links :
https://trac.ffmpeg.org/wiki/Concatenate
ffmpeg converting m4s to mp4


Most common solution was to append the
cat
files in mp4 :

for x in *index* *-*[0-9]*.m4s; do cat $x >> output.mp4; done



But this video does not play after the second init segment starts rendering resulting into video getting stuck. I believe maybe because in my case, I have multiple init segments pointing to different chunks.


Hence, I'm looking for some way to get the one single mp4 video file by concatanating all these init segments and chunks correctly.


-
Revision 30966 : eviter le moche ’doctype_ecrire’ lors de l’upgrade
17 août 2009, par fil@… — Logeviter le moche ’doctype_ecrire’ lors de l’upgrade