ffmpeg fails to Play Proxy Avid Interplay - ffmpeg

My goal is transcode this file with ffmpeg.
https://drive.google.com/open?id=1ATuPtSbZeQLexB1HBP509hInDOTyfEV8
ffplay fails to analize or play this file and returns:
Invalid pixel format.
This is the simply command:
ffplay -i testproxy.mxf
ffprobe -i testproxy.mxf -show_stream
It has been encoded by avid Interplay whit this targhet quality:
H.264 800Kbps Proxy 1080i 25
Maybe it's a raw file? and need same specification ahead input file?
Any suggestion is appreciated

Either Interplay doesn't write* a standard MXF or there's a limitation in ffmpeg's mxf demuxer.
But you can play the file with
ffplay -vcodec h264 testproxy.mxf
and similarly, you can transcode using
ffmpeg -vcodec h264 -i testproxy.mxf ...
*more likely, as mediainfo also fails to detect the video codec.

Related

Ffmpeg -c copy not carrying over audio track from mkv to hls stream

I am using ffmpeg to create an hls stream. The source is an mkv with multiple audio tracks. I have tried using -map to specify the audio stream as well. I also found that when I point ffmpeg to any other audio stream in the file it works. It's just the first audio stream that does not. At one point I replaced -c copy with -acodec aac -ac 6 on the first stream and I got sound which is great but I am only looking to copy the stream and not re-encode it. The next thing I tried was using other mkv videos I have. All are reflecting the same issue. The mkv's by itself play both audio and video fine in VLC. When playing the output.m3u8 in VLC the option to choose different audio tracks is greyed out. Here is the command I'm using:
ffmpeg -i "./video.mkv" -ss 00:00:00 -t 00:00:30 -c copy -f hls "output.m3u8"
I want the audio of my hls stream to reflect that of the mkv source:
Although what I get returned from the command above gives me no sound and shows me this in mediaInfo:
I've aslo noticed that hls does not support pcm. Is it possible dash could work with this stream because it is pcm?
HLS segments can be either MPEG-TS or fragmented MP4. Neither officially support PCM audio, so you'll have to convert it.
DASH uses fragmented MP4 as segment format.

Use ffmpeg to stream VP8 encoded video over RTP

I was able to create an mpeg encoded SRTP stream with ffmpeg, however I need to be able to stream VP8 encoded video.
This is the command I used to create an SRTP stream
ffmpeg -re -i BigBuckBunny.mp4 -f rtp_mpegts -acodec mp3 -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params <SOME_PRIVATE_KEY_HERE> srtp://127.0.0.1:20000
As I ultimately only need to stream video, and not audio, and the file is already a vp8 encoded webm, I assume the option I need to change is the -f rtp_mpegts but there doesn't seem to be an option for vp8
Is this possible with FFMEG?
mpegts is an video format for transmission, which is normally bundle with the MPEG-2 codec.
-f rtp_mpegts but there doesn't seem to be an option for vp8
libvpx is the ffmpeg encoder ( https://trac.ffmpeg.org/wiki/Encode/VP8 )
But if your video exist in VP8 codec, you don't need to recode this video again. You maybe need to rewrap this video into an transport format, which is optimal for your needs (https://en.wikipedia.org/wiki/Comparison_of_video_container_formats).
Maybe you should use webM as target container format.

Create mp4 file from raw h264 using a pipe instead of files

I have a raw h264 file that I can display with VLC, on a mac:
open -a VLC file.h264
I can convert this to mp4 with the command line
ffmpeg -f h264 -i file.h264 -c:v copy file.mp4
But what I really want to do is something like:
cat file.h264 | ffmpeg > file.mp4
Reason being that the input is coming over a socket and I want to convert it and send it to a video tag in an html file on the fly.
An alternative solution would be a way to display the raw h264 in a web page without converting it to mp4 first.
The input is coming in frame by frame, the first four bytes are 0,0,0,1. My understanding is that this h264 Annex B format.
I know nothing about video formats, I would grateful to be pointed in a direction to look.
Should I look into writing code using libavcodec like this quuesion or is there an off-the-shelf solution?
H.264 muxed to MP4 using libavformat not playing back
Thanks!
The command line below will create a fragmented MP4 (Windows cmd)
type test.h264 | ffmpeg -i - -vcodec copy -f mp4 -movflags frag_keyframe+empty_moov pipe:1 > test_frag.mp4
You should be able to find lot's of JavaScript code to play fragmented MP4s.
For example: https://github.com/chriswiggins/videojs-fmp4

Stretching WAV audio file with rubberband in fffmpeg causes invalid audio format

Having an issue here using ffmpeg's add-on Rubberband. When I try to stretch a WAV audio file with a given ratio, the WAV file is generated fine but then, when I want to parse its header, I can see an invalid audio format.
'Unknwon format: 22127'
Have reported this issue on this GitHub tracker. All details are there:
https://github.com/rackfx/Node-WAV-File-Info/issues/11
But now I am very unsure and wonder if it's not a Rubberband bug? Or am I missing something in the ffmpeg command to ensure correct audio format is set?
That's the ffmpeg command I used to generate that stretched WAV file with the invalid audio format (using ffmpeg v3.0.2 here)
ffmpeg -thread_queue_size 2048 -i /home/michael-heuberger/binarykitchen/code/videomail.io/var/local/tmp/clients/videomail.io/11e6-aebd-f5430180-84c7-074d5706928b/videomail_preview.wav -y -acodec libvorbis -ac 1 -filter:a rubberband=tempo=1.454366279637038 -loglevel warning /home/michael-heuberger/binarykitchen/code/videomail.io/var/local/tmp/clients/videomail.io/11e6-aebd-f5430180-84c7-074d5706928b/videomail_preview_for_webm_stretched.wav
Any clues?
Remove -c:a libvorbis. ffmpeg will then automatically choose a common and compatible audio format for WAV.

Stream H264 To Android Using FFMPEG

I'm trying to stream a .ts file containing H.264 and AAC as an RTP stream to an Android device.
I tried:
.\ffmpeg -fflags +genpts -re -i 1.ts -vcodec copy -an -f rtp rtp://127.0.0.1:10
000 -vn -acodec copy -f rtp rtp://127.0.0.1:20000 -newaudio
FFMPEG displays what should be in your SDP file and I copied this into an SDP file and tried playing from VLC and FFPLAY. VLC plays audio but just gives errors re: bad NAL unit types for video. FFPLAY doesn't play anything.
My best guess if that the FFMPEG H.264 RTP implementation is broken or at least it doesn't work in video passthru mode (i.e. using the -vcodec copy).
I need a fix for FFMPEG or an alternate simple open-source solution. I don't want to install FFMPEG in my Android client.
thanks.
Have you tried vlc?I once used vlc for streaming. You can have a look at here.

Resources