Opened 8 years ago
Last modified 8 years ago
#5966 new defect
ffmpeg/ffplay specify (H)DV camera's using iec61883 -dvguid option broken or wrong syntax?
Reported by: | walter sonius | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avdevice |
Version: | git-master | Keywords: | iec61883 |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
Not sure if its a bug or me miss understanding the syntax of iec61883 -dvguid option.
https://ffmpeg.org/ffmpeg-devices.html#iec61883
To my understanding the single libiec61883 argument "auto" just works as expected with no selective power at all. But specifying pci adapters by referring to them as port numbers is a little bit unclear and should not be necessary if the -dvguid option works( I think its broken). Leaving out '-i' also seems to work for auto and port number syntax...
Use Case:
Using multiple firewire/1394 (H)DV camera's with iec61883 in ffmpeg/ffplay only works for a single (H)DV camera which is active/powered-on "first" (in a order of multiple connected camera's) to a systems firewire interface.
Although having multiple active camera's connected to the same single firewire adapter interface, I was not able to select/specify/distinguish with "-dvguid" other than the first powered-on camera.
How to reproduce:
Lookup (H)DV camera unique device GUID codes, the first is probably the pci firewire adapter itself!
dmesg | grep GUID cat /sys/bus/firewire/devices/fw*/guid
Using multiple (H)DV camera's on the same firewire adapter interface other than the first powered-on will not work.
ffplay -f iec61883 -i 0 -dvtype dv -dvguid 0x0camera1guidcode #probably works if 1st ffplay -f iec61883 -i 0 -dvtype dv -dvguid 0x0camera2guidcode #doesn't work just hangs
Using multiple (H)DV devices each connected on their own firewire pci adapter interface works, but still only for the "first" poweredon/connected device on that unique firewire adapter. Adding the -guid option here will not be very effective and functions more like a whitelist since it still only works on the first powered-on camera's. The first iec61883 argument auto/port is used to specify the firewire pci adapter see 0 and 1 in the following examples.
ffplay -f iec61883 -i 0 -dvtype dv #sony camera on 1st pci firewire adapter ffplay -f iec61883 -i 1 -dvtype hdv #canon camera on seperate 2nd pci firewire adapter
Expected:
Just by adding the option -dvguid to -dvtype I would expect that a unique camera can be specified with or without the need of the firewire adapter port number.
ffplay -f iec61883 -i -dvtype dv -dvguid 0x0camera2guid #doesn't work ffplay -f iec61883 -i 0 -dvtype -dvguid 0x0camera2guid #doesn't work
Using a on purpose wrong -dvguid code starting with 0x 0 or 1 will lead to the same first dv device, a other on purpose wrong guid code like 2 or 2x leads to a expected error.
ffplay -f iec61883 -i -dvtype dv -dvguid 2 #see error ffplay -f iec61883 -i 0 -dvtype -dvguid 2xetc #see error
"No AV/C devices found.
1: Input/output error"
The program "dvgrab" works as expected, it will let you capture from multiple uniquely with -guid option specified (H)DV camera's at the same time from the same single pci firewire adapter interface. I would expect ffmpeg/ffplay iec61883 dvguid option to behave the same...
dvgrab -noavc -f raw -guid 0x0sonycameraguid sonyrecording.dv dvgrab -noavc -f hdv -guid 0x0canoncameraguid canonrecording.hdv dvgrab -noavc -f dv -guid 0x0jvccameraguid jvcrecording.dv
FW adapters:
Texas Instruments TSB82AA2 IEEE-1394b (3 FW800 ports)
Agere LSI Corporation FW322/323 (2 FW400 6pin ports)
Software:
ubuntu linux 16.04.1 amd64 kernel 4.4.0-45-generic 66
libiec61883 1.2.0
ffmpeg version 2.8.8-0ubuntu0.16.04.1 #repo ffmpeg version N-82572-gac206bb #github master build built on ubuntu 16.04.1 amd64
Change History (6)
comment:1 by , 8 years ago
Component: | undetermined → avdevice |
---|---|
Keywords: | dvguid removed |
follow-up: 3 comment:2 by , 8 years ago
Is this the head version of ffmpeg, thats the one I cloned this afternoon.
git clone git://source.ffmpeg.org/ffmpeg
I cannot show the failing output of "ffmpeg" since its doesn't even fails on the -dvguid argument (bogus or not) I specify, ffmpeg will just record succesfull from the 1st connected camera on the specified firewire adapter(refered as port 1), although I'm specifying a other or wrong camera using the -dvguid code:
./ffmpeg -f iec61883 -i 1 -dvtype dv -dvguid 0x0wronguidcode -target pal-dv -aspect 16:9 ~/Desktop/somecamera.dv ffmpeg version N-82572-gac206bb Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libiec61883 --extra-ldflags=-ldl --enable-ffplay libavutil 55. 40.100 / 55. 40.100 libavcodec 57. 66.105 / 57. 66.105 libavformat 57. 58.100 / 57. 58.100 libavdevice 57. 2.100 / 57. 2.100 libavfilter 6. 67.100 / 6. 67.100 libswscale 4. 3.101 / 4. 3.101 libswresample 2. 4.100 / 2. 4.100 [iec61883 @ 0x3927560] Selecting IEEE1394 port: 1 libiec61883 error: Failed to get channels available. Input #0, iec61883, from '1': Duration: N/A, start: 0.000000, bitrate: 30848 kb/s Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s Stream #0:2: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s Output #0, dv, to '/home/ubuntuadmin/Desktop/somecamera.dv': Metadata: encoder : Lavf57.58.100 Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc57.66.105 dvvideo Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Metadata: encoder : Lavc57.66.105 pcm_s16le Stream mapping: Stream #0:0 -> #0:0 (dvvideo (native) -> dvvideo (native)) Stream #0:1 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [dv @ 0x39455a0] Can't process DV frame #137. Insufficient audio data or severe sync problem.x frame= 139 fps= 25 q=-0.0 Lsize= 19266kB time=00:00:05.56 bitrate=28385.6kbits/s speed=1.01x video:19547kB audio:1035kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
On the otherhand "ffplay" will show an error if the -dvguid is really wrong:
./ffplay -f iec61883 -i 1 -dvtype dv -dvguid 2 ffplay version N-82572-gac206bb Copyright (c) 2003-2016 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libiec61883 --extra-ldflags=-ldl --enable-ffplay libavutil 55. 40.100 / 55. 40.100 libavcodec 57. 66.105 / 57. 66.105 libavformat 57. 58.100 / 57. 58.100 libavdevice 57. 2.100 / 57. 2.100 libavfilter 6. 67.100 / 6. 67.100 libswscale 4. 3.101 / 4. 3.101 libswresample 2. 4.100 / 2. 4.100 [iec61883 @ 0x7f1100000920] Selecting IEEE1394 port: 1 rom1394_1 warning: read failed: 0x0000fffff000040csq= 0B f=0/0 rom1394_1 warning: read failed: 0x0000fffff0000410 [iec61883 @ 0x7f1100000920] No AV/C devices found. 1: Input/output error
Does this console output will clarify for a valid ticket as in "software bug" since the -dvguid option seems not be correctly parsed. Or as a valid ticket as in a request for a better documentation example howto use the -dvguid option using multiple camera's?
comment:3 by , 8 years ago
Replying to walterav1984:
Does this console output will clarify for a valid ticket as in "software bug" since the -dvguid option seems not be correctly parsed. Or as a valid ticket as in a request for a better documentation example howto use the -dvguid option using multiple camera's?
I cannot promise that any active developer has access to a - or actually two iiuc- such devices.
follow-up: 6 comment:4 by , 8 years ago
ffplay -f iec61883 -i 0 -dvtype dv -dvguid 0x0camera1guidcode #probably works if 1st
This is indeed the correct syntax that works on ffmpeg 2.5.10 on Ubuntu linux 15.04 amd64, 4 commits since this 963aa1d 2014 december 4th and latest version 2015 september 5th might introduce regression?
comment:5 by , 8 years ago
Although "ffplay" works in Ubuntu linux 15.04 amd64 with the -dvguid option its shipping "ffmpeg" version is also not accepting -dvguid option or anything further from 0/auto. It justs records from the first powered on dv/hdv camera!
ffmpeg -f iec61883 -i 0 -dvtype dv -dvguid 0x0camera1guidcode out.dv
So there is a difference in ffmpeg ffplay syntax parsing in Ubuntu linux 15.04 versions. In ubuntu 16.04 ffplay and ffmpeg won't work at all with -dvguid option.
comment:6 by , 8 years ago
Replying to walterav1984:
ffplay -f iec61883 -i 0 -dvtype dv -dvguid 0x0camera1guidcode #probably works if 1stThis is indeed the correct syntax that works on ffmpeg 2.5.10 on Ubuntu linux 15.04 amd64
Please use git bisect
to find out which commit broke the feature.
Please test current FFmpeg git head and please provide (failing) command line including complete, uncut console output to make this a valid ticket. Please use
ffmpeg
, notffplay
, unless it is needed to reproduce the issue.