[FFmpeg-user] Cleaning up codeline to grab and record HDV video using Firewire/libiec61883
Terje J. Hanssen
terjejhanssen at gmail.com
Mon Jun 30 22:44:33 EEST 2025
Thanks for the feedback and comments.
Den 30.06.2025 01:00, skrev BloodMan:
> Hi,
>
>
> W dniu 2025-06-29 o 23:29, Terje J. Hanssen pisze:
>> a) Why so when the standard .M2T is 25 Mbps?
>
> Because of:
> > Stream mapping:
> > Stream #0:2 -> #0:0 (mpeg2video (native) -> mpeg1video (native))
> ^ ^
> Caused by:
> > ffmpeg -hide_banner -f iec61883 -i auto -dvbuffer 100000 out.mpg
> ^^^
> (yeah, do not use .mpg without codec tweaking, IMHO do not use at all ;)
Seemingly the most important missing part of the documentation's example
code line
ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg
is "-c copy"
HDV 1080i50 stream is MPEG-2/ MP at H-14 video and MP2 audio
The container can be .mpg or .m2t
I have tried additional combination as follows:
.mpg w/o "-c copy" ==> mpeg1video, mp2 audio
.mpg with "-c copy" ==> mpeg2video, mp2 audio
.mp4 w/o "-c copy" ==> h264 video, aac audio
.mp4 with "-c copy" ==> mpeg2video, mp2 audio
-----------
In addition I created a "BDAV" format using hdv video copy and mp2 audio
to pcm_bluray transcoding.
ffmpeg -hide_banner -f iec61883 -i auto -c:v copy -c:a pcm_bluray
-mpegts_m2ts_mode 1 -t 30 Out_hdv.m2ts
[mpeg2video @ 0x556b164f54c0] Invalid frame dimensions 0x0.
Last message repeated 4 times
[iec61883 @ 0x556b164d6a40] Could not find codec parameters for stream 0
(Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options
[iec61883 @ 0x556b164d6a40] Could not find codec parameters for stream 3
(Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options
[iec61883 @ 0x556b164d6a40] Could not find codec parameters for stream 4
(Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options
Input #0, iec61883, from 'auto':
Duration: N/A, start: 1796.421533, bitrate: 25384 kb/s
Program 100
Stream #0:2: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s,
25 fps, 25 tbr, 90k tbn
Side data:
cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032
vbv_delay: N/A
Stream #0:1: Audio: mp2 (mp3float) ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 384 kb/s
Stream #0:3: Unknown: none ([160][0][0][0] / 0x00A0)
Stream #0:4: Unknown: none ([161][0][0][0] / 0x00A1)
No Program
Stream #0:0: Unknown: none
Stream mapping:
Stream #0:2 -> #0:0 (copy)
Stream #0:1 -> #0:1 (mp2 (native) -> pcm_bluray (native))
Press [q] to stop, [?] for help
Output #0, mpegts, to 'Out_hdv.m2ts':
Metadata:
encoder : Lavf61.7.100
Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31,
25000 kb/s, 25 fps, 25 tbr, 90k tbn
Side data:
cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032
vbv_delay: N/A
Stream #0:1: Audio: pcm_bluray, 48000 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc61.19.101 pcm_bluray
[out#0/mpegts @ 0x556b16516b40] video:90364KiB audio:5648KiB
subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead:
5.467366%
frame= 740 fps= 26 q=-1.0 Lsize= 101262KiB time=00:00:30.00
bitrate=27651.3kbits/s speed=1.06x
>
>
>
>> b) There are also warnings regarding streams 0, 3, 4 ?
>
> Program/technical/cam-internal data
> (maybe text, geo, title, etc data, ignore in general)
>
>
>
>> a) Adding "-c copy" solves the output bitrate = input bitrate = 25 Mbps
>
> Yup, copy or mp4 codec it's probably best way...
>
>
>> c) Trying to increase the value for the 'analyzeduration' (0) and
>> 'probesize' are not successful?
>
> no success because the streams do not contain recognizable data
>
>
>
More information about the ffmpeg-user
mailing list