Skip to content

Instantly share code, notes, and snippets.

@gdavila
Last active December 30, 2025 11:58
Show Gist options
  • Select an option

  • Save gdavila/dcecd585d8f5188104ca8ee7e937b939 to your computer and use it in GitHub Desktop.

Select an option

Save gdavila/dcecd585d8f5188104ca8ee7e937b939 to your computer and use it in GitHub Desktop.
Comandos utiles
  • Send RTMP - bitmovin sample:
ffmpeg -re -f lavfi -i color=black:640x480:rate=ntsc,format=yuv420p -g 6 -r ntsc \
-b:v 5M -minrate:v 5M -maxrate:v 5M -bufsize:v 1M -preset ultrafast \
-vcodec libx264  -r ntsc -tune zerolatency  -muxrate 8M  \
-pcr_period 40 -f flv rtmp://live-input.bitmovin.com/streams/a1142cd9-69b0-45d2-a655-a6c980b806c5
  • Grabar multicast:
tsp -v -I ip  10.254.245.141@239.123.101.3:49410 -P until --seconds 10 -O file test.ts
  • Stream Loop:
tsp -v --max-input-packets 7 -I file --infinite Cinecanal_IRDs_45s_scte35v2.ts -P continuity --fix -P pcradjust -P pcrbitrate -P regulate -O ip 239.123.123.20:60000
  • Listar sevicios de multicast:
tsp  -I ip  10.254.245.141@239.123.101.5:49410 -P until --seconds 10 -P analyze -O drop
  • Mostrar info de frames (se muestran solo los 7 primeros frames ):
ffprobe Cinecanal_IRDs_45s.ts -select_streams v -show_frames -hide_banner -print_format json -read_intervals %+#7
  • Imprimir frames tipo I
ffprobe -select_streams v -show_frames -show_entries frame=pict_type -of csv 4K_ESPN_Closed.TS | grep -n I

El comando se puede cambiar por show_packets, show_streams, show_formats, etc.

  • Imagen de frames:
ffmpeg -i <input> -vf "select=eq(n\,0)" -vframes 1 out.png
  • Listar servicios (IDs):
tsanalyze --service-list Cinecanal_IRDs_45s.ts
  • Cortar sin reencodear
ffmpeg -i inputFile.mp4 -vcodec copy -acodec copy -ss 00:00:01.000 -t 00:00:20.000 outputFile.mp4
  • Deinterlace
ffmpeg -i FS2_IRDv2_cut.ts -vf yadif=0:-1:0 -copyts test.ts
  • ffmpeg force cut at specific frame
ffmpeg -y -i FS2_IRD.ts -ss 4.29 -t 5 -strict -2 -c:v libx264 -preset ultrafast -crf 1 -flags +ildct+ilme -profile:v high -level 4.0 -r ntsc FS2_IRD_aligned.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment