Hi cats
please consider this 2 interlaced source
one HD (xdcamhd422): https://www.dropbox.com/s/bewed3s3zxhouzk/HD.MXF?dl=0
one IMX(SD)(imx50): https://www.dropbox.com/s/5jd9run51moczxh/imx.mxf?dl=0
for example I try to convert the HD.MXF into a IMX-SD .MXF file but with this commandline pipe with ffmpeg/ffmbc:
but I get errorsCode:ffmpeg -i v:\ffmpeg\HD.MXF -vf scale=720:576,interlace -f rawvideo -vcodec rawvideo -an - | ffmbc -y -f rawvideo -s 720x576 -r 25 -tff -i - -i v:\ffmpeg\HD.MXF -target imx50 outputIMX.mxf
How can I resolve?
Can I use ffmpeg/ffmbc also to convert the IMX one into HD?
audio channels/maps are different for the 2 files
thanks
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 41
Thread
-
-
1) It looks like you have 2 -i in the piped output commandline.
2) Interlaced scaling flag is interl=1, not "interlaced"
-vf scale=720:576:interl=1
3) You need to specify -pix_fmt yuv422p for both pre and post pipe
This commandline was already posted in your a few of your other threads. I thought cats have good memory?Last edited by poisondeathray; 28th Feb 2015 at 11:03.
-
because cats have 4MB or ram ^^
Code:ffmpeg -i v:\ffmpeg\HD.MXF -vf scale=720:576:interl=1 -f rawvideo -pix_fmt yuv422p -an - | ffmbc -y -f rawvideo -pix_fmt yuv422p -s 720x576 -r 25 -tff -i - -target imx50 outputIMX.mxf
-
Why don't you use ffmbc directly? Why pipe ffmpeg to ffmbc ?
IMX50 specs only support 16bit audio when in 8ch configuration.
There is no need to pipe for what you are doing, you can use ffmbc directly (interlaced downscale, 8 mono to single 8ch, IMX50 encoding)
Code:ffmbc -i hd.MXF -vf scale=720:576:interl=1 -acodec pcm_s16le -ar 48000 -map_audio_channel 0:1:0:0:1:0 -map_audio_channel 0:2:0:0:1:1 -map_audio_channel 0:3:0:0:1:2 -map_audio_channel 0:4:0:0:1:3 -map_audio_channel 0:5:0:0:1:4 -map_audio_channel 0:6:0:0:1:5 -map_audio_channel 0:7:0:0:1:6 -map_audio_channel 0:8:0:0:1:7 -target imx50 outputIMX.mxf
-
I forgot - you should use colormatrix 709 to 601 too , when downscaling. This was already covered in your other thread(s)
-
-
-
It's posted in your other thread, flags=lanczos
-vf scale=720:576:interl=1:flags=lanczos -
I have try over another HD file (C0094.mxf) but it is the same, strangely I get an error using
Code:ffmbc -y -i C0094.MXF -vf scale=720:576:interl=1:flags=lanczos -acodec pcm_s16le -ar 48000 -map_audio_channel 0:1:0:0:1:0 -map_audio_channel 0:2:0:0:1:1 -map_audio_channel 0:3:0:0:1:2 -map_audio_channel 0:4:0:0:1:3 -map_audio_channel 0:5:0:0:1:4 -map_audio_channel 0:6:0:0:1:5 -map_audio_channel 0:7:0:0:1:6 -map_audio_channel 0:8:0:0:1:7 -target imx50 C0094outputIMX.mxf
maybe a sintax error? -
Code:
ffmbc -y -i C0104.MXF -vf scale=720:576:interl=1,colormatrix=bt709:bt601 -sws_flags lanczos -acodec pcm_s16le -ar 48000 -map_audio_channel 0:1:0:0:1:0 -map_audio_channel 0:2:0:0:1:1 -map_audio_channel 0:3:0:0:1:2 -map_audio_channel 0:4:0:0:1:3 -map_audio_channel 0:5:0:0:1:4 -map_audio_channel 0:6:0:0:1:5 -map_audio_channel 0:7:0:0:1:6 -map_audio_channel 0:8:0:0:1:7 -target imx50 C0104IMX.mxf
https://www.dropbox.com/s/689p158dm1xqetu/C0104.MXF?dl=0
but I see alwais that image is slightly "vibrating", I don't know why but is well visible on a crt monitor -
I haven't looked at it - But it's probably because it's too sharp, use a softer resize and lowpass (see your other thread(s). Again.)
Sharp = bad for interlaced material -
the problem is present also without the -sws_flags lanczos , it's difficult to see it without a crt monitor but is visible, maybe a tff/bff setting?
I post another original xdcamhd422 file
https://www.dropbox.com/s/utp5oe5t7sudjrj/C0016.MXF?dl=0
I have try add
Code:-tff
also tryed using -bff but nothis, the "vibrating" remainsLast edited by marcorocchini; 1st Mar 2015 at 16:37.
-
I see it.
It's because it wasn't smart bobbed , you have field offset of even/odd fields, so up/down motion or as you describe "vibrating"
You can use one of the avisynth methods. Other option in ffmpeg would be to yadif double rate, soft resize, low pass and resize, reinterlace
Several variations of these methods were covered in your other thread(s) -
Yes you can - use multiple inputs into ffmbc
The pipe in from ffmpeg will be 1st, the native mxf video (only interested in the audio) will be 2nd . You have to adjust the map_audio_channel to reflect this, because it will be taken from 2nd input now. So if you put the pipe first, it will be "0" , and the mxf will be "1". The order matters
So if you wanted to use -vf interlace instead of tinterlace, you could use ffmpeg to pipe to ffmbc (ffmbc doesn't have -vf interlace, only tinterlace). Recall in the other thread -vf interlace vs. -vf tinterlace and the low pass? You didn't like either method IIRC, and eventually went with avisynth -
mmm
Code:ffmpeg -i HD.mxf -vf crop=1440:1080:240:0,yadif=1:0,scale=720:576,colormatrix=bt709:bt601,interlace -pix_fmt yuv422p -an -f rawvideo - | ffmbc -y -f rawvideo -pix_fmt yuv422p -s 720x576 -r 25 -i - -tff -target imx50 -aspect 16:9 outputIMX.mxf
-
No, you need 2 inputs for ffmbc, 1 for the video pipe, 1 for the mxf which provides the audio. You have to change the map_audio_channel to reflect that the 2nd input is providing the audio
Code:ffmpeg -i C0104.MXF -vf yadif=1:tff,scale=720:576,colormatrix=bt709:bt601,interlace -an -pix_fmt yuv422p -c:v rawvideo -f rawvideo - | ffmbc -f rawvideo -pix_fmt yuv422p -s 720x576 -r 25 -i - -i C0104.MXF -vf colormatrix=bt709:bt601 -acodec pcm_s16le -ar 48000 -map_audio_channel 1:1:0:0:1:0 -map_audio_channel 1:2:0:0:1:1 -map_audio_channel 1:3:0:0:1:2 -map_audio_channel 1:4:0:0:1:3 -map_audio_channel 1:5:0:0:1:4 -map_audio_channel 1:6:0:0:1:5 -map_audio_channel 1:7:0:0:1:6 -map_audio_channel 1:8:0:0:1:7 -target imx50 OUTPUT.mxf
-
Now audio appear but I see persist the vibrating problem
and a "broken pipe" at the end of encoding
the colormatrix line is doubled, however also with this, the problem of vibrating remains (and also the broken pipe error)
Code:ffmpeg -i C0104.MXF -vf yadif=1:tff,scale=720:576,colormatrix=bt709:bt601,interlace -an -pix_fmt yuv422p -c:v rawvideo -f rawvideo - | ffmbc -f rawvideo -pix_fmt yuv422p -s 720x576 -r 25 -i - -i C0104.MXF -acodec pcm_s16le -ar 48000 -map_audio_channel 1:1:0:0:1:0 -map_audio_channel 1:2:0:0:1:1 -map_audio_channel 1:3:0:0:1:2 -map_audio_channel 1:4:0:0:1:3 -map_audio_channel 1:5:0:0:1:4 -map_audio_channel 1:6:0:0:1:5 -map_audio_channel 1:7:0:0:1:6 -map_audio_channel 1:8:0:0:1:7 -target imx50 OUTPUT.mxf
However the ffmpeg don't vibrate, seems ok:
Code:V:\brisighella>ffmpeg -i C0104.MXF -vf yadif=1:tff,scale=720:576,colormatrix=bt709:bt601,interlace -pix_fmt uyvy422 -c:v rawvideo -an outputavi.avi
Last edited by marcorocchini; 2nd Mar 2015 at 09:09.
-
For some reason, the colormatrix works alone with ffmpeg, but not when piped through. I think there is a double conversion. If you leave it for ffmbc, not for ffmpeg, the colors are correct (ie. erase the 1st colormatrix instance with ffmpeg) . If you use only colormatrix ffmpeg through the pipe, colors are wrong
The broken pipe message is a false alarm; it's because it doesn't know which video you are applying the filter to. Add -map 0:0 after the ffmbc inputs to specify that you are using the piped video and it won't complain
I don't see the "vibrating" with this, other than the normal interlace and twittering problems. It's the same as ffmpeg pre-pipe, except with a bit more loss from MPEG2
or you can try other methods like tinterlace, or avisynth -
If you have mjpeg decompressor in my monitor this play ok:
https://www.dropbox.com/s/3khsg3msdlm4j9r/C0104playOK.avi?dl=0
while this play vibrating:
https://www.dropbox.com/s/htgp2q53hcaxxsa/C0104FFMBC.avi?dl=0
Using this I alwais see vibrating
Code:ffmpeg -y -i C0104.MXF -vf yadif=1:tff,scale=720:576,colormatrix=bt709:bt601,interlace -an -pix_fmt yuv422p -c:v rawvideo -f rawvideo - | ffmbc -y -f rawvideo -pix_fmt yuv422p -s 720x576 -r 25 -i - -i C0104.MXF -vf colormatrix=bt709:bt601 -acodec pcm_s16le -ar 48000 -map_audio_channel 1:1:0:0:1:0 -map_audio_channel 1:2:0:0:1:1 -map_audio_channel 1:3:0:0:1:2 -map_audio_channel 1:4:0:0:1:3 -map_audio_channel 1:5:0:0:1:4 -map_audio_channel 1:6:0:0:1:5 -map_audio_channel 1:7:0:0:1:6 -map_audio_channel 1:8:0:0:1:7 -target imx50 OUTPUT.mxf
-
But you said ffmpeg alone (pre-pipe) is ok? It looks the same to me as the ffmbc output post pipe, just a bit worse from MPEG2. Even if you compare it frame by frame, it's the same.
In fact, if you use rawvideo instead of xdcam, you get bit for bit the same thing as pre-pipe
This is not the same as the 1st "vibrating" problem, when yadif wan't used. I verified there was a problem with that. So you might have a configuration or playback problem?
-vf interlace does apply a lowpass by default. So it isn't as "sharp" . This was discussed in your other thread. You can disable it but more "twittering" or ling buzzing will occur