These are some ffmpeg command lines used when developing VHS dubbing controller.
#!/bin/bash
# Stream a PAL 50i capture, cropped and de-interlaced using ffmpegThese are some ffmpeg command lines used when developing VHS dubbing controller.
#!/bin/bash
# Stream a PAL 50i capture, cropped and de-interlaced using ffmpegFFmpeg build for NVIDIA & Intel hardware on Ubuntu 18.04LTS+:
Build platform: Ubuntu 18.04LTS
Goals: Generate an FFmpeg build that can utilize NVENC hardware acceleration on NVIDIA-based systems on Ubuntu 18.04LTS+.
First steps:
Purge all NVIDIA drivers first:
| #!/bin/bash | |
| ffmpeg -re -analyzeduration 100M -probesize 100M -stream_loop -1 -i <input_file.ts> \ | |
| -vf setdar=16/9 -f decklink -pix_fmt uyvy422 -format_code pal "DeckLink Mini Monitor" |
| # To extract the sound from a video and save it as MP3: | |
| ffmpeg -i <video.mp4> -vn <sound>.mp3 | |
| # To convert frames from a video or GIF into individual numbered images: | |
| ffmpeg -i <video.mpg|video.gif> <frame_%d.png> | |
| # To combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF: | |
| ffmpeg -i <frame_%d.jpg> -f image2 <video.mpg|video.gif> | |
| # To quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image: |
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
Table of Contents:
| @echo off | |
| :: Configuration Variables | |
| set "ifName=Ethernet 2" | |
| set "ipAddress=10.88.167.35" | |
| set "subnetMask=255.255.255.240" | |
| set "vlanID=702" | |
| :: set "defaultGateway=x.x.x.x" | |
| :: set "primaryDNS=x.x.x.x" |
| @echo off | |
| :: Set duration in seconds | |
| set duration=20 | |
| :: Temporary loop TS file to create | |
| set loopfile=svc%1.ts | |
| set "overlaytext=ABC-%2 / LTN" | |
| :: Create the loop file | |
| ffmpeg.exe ^ |
| @echo off | |
| :: Set duration in seconds | |
| set duration=10 | |
| :: Temporary loop TS file to create | |
| set loopfile=loop.mkv | |
| :: Target mpegts URL (ESCAPE &s with ^!!! and add double quotes) | |
| :: see https://www.ffmpeg.org/ffmpeg-protocols.html#udp for full syntax | |
| set "target=udp://239.0.0.1:1234?ttl=13^&pkt_size=1316" |